Home & Construction · Formula v1.0

Fence Calculator

Estimate the posts, pickets and rails a fence needs from its length and layout.

LAST REVIEWEDSeptember 24, 2026Inputs stay in your browser
Live calculation

Enter your numbers

Calculated result
Posts needed14
Pickets needed200
Rails needed26
Sensitivity check

What if fence length (ft) changes?

-10% input13
0% input14
+10% input15

Answer first

What this calculator tells you

Estimate the posts, pickets and rails a fence needs from its length and layout. Turn a fence length into a shopping list before you price lumber. Formula: Sections = ⌈length ÷ post spacing⌉; posts = sections + 1; pickets = ⌈length × 12 ÷ (picket width + gap)⌉; rails = sections × rails per section. At the worked-example inputs, the posts needed is 14. Holding every other input steady, moving fence length (ft) from 80 to 120 moves the result from 11 to 16.

FreeNo sign-upInputs stay in-browserCSV exportReviewed September 24, 2026

Transparent method

The formula

Sections = ⌈length ÷ post spacing⌉; posts = sections + 1; pickets = ⌈length × 12 ÷ (picket width + gap)⌉; rails = sections × rails per sectionAt the worked-example inputs the posts needed is 14. It rises with fence length (ft) and falls as post spacing (ft) increases; picket width (in), gap between pickets (in) and rails per section do not move it.

Turn a fence length into a shopping list before you price lumber.

Worked example

Posts needed14
Pickets needed200
Rails needed26

Example inputs

Fence length (ft)100
Post spacing (ft)8
Picket width (in)5.5
Gap between pickets (in)0.5
Rails per section2

How to interpret the result

A fence is a run of sections with a post at each end, so posts always outnumber sections by one. A 100-foot run at 8-foot spacing needs 13 sections and 14 posts. Pickets depend on width plus gap: 5.5-inch boards with half-inch gaps need 200 across the run. Rails multiply by the number of sections, which is where lumber counts climb.

At the worked-example inputs the posts needed is 14. It rises with fence length (ft) and falls as post spacing (ft) increases; picket width (in), gap between pickets (in) and rails per section do not move it.

Interpretation boundary

These are material-quantity estimates. Always add a waste and overage margin, and confirm actual coverage with your specific product and supplier before purchasing.

Before you rely on it

What to check

Count gates and corners separately. Each adds posts and changes the section count, so the total here is for a straight run only.

The common error

Where people go wrong with fence calculator

Dividing length by spacing and stopping there. That counts the sections, not the posts, and leaves you one post short at the end.

Sensitivity evidence

How fence length (ft) changes the posts needed

Holding every other input at the worked-example value, moving fence length (ft) from 80 to 120 moves the posts needed from 11 to 16: a spread of 5, or 36% of the worked-example result.

Fence Calculator: posts needed and pickets needed and rails needed across a range of fence length (ft), every other input held at the worked-example value.
Fence length (ft)Posts neededPickets neededRails needed
801116020
901318024
100worked example1420026
1101522028
1201624030

Every input, tested

Which input moves the posts needed most

Of the 5 inputs, post spacing (ft) moves the posts needed most (3 across the range tested) and fence length (ft) moves it least (2). Picket width (in), gap between pickets (in) and rails per section do not change it at all.

Fence Calculator: posts needed with each input moved on its own, every other input held at the worked-example value.
InputTested fromToPosts needed at each endSwing
Post spacing (ft)7916 to 133 (21%)
Fence length (ft)9011013 to 152 (14%)
Picket width (in)56.114 to 14none
Gap between pickets (in)0.450.5514 to 14none
Rails per section1314 to 14none

Two variables at once

Posts needed by fence length (ft) and post spacing (ft)

Across the grid the posts needed runs from 9 to 21. Moving fence length (ft) from 80 to 120 shifts it by 5 at the middle column, and moving post spacing (ft) from 6 to 10 shifts it by 7 at the middle row, so post spacing (ft) is the bigger lever here.

Fence Calculator: posts needed at each combination of fence length (ft) (rows) and post spacing (ft) (columns).
Fence length (ft) \ Post spacing (ft)6810
8015119
90161310
100181411
110201512
120211613

The highlighted cell is the worked example: 14.

Step by step

The worked example, input by input

Worked-example inputs and the results they produce for the fence calculator.
InputValue usedWhat it means
Fence length (ft)100Enter the fence length (ft) used in this calculation.
Post spacing (ft)8Distance between posts. 6 to 8 feet is common.
Picket width (in)5.5Enter the picket width (in) used in this calculation.
Gap between pickets (in)0.5Use 0 for a solid privacy fence.
Rails per section2Two for a fence up to 4 feet, three for taller fences.
Posts needed14
Pickets needed200
Rails needed26

