Skip to the tool
makeshortwork.com Fence Calculator
PT

Fence Calculator

Enter your fence line, spacing and materials. You get the post count done properly, the short last bay shown instead of hidden, concrete per hole, and the cost per linear foot.

The fence line
The fence itself
Posts and concrete
Unit prices

Materials and cost

Total cost
Bay layout
    Counts
    Cost

    Counts are exact arithmetic on the numbers you typed, not a quote. Buy a little over on boards and concrete: the ground is never as flat as the tape says.

    Posts are bays plus one, and the error has a name

    Divide the fence length by the post spacing and you have the number of bays — the gaps between posts. You do not have the number of posts. Every bay is bounded by a post at each end, and neighbouring 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, and it is 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 arithmetic feels finished a beat before it is. It is worth knowing the name, because once you have it you start seeing 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 round and the last post is the first post — 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, because using the wrong one adds a phantom post at every corner and quietly inflates the concrete order along with it.

    Your spacing will not divide evenly, and hiding that is the second mistake

    Post spacing is a target, not a divisor. Fence lines come in whatever length the property is, and 8 ft spacing divides almost none of them. A 100 ft run gives twelve full bays and a leftover of 4 ft. A 30 m run at 2.5 m happens to come out even; move the fence 40 cm and it does not.

    A calculator that rounds this away hands you a total and lets you find the problem when you are standing at the far end with a post in your hand. You have three real options, and you should choose one on paper rather than in the dirt. Absorb the remainder by shortening every bay slightly, so a 100 ft run becomes thirteen even bays of 7 ft 8 in. Put the short bay at a corner, where the eye reads it as deliberate. Or put the short bay next to the gate, where a different width already exists and nobody notices.

    On a rectangular lot the problem multiplies: each side is set out independently from its own corner, so each side has its own remainder. Four sides, four short bays, in four different sizes. Treating the perimeter as one long line hides three of them — and gets the post count wrong too, because a corner has to be a post whether the spacing wanted one there or not. The bay layout above lists every side separately for that reason.

    Depth is what 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 wants about 2 ft below grade, which means buying 8 ft posts. A fence is a sail, and the post is a lever with its fulcrum at ground level — the buried third is the only thing resisting a whole afternoon of wind.

    Where the ground freezes, the one-third rule is a minimum and not an answer. Water in the soil expands as it freezes and grips the sides of the footing, lifting it. Do that a few dozen times and the posts have walked upward out of the ground, taking the gate out of square with them. The bottom of the concrete needs to sit below the local frost line with a margin — around 6 in is the usual figure. Enter your frost depth and the calculator will recommend 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 timber at exactly the point where the wood is weakest. Crown the concrete so it sheds outward, or leave the collar short and cap it with soil that drains.

    Concrete is a cylinder minus a post

    The volume you need is the hole minus the thing standing in it. A 12 in hole 2 ft deep is π × 0.5² × 2, about 1.57 cu ft. A 4 in square post occupies 0.22 cu ft of that, so you are actually pouring about 1.35 cu ft — a bit over two 80 lb bags, which yield 0.6 cu ft each.

    Ignoring the post overstates the order by roughly 16% with a timber post, and by a lot more with a chunky concrete or steel section. Hole diameter matters more than depth, because the volume goes up with the square of it: widening 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, which is enough concrete to spread the load without turning each post into a small foundation.

    Gates take posts, not boards

    A gate opening is a hole in your material list and an addition to your post list, and calculators routinely get both backwards.

    No boards, rails, panels or mesh cross a gate opening, so the width of every gate 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 do not have to buy.

    The posts go the other way. A gate needs two of them, and they are not line posts: the hinge post carries the entire weight of the leaf on a lever arm as long as the gate is wide, all day, forever. A 4 ft gate hanging on a post set like a line post is the single most reliable way to end up with a fence that drags on the ground by the second summer. Gate posts want 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 relative to your bays. A gate narrower than one bay adds none: it promotes two posts you were already setting. 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 cannot be there.

    Overlap means 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. This is the most common reason for a second trip to the yard on a board-on-board or shiplap privacy fence, and it compounds: the wider the overlap, the more boards per foot, and the further the estimate drifts from the truth.

    Picket fences have the same arithmetic 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 behave differently again, and it is worth being blunt about it: panels do not stretch. With panels, the panel width is your post spacing, and the last panel gets cut. You do not get to choose a nicer spacing — which is why the calculator locks the spacing field when you select panels rather than producing a material list that cannot be built.

    Sloping ground: step it or follow it

    Level ground is an assumption, not a fact, and a slope changes both the length and the method.

    Stepping keeps every panel level and drops each one a fixed amount below the last, leaving a triangular gap under each section. It is the only sensible approach with rigid prefabricated panels, and it demands longer posts than the flat calculation suggests — the downhill end of each panel is 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. It gives a continuous bottom line with no gaps, works well for animals and children, and needs a fence type whose fixings can pivot. Board-on-rail construction racks happily; welded panels do not rack at all.

    Either way, remember that 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 be short on every material at once.

    Why you finish with leftovers, or three boards short

    Estimates go wrong in predictable directions, and knowing which way yours leans is more useful than adding a flat 10% and hoping.

    Buy slightly over on boards and concrete and slightly 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 is rounded up without 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, not twelve. 100 divided by 8 is 12.5, so you need 13 bays — twelve full 8 ft bays and one short bay of 4 ft — and a straight run of 13 bays takes 14 posts. The count of posts is always the count of bays plus one on an open line, because every bay needs a post at each end and the shared ends leave one spare 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, and this is the one case where the plus-one disappears. On a closed loop the last post is the first post, so the totals are equal: a rectangle whose four sides come to 24 bays needs 24 posts. The four corners are each counted once instead of twice. This calculator switches between the two rules when you change the shape, because applying the open-line rule to 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 wants roughly 2 ft in the ground, so you buy 8 ft posts. Where the ground freezes, that rule is a floor, not an answer: 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. Take 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 that sits in it. A 12 in hole 2 ft deep is a cylinder of about 1.57 cu ft, and a 4 in square post occupies 0.22 cu ft of that, leaving about 1.35 cu ft of concrete — a little over two 80 lb bags at 0.6 cu ft each. Skipping the subtraction overstates the order by roughly 16%, which sounds harmless until it is fourteen bags you carried for nothing.

    Do gates change the material list?

    They change it in two opposite directions. A gate opening needs no boards, no rails and no mesh, so it comes off your infill length. But it still needs posts — two of them, and heavier and deeper than line posts, because a gate is a lever that spends its life trying to pull its hinge post out of the ground. A gate narrower than one bay adds no posts at all; it promotes two existing line posts to gate posts. A gate wide enough to span two bays removes the line post that would otherwise stand in the middle of the opening.