A fence has three line items — posts, panels, gates — and all three fall out of one number that is not on your tape measure: sections. Most people work from the wrong end. They eyeball how many panels look right along the property line, buy that many, and find out at the last hole that they are one post short. That is not bad luck; that is arithmetic, and it has a name.
The other half of the job is underground. What holds a fence up is a hole, a buried post, and two to five bags of concrete per post, multiplied by a post count most people never work out before the store run. Get the section math right first and the posts, the panels, the gate hardware and the concrete pallet all come off it.
Sections first, then everything else
Three lines run the whole job:
- sections = total length ÷ post spacing, rounded UP
- posts = sections + 1 + corners
- panels = sections − gates (never below 0)
The rounding matters. A part-section is still a section: it needs a post at its far end and something spanning it, so 12.5 becomes 13 and never 12.
The + 1 is the fencepost problem, and it is the single most common miscount in fencing. A run of N sections always has N + 1 posts, because both ends need one. Five sections, six posts. Thirteen sections, fourteen posts. If your materials list has as many posts as sections, you are short one.
A 100 ft run, worked
Take the standard case: 100 feet of fence at 8 ft spacing with one gate.
- Sections: 100 ÷ 8 = 12.5 → 13
- Posts: 13 + 1 = 14
- Panels: 13 − 1 gate = 12
Now tighten the spacing to 6 ft on the same 100 feet and the whole list moves: 17 sections, 18 posts, 16 panels. Four extra posts, four extra holes, four extra sets of concrete — for exactly the same length of yard. That is the real cost of spacing, and it is why the decision comes before the shopping list.
Six feet or eight?
If you are buying prefab panels, the decision is already made for you. Panels come in fixed widths and the posts have to land on their ends. Eight-foot panels mean eight-foot spacing, full stop — there is no fudging a 6 ft post interval into an 8 ft panel.
Building stick-style with rails and pickets, you get to choose, and the trade is simple. Eight feet is the economical standard: maximum coverage per post and per hole. Six feet buys stiffness: shorter spans flex less in wind, sag less under wet pickets, and stand up better to a dog that leans on the fence every afternoon. Go with 6 ft for tall privacy fences on open, gusty sites and for heavy material like wet-climate cedar. For a typical backyard run, 8 ft is fine.
Free calculator
Fence Calculator
Posts, panels, and gates for any run — with spacing and corner math done right.
Open the fence calculatorCorners and gates pull in opposite directions
Real yards are not straight lines, and the two things that bend them affect the count differently.
A corner adds a post and no section. It ends one straight run and starts another, which costs one extra post beyond the simple line math. Take a 200 ft run at 8 ft spacing: 200 ÷ 8 = 25 sections, so 26 posts for a straight shot. Make it an L-shaped yard with one corner and it is 27. A U-shape with two corners is 28. Run the same 200 feet at 6 ft spacing instead and you are at 34 sections and 35 posts.
A gate removes a panel and no post. The gate hangs between the same two posts a panel would have occupied — it substitutes for the panel, not the structure. So that 200 ft straight run with two gates still needs 26 posts, but only 23 panels.
If anything, gates make those posts work harder. A swinging gate cantilevers its entire weight off the hinge post, so gate posts are commonly upsized to 6 × 6 instead of 4 × 4, set deeper, and given an extra bag of concrete. Count them in the post total, then treat them as a separate spec line.
Depth is the fence
Here is the rule that decides whether your fence is standing in five years: set one-third of the post's total length in the ground, with 24 inches as the hard floor, and below your local frost line in cold climates — that is 36 to 48 inches across the northern US, and your county will have the exact figure.
This is why a 6 ft privacy fence is built from 8 or 9 ft posts: six feet showing, two to three feet buried. It looks like an expensive way to buy lumber until you understand the failure mode. Wind load works on a fence panel like a sail, and an 18-inch footing simply loses that fight within a few seasons. Leaning fences are almost never a panel problem. They are a depth problem.
Concrete: the line item everyone underestimates
Treat these as working estimates and check them against the chart on your bag. A 4 × 4 post in a 10-inch-diameter hole 2 ft deep takes about two 50 lb bags of fast-setting mix. A 6 ft privacy-fence post in a bigger hole runs three to four, and at a 12-inch hole 30 inches deep, four to five.
Multiply that by the post count before you leave the house. The 14-post example above lands at roughly 28 to 35 bags — a pallet-cart trip in its own right, and the reason so many fence projects turn into two trips. Fast-setting mix goes into the hole dry around the braced post and takes water on top; no mixing tub, no wheelbarrow. If you are setting a run big enough that you would rather batch it, the same volume math applies as for any other concrete pour.
Free calculator
Setting posts, footings, or a slab?
The volume formula, bags versus ready-mix, and the PSI to specify for footings and posts.
Read the guideBefore you dig anything: call 811
Call 811 a few days before you dig. Utility locating is free; hitting a gas or fiber line is not, and every post hole is a small excavation with a 2 ft minimum depth. Make the call, then spend the wait staking the line and running string along it. Measuring along the string is how the pros get honest lengths on sloped or curved yards, where a tape laid on the ground reads long and a pace count reads whatever you want it to.
The leftover section at the end
A 100 ft run at 8 ft spacing ends in a half-width section. That is normal and it is not a mistake in the math — 12.5 rounds up because that half still needs a post and a span. Most people fill it by cutting one panel down rather than ordering a custom width, which is why you should buy panels last: measure the remainder on site, then cut.
Common mistakes to avoid
- Ordering posts equal to sections — the +1 exists because both ends need a post.
- Forgetting corner posts — every corner is one more post, and no extra section.
- Buying panels that do not match the spacing — the panel width sets the spacing, not the other way around.
- Underbuying concrete — two bags per post is the floor, not the average.
- Setting posts shallower than 24 inches or above the frost line, which is the cause of nearly every leaning fence.
- Treating gate posts as line posts — upsize them, set them deeper, add a bag.
Walk the line with a measuring wheel, add every side together, and let the section count do the rest. Match your spacing to the panels you are actually buying, count corners separately, and buy concrete for the posts you have rather than the ones you remember. Once the fence is up, the yard inside it is the next project — new grass or a topsoil leveling pass on ground that a post-hole digger has just been through.
Free calculator
Get your exact post, panel and gate count
Enter your run length, spacing, gates and corners — the calculator handles the round-up, the +1 and the corner posts for you.
Open the fence calculator