Home projects
How Many Fence Posts Do I Need?
Fence posts are the count everyone gets wrong, by exactly one. Here is the fencepost error, the spacing decision, and the three counts a wood fence needs.
There is an off-by-one error so common that computer science named it after a fence. Ask someone how many fence posts a 100-foot run needs at 8-foot spacing and most will divide and say thirteen. The fence they build with thirteen posts ends four feet early.
A fence is three counts — posts, rails, pickets — and each has its own arithmetic. The posts are where the famous mistake lives, so start there.
The fencepost error
A run of fence is sections strung between posts, and n sections have n + 1 boundaries. Both ends need a post:
sections = ceiling( 100 ft ÷ 8 ft ) = 13
posts = 13 + 1 = 14
Divide-and-stop gives 13 — one short, every time, regardless of the length. Programmers know this as the fencepost error and it produces real bugs in real software for exactly the same reason it produces a second trip to the lumber yard: the boundary count and the interval count differ by one, and intuition reaches for the wrong one.
The fence calculator does the counts properly, but the principle is worth owning: corners and gates add posts too. An L-shaped run is two straight runs sharing a corner post, and every gate needs a post on each side — one usually beefier, since it carries the hinges.
Rails and pickets
Rails multiply by the section count: two per section carries fences to about five feet, and a six-foot privacy fence wants three, because pickets fastened at only two points cup and twist as they dry. On our 13-section run, three rails is 39.
Pickets divide the length by the picket pitch — face width plus gap:
pickets = 100 ft × 12 ÷ (5.5 in + 0) = 219
Two details decide whether that number is right. First, actual width, not nominal: a "1×6" picket measures 5.5 inches, and calculating with 6 shorts the order by nearly 10% — the same nominal-lumber trap covered in how many deck boards you need. Second, the gap. Privacy fences butt tight (and the wet pickets will still open small gaps as they shrink); picket styles run 1.5–2.5 inches, and every inch of gap is pickets you do not buy.
Spacing is a wind decision, not a cost decision
Eight feet is the standard spacing because rails come in 8 and 16-foot stock. But a solid privacy fence is a sail — six feet tall and a hundred long is 600 square feet of wind load, and the posts are the only thing resisting it.
In gusty country, six-foot spacing is the cheap insurance: a couple more posts and rails, and the fence that stands straight in year twenty instead of leaning in year three. Semi-private styles with gaps shed wind and can stay at eight. Whatever the spacing, the posts want to go a third of the fence height into the ground and below the frost line, set in concrete — roughly two 50-pound bags per post, which on a 14-post run is its own trip. The bag-versus-truck arithmetic is the same as any small pour, covered in how to calculate concrete in cubic yards, and the concrete calculator handles anything bigger than post holes.
What the material count leaves out
- Gates are small carpentry projects, not fence-by-the-foot — frame, hinges, latch, and a stouter hinge post. Price each one separately.
- Fasteners must be rated for treated lumber. Modern treatment chemistry eats ordinary zinc screws, and the fence outlasting its fasteners is not a hypothetical.
- Post caps and stain. Water enters through end grain — cut tops and bottoms — so caps and a sealed first coat are where the service life hides.
- Slope. A run downhill is either stepped (horizontal sections, gaps under the low ends) or racked (rails follow the grade). Both add cuts and waste a few pickets; neither is free.
The two calls before any digging
Your building department, or HOA. Fence height limits, front-yard rules and property-line setbacks are municipal, and they are enforced most reliably by the neighbour who dislikes the fence. Confirm the line from your survey — not from the old fence, which being in the wrong place is precisely how these disputes start.
811. The national dig-safe line marks buried utilities for free, it is generally required by law before digging, and a post hole through a gas service is the most expensive fence upgrade on the market. Two days of notice is the usual requirement.
Neither call costs anything, and both are cheaper than the alternative by several orders of magnitude. While you wait for the marks, stage the material: posts want a day or two to acclimate, and checking the picket count against the delivery slip before the truck leaves beats discovering a short bundle on assembly day.
The whole-yard picture
A fence rarely travels alone. The lawn inside it is the sod vs seed calculator's territory — and sod vs seed walks the cost comparison — while a gravel path along the fence line is priced by the ton in the gravel calculator. Running the whole project's numbers before the first post hole is how the budget survives contact with the yard.
For what the treatment ratings on the lumber tag actually mean, the American Wood Protection Association publishes the standards US treated lumber is graded against — worth a look before paying the premium for ground-contact stock, which the posts genuinely need and the pickets genuinely do not.