Inputs, definitions and assumptions

Fence length (ft)

Enter the fence length (ft) used in this calculation. The prefilled worked-example value is 100.

Post spacing (ft)

Distance between posts. 6 to 8 feet is common. The prefilled worked-example value is 8.

Picket width (in)

Enter the picket width (in) used in this calculation. The prefilled worked-example value is 5.5.

Gap between pickets (in)

Use 0 for a solid privacy fence. The prefilled worked-example value is 0.5.

Rails per section

Two for a fence up to 4 feet, three for taller fences. The prefilled worked-example value is 2.

How to use this calculator

  1. 1Verify the inputs. Gather fence length (ft), post spacing (ft), picket width (in), gap between pickets (in) and rails per section from your own documents; the prefilled values are examples.
  2. 2Save a baseline. The worked example puts the posts needed at 14. Store your own version of it as Scenario A.
  3. 3Test one change. Start with post spacing (ft), the input with the biggest effect here: moving post spacing (ft) from 7 to 9 takes the posts needed from 16 to 13, a swing of 21% of the worked-example figure.
  4. 4Check the extremes. At half the example post spacing (ft) (4) the posts needed is 26; at double (16) it is 8.

People also ask

Frequently asked questions

How do you calculate fence?

Sections = ⌈length ÷ post spacing⌉; posts = sections + 1; pickets = ⌈length × 12 ÷ (picket width + gap)⌉; rails = sections × rails per section. At the worked-example inputs the posts needed is 14.

What does the fence result mean?

Turn a fence length into a shopping list before you price lumber. At the worked-example inputs the posts needed is 14. It rises with fence length (ft) and falls as post spacing (ft) increases; picket width (in), gap between pickets (in) and rails per section do not move it.

How much does fence length (ft) change the posts needed?

Holding every other input at the worked-example value, moving fence length (ft) from 80 to 120 moves the posts needed from 11 to 16, a spread of 5.

What are the limits of this fence calculator?

These are material-quantity estimates. Always add a waste and overage margin, and confirm actual coverage with your specific product and supplier before purchasing. The tables on this page test fence length (ft) only from 80 to 120; a value outside that range is not tabulated here.

Which input moves the posts needed most in the fence calculator?

Ranked by how far each moves the posts needed across the range tested: post spacing (ft) (3, 21%) and fence length (ft) (2, 14%). Picket width (in), gap between pickets (in) and rails per section do not change it.

If I double post spacing (ft) in the fence calculator, does the posts needed double?

Doubling it from 8 to 16 takes the posts needed from 14 to 8, which is 0.57 times the worked-example figure. So it falls instead of rising. Halving it to 4 gives 26.

How much does post spacing (ft) matter in the fence calculator?

The worked example uses 8. With the other inputs left at the worked example, moving post spacing (ft) from 7 to 9 takes the posts needed from 16 to 13, a swing of 21% of the worked-example figure.

How much does picket width (in) matter in the fence calculator?

The worked example uses 5.5. The posts needed does not depend on picket width (in); it moves the pickets needed from 221 to 184 instead when picket width (in) goes from 5 to 6.1.

How much does gap between pickets (in) matter in the fence calculator?

The worked example uses 0.5. The posts needed does not depend on gap between pickets (in); it moves the pickets needed from 202 to 199 instead when gap between pickets (in) goes from 0.45 to 0.55.

How much does rails per section matter in the fence calculator?

The worked example uses 2. The posts needed does not depend on rails per section; it moves the rails needed from 13 to 39 instead when rails per section goes from 1 to 3.

Which inputs change the pickets needed in the fence calculator?

At the worked-example inputs it is 200. Fence length (ft) takes it from 180 to 220, picket width (in) takes it from 221 to 184 and gap between pickets (in) takes it from 202 to 199.

Which inputs change the rails needed in the fence calculator?

At the worked-example inputs it is 26. Fence length (ft) takes it from 24 to 28, post spacing (ft) takes it from 30 to 24 and rails per section takes it from 13 to 39.

How much extra should I buy for tile waste?

10% is a common baseline for a straightforward rectangular room in a simple grid layout. Diagonal layouts, rooms with lots of cuts around fixtures, or a pattern that requires matching increase that. 15-20% is common for more complex jobs.

All home & construction questions answered

Sources and evidence

Free Calculators Online is independent and is not affiliated with or endorsed by the source organizations. Educational estimates only.

Background reading

Guides that use this calculator

Definitions

Terms used on this page

Roofing square : glossary term
A roofing-industry unit equal to 100 square feet of roof surface. Shingles and underlayment are priced and packaged by it. A typical bundle of asphalt shingles covers roughly a third of a square. So estimates are given in squares first. Conversion to bundles or rolls comes afterward, once the specific product's coverage rate is known.