All tools
Math & Everyday

Fence Calculator

Posts and rails needed for a fence run, from total length and post spacing.

🔒 Runs entirely in your browser — nothing here is ever uploaded

About the Fence Calculator

Calculates the number of posts and rails needed for a straight run of fence, from the total length and post spacing.

100% Free Runs in Your Browser No Sign-Up Required
How to use it
  1. Enter the total fence length.
  2. Enter the post spacing — 8ft is standard for wood/vinyl/composite, up to 10ft for chain link.
  3. Optionally enter rails per section.
  4. Read the posts, sections, and rails needed.
Formula
Sections = ceiling(total length ÷ post spacing). Posts = sections + 1. Rails = sections × rails per section.
Worked example

A 100ft fence run at 8ft post spacing with 3 rails per section: 13 sections, 14 posts, and 39 rails.

Typical post spacing by fence type
Typical post spacing by fence type
Fence typeTypical spacing
Wood / vinyl / composite (solid)8 ft
Chain linkUp to 10 ft
Wire / barbed wire (open)10-12 ft, less on slopes
Interpreting your result

This models one straight run of fence only — it does not account for corners (each needs its own post), gates (need dedicated, more heavily-set posts), or slopes/uneven terrain (commonly need closer spacing).

Recommendations
  • Add one post per corner beyond this calculator's straight-run count.
  • Gates need two dedicated, more heavily-set posts sized to the gate's weight.
  • Sloped or uneven terrain commonly needs closer-than-standard spacing.
Frequently asked questions
A fence needs a post at both ends of every gap between posts.