Fence post spacing calculator
Fence posts are set at even spacing, which means the spacing you plan is rarely the spacing you get: 100 ft divided into 8 ft bays gives 12.5 bays, so you either add a post or accept a shorter last bay. This calculator adds the posts needed and then reports the even spacing that actually divides the run.
Straight runs only. Corners, gates and changes in direction each need their own calculation, and gate posts are usually a heavier section than this suggests.
Even spacing matters more than it sounds. Uneven bays are visible from the street, they put unequal load on the rails, and they make gate openings awkward. The standard approach is to take the run length, divide by the maximum spacing, round up to the number of bays, then divide again to get the real spacing — which is always equal to or less than the maximum.
Eight feet is the usual maximum for a wood fence with two rails, and it assumes a post buried a third of its length in compacted ground. Six feet is safer for anything over 5 ft tall, and for fences on exposed ground where wind load is the thing that breaks posts rather than age.
How the calculation works
Posts = ceil(run length ÷ maximum spacing) + 1, because a run of n bays needs n + 1 posts. Even spacing = run length ÷ (posts − 1). Rails = sections × rails per section × even spacing in linear feet.
- Posts sit at both ends of the run; gate posts and corner posts count as posts but carry different loads and may need to be larger.
- The run is straight. Each corner adds a post that serves two directions, and a curved run should be calculated in segments.
- Rail material is counted as linear feet of rail, not as purchased lengths; add 5-10% for cuts and waste when ordering.
- Post depth and concrete are not calculated here — a common rule is one third of the post length buried, in a hole twice the post's width.
Sources: Conventional maximum post spacing: 8 ft for wood fences up to 5 ft with two rails; Post depth rule of thumb: one third of post length buried
Worked examples
A 100 ft run at 8 ft spacing
100 ÷ 8 = 12.5, so 13 bays and 14 posts. The even spacing becomes 100 ÷ 13 = 7.69 ft, which is what you should mark out rather than 8 ft.
A 48 ft run at 8 ft spacing
48 ÷ 8 = 6 exactly, so 7 posts and 8 ft spacing with no adjustment — the case where the planned spacing works out.
Questions
How far apart should fence posts be?
8 ft for a standard wood fence up to 5 ft tall with two rails. Use 6 ft for taller fences, for wind-exposed sites, or for heavy panels and gates.
How many posts for a 100 ft fence?
14 at 8 ft spacing, which gives 13 bays at 7.69 ft each. At 6 ft spacing it would be 18 posts.
How deep should posts be set?
About one third of the post's above-ground height, so 2 ft for a 6 ft fence, in a hole roughly twice the post's width, with the bottom on undisturbed soil or gravel.
Should gate posts be bigger?
Yes. A gate post carries the swing of the gate and should be at least 4x4 for a 3 ft gate and 6x6 for anything wider, set deeper than the line posts.
Do I add a post at the end of the run?
Yes. Both ends need a post, which is why the formula adds one after rounding up the bays.
Related calculators
Embed this calculator. Paste this on your own site — it stays in sync with updates here:
<iframe src="https://s06.nl/tools/home/fence-post-spacing/embed/" width="100%" height="520" style="border:1px solid #ddd" loading="lazy" title="Fence post spacing calculator"></iframe><p><a href="https://s06.nl/tools/home/fence-post-spacing/">Fence post spacing calculator</a></p>