Fencing Calculator

Posts Needed

14

The Numbers

  • Rail Sections: 13
  • Total Rails Needed: 39
  • Recommended Posts to Buy: 15 (including a spare)

Project Analysis

  • Project size: small yard section or garden enclosure.

Recommendations

  • Setting posts in concrete keeps them from shifting over time — see how much you'll need with the Concrete Calculator.
  • Compare a gravel base or ground cover for the surrounding area with the Gravel Calculator.
  • Check local property line and permit requirements before digging post holes.

Compare Calculations

Downloads

Includes your inputs and results for this calculation, plus any additional calculations you've compared.

How This Calculator Works

A straight fence run needs one more post than the number of spans between posts. Enter your fence’s total length and how far apart you want the posts (a common range is 6-8 feet), and this calculator returns exactly how many posts, rail sections, and rails to buy.

The Formula

Spans=Fence LengthPost Spacing\vD{\text{Spans}} = \left\lceil \frac{\vA{\text{Fence Length}}}{\vB{\text{Post Spacing}}} \right\rceil

Rounded up, since a fence can’t use a fractional span.

Posts Needed=Spans+1\vE{\text{Posts Needed}} = \vD{\text{Spans}} + 1 — the same reason a fence line with 3 gaps between posts needs 4 posts, not 3: each interior post is shared by the span on either side of it, but the two end posts each belong to only one span.

Rail Sections=Posts Needed1\vF{\text{Rail Sections}} = \vE{\text{Posts Needed}} - 1

Total Rails Needed=Rail Sections×Rails per Section\text{Total Rails Needed} = \vF{\text{Rail Sections}} \times \vC{\text{Rails per Section}} (2 rails is common for a simple rail fence, 3 for a taller privacy fence)

Recommended Posts to Buy=Posts Needed+1\text{Recommended Posts to Buy} = \vE{\text{Posts Needed}} + 1 — a small one-post buffer for a damaged post or a miscount, the same waste-margin philosophy used elsewhere on this site, just as a fixed spare rather than a percentage since posts are large discrete units.

Worked Example

A 100 ft fence with posts every 8 ft, using 3 rails per section:

  1. Spans: 100÷8=12.5\vA{100} \div \vB{8} = 12.5, rounded up to 13\vD{13} spans.
  2. Posts needed: 13+1=14\vD{13} + 1 = \vE{14} posts.
  3. Rail sections: 141=13\vE{14} - 1 = \vF{13} sections.
  4. Total rails needed: 13×3=39\vF{13} \times \vC{3} = 39 rails.
  5. Recommended posts to buy (with a spare): 14+1=15\vE{14} + 1 = 15 posts.

Source: The Fencepost Error (N Spans Need N+1 Posts).

Frequently Asked Questions

How far apart should fence posts be?

Post spacing commonly ranges from 6 to 8 feet, depending on the fence material and height — check your specific fencing product's instructions, since taller or heavier panels may need closer spacing for adequate support.

Why does the calculator recommend one extra post?

A small buffer beyond the exact count needed is common practice — it covers a damaged post, a measurement error, or a small layout adjustment without a second trip to the supplier.

How many rails does a fence need?

Two horizontal rails per section is common for a simple rail fence, while taller privacy fences often use three for added rigidity — enter whichever matches your fence design.