Field Service Cost Compare prices

Home/Calculators/Fence calculator

Fence cost calculator: posts, rails, pickets and a subtotal

You are working out how many posts, rails and pickets your fence needs, so that you can price the build and order the parts in the right quantity. Fence cost calculator. Nothing was tested for this page; the numbers come from the formula shown below and the inputs you enter.

CalculatorBuilt 27 November 2026Example inputs, not industry averages

Straight length from end post to end post. A gate opening ends a run.
Leave blank if there is only one run.
Default 8 feet.
Up to 4 feet gets 2 rails per section, taller gets 3. An illustration; your plan decides.
Whole number. Gates sit between runs and use the end posts of the runs next to them.
Actual width, default 5.5 inches.
Default 0.5 inches.
Leave all price fields blank to get counts only. Typed by you, not market figures.
One amount you type in.

Posts needed

—

Sections
—
Rails
—
Pickets, with 5 percent extra
—
Subtotal of the items you priced
—

An estimate from the formula below and the numbers you typed. Check quantities against your plan and your supplier before you order.

Put it into a job estimate

Enter each straight run on its own. A gate sits between two runs, so it splits the fence into separate runs, and each run is rounded up to whole sections.

The automatic calculation needs JavaScript. With scripting off, the fields above do nothing and the result area stays empty. The formula is written out below, so you can do the same arithmetic on paper.

Fence calculator: how to measure

  1. Measure each straight run of fence in feet, from end post to end post. A gate opening ends one run and starts the next.
  2. Enter up to four runs. Each run is rounded up to whole sections on its own.
  3. Set the post spacing in feet (8 is the default) and the fence height.
  4. Measure one picket width and the gap between pickets in inches. The defaults are 5.5 and 0.5.

Fence calculator formula, written out

  • sections = each run / post spacing, rounded up, run by run
  • posts = sections + 1 for every run
  • rails = sections x 2 (fence up to 4 ft) or x 3 (taller), as an illustration
  • pickets = run length x 12 / (picket width + gap), rounded up per run, then x 1.05, rounded up
  • subtotal = quantities x the prices you typed + concrete and hardware, for the items you priced

Fence calculator worked example

With the inputs already in the form (run 1 length 100, post spacing 8, fence height 6, gates (for the gate price only) 0, picket width 5.5, gap between pickets 0.5) the result is: posts needed: 14; sections: 13; rails: 39; pickets, with 5 percent extra: 210.

  1. Run 1: 100 ft / 8 ft, rounded up = 13 sections, 14 posts
  2. Sections = 13
  3. Posts = 13 sections + 1 run(s) = 14
  4. Rails = 13 sections x 3 = 39
  5. Pickets = 200, plus 5 percent, rounded up = 210

To size the holes, use the fence post concrete calculator per hole.

What the fence calculator assumes

  • Every run is straight and has an end post at both ends. Corners and grade changes add posts you may need to count yourself.
  • Sections are the run length divided by the post spacing, rounded up, for each run. Posts are the sections plus one for every run.
  • Rails per section: two up to 4 feet tall, three above. This is an illustration; your plan, the manufacturer and local rules decide.
  • Pickets are run length x 12 divided by picket width plus gap, rounded up per run, plus 5 percent.
  • Prices are typed by you. The subtotal covers only the items you priced; labor, tax, delivery and removal are not included.

Fence calculator questions people ask

How many fence posts do I need?

Divide each run by the post spacing and round up to get its sections.

  • Each run has its sections plus one posts.
  • A 100 foot run with 8 foot spacing is 13 sections and 14 posts.
  • Split by a gate into 46 and 54 foot runs, it is 6 + 7 = 13 sections and 15 posts.

How many pickets do I need?

Multiply the run length in feet by 12 to get inches, then divide by the picket width plus the gap and round up for each run. A 5.5 inch picket with a 0.5 inch gap uses 6 inches. Add 5 percent for cuts and breakage.

How many rails does my fence need?

As a starting point, use two rails per section for fences up to 4 feet tall and three for taller ones, and multiply by the number of sections. Your fence plan or the manufacturer sets the real requirement.

What does the concrete and hardware line cover?

That line is a single amount you type in. It can cover post concrete, fasteners, brackets and hinges. The calculator does not guess a figure for you. Enter what you plan to spend on those items.

This calculator belongs to the framing and roofing calculators. To price the whole job, not just this part, use the job costing calculator and the pricing guide below.

How this site makes money. Affiliate links on this site are marked before you click them, and a commission will never change a price, a test result or a ranking. Details in the affiliate disclosure.