Skip to content

Fence Cost Calculator

Count the posts, pickets and rails for a wood fence and total the material cost from your own prices.

Maintained by the Calcenzo team. Last reviewed October 27, 2026. Methodology

Fence Cost Calculator

Posts = length / spacing + 1. Pickets cover the length at the width you enter. Rails = rails per section times the number of sections. Prices are the ones you enter, not a store quote.

A fence cost calculator counts the posts, pickets and rails a wood fence needs and multiplies each by your price to give the material cost. Formula: Posts = sections + 1; sections = length ÷ spacing, rounded up; pickets = length × 12 ÷ picket width; rails = rails per section × sections. An 80-foot fence with posts every 8 feet, 5.5-inch pickets and 3 rails per section needs 11 posts, 175 pickets and 30 rails. At $18, $2.50 and $8 each, that is $875.50.

fence cost calculator
Fence cost calculator chart: posts, pickets, rails and material cost for three fences.

How to use the fence cost calculator

  1. Measure the fence line in feet. Measure each straight run if the fence turns corners.
  2. Enter the post spacing. Eight feet is common for wood fences because rails are often sold in 8-foot lengths.
  3. Enter the picket width in inches. A nominal 1×6 picket is about 5.5 inches wide.
  4. Enter rails per section, usually 2 for a short fence and 3 for a 6-foot privacy fence.
  5. Enter the price you will pay for one post, one picket and one rail.

The fence cost calculator returns the count of each part and the total.

What formula does the fence cost calculator use?

The length is divided by the post spacing and rounded up to get the number of sections. Posts are sections plus one, since every run needs a post at both ends. Pickets are the length in inches divided by the picket width, rounded up, so they sit edge to edge with no gaps. Rails are the rails per section times the sections.

Gates, concrete, gravel, screws, brackets and post caps are not included. Add those separately.

Fence cost calculator worked example

Results from the fence cost calculator:

Fence Posts Pickets Rails Material cost
80 ft, 8 ft spacing, 5.5 in pickets, 3 rails ($18 / $2.50 / $8) 11 175 30 $875.50
120 ft, 8 ft spacing, 5.5 in pickets, 2 rails ($22 / $3.20 / $9) 16 262 30 $1,460.40
60 ft, 6 ft spacing, 3.5 in pickets, 3 rails ($15 / $2 / $7) 11 206 30 $787.00

Pickets are the biggest line in most wood fences. In the 120-foot example they cost $838.40 of the $1,460.40 total, so a cheaper picket saves more than a cheaper post.

Spaced pickets, corners and gates

If you want a gap between pickets, add the gap to the picket width. A 5.5-inch picket with a 2-inch gap covers 7.5 inches, which cuts the count by about a quarter. For a fence with corners, run the fence cost calculator once per straight run, because each run starts and ends with its own post. Then subtract shared corner posts from the total.

For a gate, leave the gate width out of the length and price the gate kit and two heavier posts on their own.

Before you dig the post holes

Check your property line, any homeowners association rules and your local permit rules for height and setbacks before you buy anything. Call 811 a few days ahead so buried utility lines can be marked. Posts set in concrete need bags of mix, so count about one or two bags per post depending on hole size, and price them with our concrete calculator.

A simple planning checklist

Walk the fence line with a tape and stakes before you order. Mark where each post will go, note slopes, and look for tree roots, sprinkler lines and low spots where water sits. On a slope you can step each section down or let the pickets follow the ground; stepped sections may need longer posts at the low end. Write down the height you want, since a 6-foot privacy fence usually needs longer posts set deeper than a 4-foot garden fence.

Once the layout is set, enter each run in the fence cost calculator, add the gate and concrete costs, and you have a materials list you can take to the store or hand to a contractor for a labor quote.

Common mistakes to avoid

A common mistake is forgetting the extra post at the end of each run. Another is buying exactly the count shown. Some pickets will be split, warped or cut short at the ends, so buy a few extra. A third is mixing prices from different stores, which gives a total you cannot actually buy at. Run the fence cost calculator again with each store’s prices.

Prices change from store to store and week to week, so price the exact items you plan to buy on the same day, and keep the receipt for anything you might return.

Estimates for planning only. Prices, codes and site conditions vary; get a written quote and check local building rules before you buy materials.

Related calculators:

Questions about this calculator

How many fence posts do I need?

Divide the length by the post spacing, round up, and add one. An 80-foot run at 8 feet needs 11 posts.

How many pickets for a 100-foot fence?

With 5.5-inch pickets and no gaps, 1,200 inches ÷ 5.5 = 218.2, so 219 pickets.

What spacing should fence posts have?

Six to eight feet is common for wood fences. Check the rail length you plan to buy and any local rules.

Does the fence cost calculator include labor?

No. It totals materials from your prices. Add labor, concrete, hardware and gates yourself.

Should I buy extra pickets?

Yes. Plan for a few spares to cover splits, warps and end cuts.

Check the assumptions and units before relying on a result. Financial, tax and health estimates do not replace advice for your individual circumstances.

Report a calculation issue