Fence Calculator
A fence run needs one post per section plus one to close the end. Enter the length and post spacing for the posts, sections, and rails on a straight run.
Posts
14posts
- Sections (panels)
- 13 sections
- Rails
- 26 rails
How these numbers are worked out
The formula
Sections = ⌈ length ÷ post spacing ⌉ (round up, since the last section can be short), and posts = sections + 1 — the +1 is the post that closes the far end. Rails = sections × rails per section. This is a straight run; corners, gates, and ends add posts.
Constants and sources
- Posts = ⌈length ÷ spacing⌉ + 1 (standard straight-run layout). Rails = sections × rails per section. Geometry only.
How it was checked
Last reviewed . Before this calculator was published, its formula, constants and worked example were checked in a separate, AI-assisted review that redid the arithmetic and tested the factual claims; the site owner then approved it for publishing. No engineer or tradesperson reviews these pages. Where a figure depends on the product (a density, a coverage rate, a bag size), it is either an input you can change above or a fixed planning value stated on this page, so check it against your product's label or your supplier.
Spot a wrong number or an outdated figure? Send a correction.
Worked example
A 100 ft fence at 8 ft spacing: ⌈100 ÷ 8⌉ = 13 sections, + 1 = 14 posts. With 2 rails per section, 13 × 2 = 26 rails.
FAQs
- How far apart should fence posts be?
- 6 to 8 feet on center is standard for wood fence — 8 ft is common, 6 ft is sturdier for tall privacy fence or windy sites. Pre-made panels fix the spacing, so match it to the panel width.
- Does this count corner and gate posts?
- No — it's the post count for one straight run. Add a post at each corner and on both sides of every gate, and split long runs at corners. Gates also need heavier posts.
- How deep should the posts go?
- Set posts about a third of their above-ground height deep, and below your local frost line, in concrete. That depth isn't part of the count here — check your local code.