Skip to main content
Fence Calculator

How Many Posts Do You Need for a Fence

The correct way to count fence posts without double counting corners, plus how gates add posts on top of the rest of the run.

Published 2 min read

Post count is the single easiest fence quantity to get wrong by hand, and the mistake almost always comes from one of two places: forgetting the extra post at the end of a run, or counting a corner post twice, once as a corner and once as a line post.

The correct formula

sections = ceil(run / spacing)
posts along the run = sections + 1
line posts = (posts along the run) - corner posts - end posts
gate posts = 2 x number of gates
total posts = line posts + corner posts + end posts + gate posts

The key detail: corner and end posts are a subset of the posts along the run, not additional posts on top of it. A rectangular yard with 4 corners has 4 of its “posts along the run” positions occupied by corner posts; the rest are line posts.

Worked example

A 200 foot perimeter with 4 corners, no separate end posts, one 4 foot gate, and 8 foot spacing:

gate deducted: 200 - 4 = 196 ft of fence run
sections = ceil(196 / 8) = 25
posts along the run = 26
line posts = 26 - 4 corners = 22
gate posts = 2
total posts = 22 + 4 + 2 = 28

Without correctly subtracting the gate first, or without treating corners as a subset rather than an addition, it is easy to land on a number a few posts off in either direction, small on paper but real money in lumber, hardware and concrete.

Get the exact count without doing the arithmetic

The fence post calculator runs this exact logic for your length, spacing, corner count, end count and gates, and shows line, corner, end, gate and total posts separately. Once you know post count, the fence post concrete calculator turns it into a bag count.

Related reading: how far apart should fence posts be, how deep should a 6 foot fence post be, how many bags of concrete per fence post.