Fence posts are bays plus one, and the error has a name
Divide the fence length by the post spacing and you get the number of bays, the gaps between posts. That is not the number of posts. Every bay has a post at each end, and neighboring bays share those posts, so a run of twelve bays has thirteen posts: one after each bay, plus the one that started the line.
This is the fencepost error, one of the few construction mistakes that became a term of art in programming. Off-by-one bugs are named after this exact fence, because the math feels finished a beat before it is. Learn the name. Once you have it, you see the same missing item everywhere: the number of cuts in a board, the number of fence rails in a run, the number of nights in a trip.
The one exception is a closed loop. Fence a rectangular lot all the way around and the last post is the first post, so the shared corner absorbs the extra. A perimeter of twenty-four bays takes twenty-four posts, not twenty-five. This calculator applies the open-line rule and the closed-loop rule separately. Use the wrong one and you add a phantom post at every corner, and the concrete order quietly grows with it.
Your fence post spacing won't divide evenly, so plan the short bay
Post spacing is a target, not a divisor. Fence lines are whatever length the property is, and 8 ft spacing divides almost none of them. A 100 ft run gives twelve full bays and 4 ft left over. A 30 m run at 2.5 m happens to come out even. Move the fence 40 cm and it doesn't.
A calculator that rounds this away hands you a total and lets you discover the problem at the far end with a post in your hand. You have three real options, and you should pick one on paper, not in the dirt. You can absorb the remainder by shortening every bay a little, so a 100 ft run becomes thirteen even bays of 7 ft 8 in. You can put the short bay at a corner, where the eye reads it as deliberate. Or you can put it next to the gate, where a different width already exists and nobody notices.
On a rectangular lot the problem multiplies. Each side is laid out from its own corner, so each side has its own remainder: four sides, four short bays, four different sizes. Treat the perimeter as one long line and you hide three of them. You also get the post count wrong, because a corner has to be a post whether the spacing wanted one there or not. That is why the bay layout above lists every side separately.
Fence post depth decides whether the fence is standing in ten years
Almost every leaning fence is a post problem, and almost every post problem is a depth problem. The working rule is to bury one third of the height that will stand above ground. A 6 ft fence needs about 2 ft below grade, which means buying 8 ft posts. A fence acts like a sail, and the post is a lever with its fulcrum at ground level. The buried third is the only thing holding out against a whole afternoon of wind.
Where the ground freezes, the one-third rule is only a minimum. Water in the soil expands as it freezes, grips the sides of the footing and lifts it. Repeat that a few dozen times and the posts have walked up out of the ground, pulling the gate out of square with them. The bottom of the concrete needs to sit below the local frost line with some margin, usually around 6 in. Enter your frost depth and the calculator recommends whichever rule is deeper.
The other half of the problem is water that never freezes. A post set in a concrete collar that is dished at the top collects rain and holds it against the wood right where the wood is weakest. Crown the concrete so it sheds water outward, or stop the collar short and cap it with soil that drains.
Concrete per fence post is a cylinder minus the post
The volume you need is the hole minus what stands in it. A 12 in hole 2 ft deep is π × 0.5² × 2, about 1.57 cu ft. A 4 in square post takes up 0.22 cu ft of that, so you actually pour about 1.35 cu ft. That is a bit over two 80 lb bags, which yield 0.6 cu ft each.
Ignore the post and you overstate the order by roughly 16% with a wood post, and by a lot more with a chunky concrete or steel section. Hole diameter matters more than depth, because volume grows with its square. Going from 10 in to 12 in adds 44% to every hole on the job. The usual guidance is a hole about three times the post width. That is enough concrete to spread the load without turning each post into a small foundation.
Fence gates take posts, not boards
A gate opening takes material off your list and adds to your post list. Calculators routinely get both backwards.
No boards, rails, panels or mesh cross a gate opening, so every gate's width comes off the length that needs infill. On a 100 ft fence with a single 4 ft gate you are boarding 96 ft, and at 4½ in of coverage per board that is eleven boards you don't have to buy.
Posts go the other way. A gate needs two, and they are not line posts. The hinge post carries the full weight of the leaf on a lever arm as long as the gate is wide, all day, for as long as the fence stands. Hang a 4 ft gate on a post set like a line post and you will almost certainly have a gate dragging on the ground by the second summer. Gate posts need a bigger section, a wider hole and more depth. The calculator adds extra depth to them by default and prices them separately.
Whether a gate adds posts depends on its width compared with your bays. A gate narrower than one bay adds none. It turns two posts you were already setting into gate posts. A gate wide enough to span two bays actually removes one, because the line post that would have landed in the middle of the opening can't be there.
Fence board overlap: a board covers less than it measures
A 5½ in board with 1 in of overlap covers 4½ in of fence. Order by nominal width and you finish about 18% short. On a board-on-board or shiplap privacy fence this is the most common reason for a second trip to the lumberyard, and it compounds. The wider the overlap, the more boards per foot, and the further the estimate drifts from the truth.
Picket fences run the same math in reverse. A 3½ in picket with a 2 in gap covers 5½ in per board, so you need fewer than the nominal count. Enter the gap as a negative overlap and the coverage figure updates to match.
Prefabricated panels work differently again, and there is no way around it: panels do not stretch. With panels, the panel width is your post spacing, and the last panel gets cut. You don't get to pick a nicer spacing. So the calculator locks the spacing field when you select panels, instead of producing a material list nobody can build.
Fencing on sloping ground: step it or follow it
Don't assume the ground is level. A slope changes both the length and the method.
Stepping keeps every panel level and drops each one a fixed amount below the last, which leaves a triangular gap under each section. It is the only sensible method with rigid prefabricated panels, and it needs longer posts than the flat calculation suggests. The downhill end of each panel sits higher above the ground than the uphill end, so the post has to cover the step as well as the fence height.
Racking, or raking, lets the rails follow the ground while the boards stay vertical. You get a continuous bottom line with no gaps, which works well for animals and children, but the fence type has to have fasteners that can pivot. Board-on-rail construction racks easily. Welded panels don't rack at all.
Either way, the length you walk on a slope is longer than the length on a plan. Measure along the ground, not across the map, or you will come up short on every material at once.
Why a fence job ends with leftovers, or three boards short
Estimates go wrong in predictable directions. Knowing which way yours leans is worth more than adding a flat 10% and hoping.
- Running short on posts almost always means the plus-one got dropped, or a corner post was never counted because the spacing didn't call for one.
- Running short on boards almost always means overlap was ignored, or the run was measured on a plan instead of along the slope.
- Running short on concrete usually means the holes came out wider than planned. Post hole diggers wander in loose soil, and a hole that drifts from 10 in to 14 in needs nearly double the concrete.
- Leftover boards usually mean gate widths were never subtracted, so you bought infill for openings that have none.
- Leftover posts usually mean a closed loop was calculated as an open line, adding one post per corner.
Buy a little over on boards and concrete, and exact on posts. Boards get culled for warp and split ends, concrete disappears into holes that turned out bigger than they looked, and a spare post is a long, heavy, expensive thing to store. Everything on this page is arithmetic on the numbers you typed. It runs entirely in your browser, nothing is uploaded, and no quantity gets rounded up without the tool telling you where the rounding happened.
Frequently asked questions
How many posts do I need for a 100 ft fence with 8 ft spacing?
Thirteen bays, which means fourteen posts. 100 divided by 8 is 12.5, so you need 13 bays: twelve full 8 ft bays and one short bay of 4 ft. A straight run of 13 bays takes 14 posts. On an open line the post count is always the bay count plus one, because every bay needs a post at each end and the shared ends leave one extra at the far end. Dividing the length by the spacing gives you the bays and quietly loses that last post.
Does a closed rectangular fence also need the extra post?
No. This is the one case where the plus-one disappears. On a closed loop the last post is the first post, so posts and bays are equal: a rectangle whose four sides add up to 24 bays needs 24 posts. Each of the four corners gets counted once instead of twice. This calculator switches between the two rules when you change the shape, because using the open-line rule on a loop adds a phantom post at every corner.
How deep should fence posts go?
Bury about one third of the height that stands above ground. A 6 ft fence needs roughly 2 ft in the ground, so buy 8 ft posts. Where the ground freezes, treat that rule as a minimum. The bottom of the concrete has to sit below the local frost line, usually with about 6 in of margin, or frost heave will lift the posts and never put them back. Go with whichever number is deeper. Gate posts go deeper still.
How much concrete does one post hole take?
The volume of the hole minus the volume of the post in it. A 12 in hole 2 ft deep is a cylinder of about 1.57 cu ft, and a 4 in square post takes up 0.22 cu ft of that, leaving about 1.35 cu ft of concrete. That is a little over two 80 lb bags at 0.6 cu ft each. Skip the subtraction and you overstate the order by roughly 16%. Sounds harmless, until it is fourteen bags you carried for nothing.
Do gates change the material list?
Yes, in two opposite directions. A gate opening needs no boards, no rails and no mesh, so its width comes off your infill length. It still needs posts, though: two of them, heavier and deeper than line posts, because a gate is a lever that spends its whole life trying to pull the hinge post out of the ground. A gate narrower than one bay adds no posts at all. It turns two existing line posts into gate posts. A gate wide enough to span two bays removes the line post that would otherwise stand in the middle of the opening.