Fence post calculator
Calculate line posts, corner posts and end posts from run length and spacing, with concrete for each post included in the take-off.
Fence calculator
Enter your specs. Every result updates live and shows its formula.
Overview
This calculator counts the posts themselves: line posts set by your spacing, corner posts wherever the run changes direction, and an end post for a segment that has no corner to terminate against. Concrete for setting every post is rolled into the same take-off.
Not every fence shares one post spacing. Wood privacy commonly runs 8 feet and this calculator defaults to it, but chain link typically runs 10 feet, so the spacing control stays fully editable regardless of material choice.
Assumptions
- Posts are counted as line posts from the spacing plus corner and end posts for each open segment.
- Spacing defaults to 8 feet for wood-style builds, 10 feet for chain link, and stays editable.
- Concrete is computed for every post using the hole diameter and hole depth in the advanced settings.
Common mistakes
- Forgetting corner posts and end posts, which add to the total beyond the pure spacing math.
- Using one post spacing for every material, when chain link and some panel systems are designed for wider spacing than wood.
- Rounding the post count down on a run that does not divide evenly, which leaves a wobbly span at the end.
Fence calculation formulas
The same math the calculator runs, in plain terms. Nothing here is a black box.
-
Sections
sections = max(ceil(effective run / post spacing), 1)
-
Post count
posts = (sections + 1) along the run, minus named corner and end posts already placed, plus 2 gate posts per gate
-
Effective run
effective run = total length - sum of gate widths
-
Rail count
total rails = sections x rails per section
-
Picket count
pickets = ceil(run in inches / (picket width + gap)); total = ceil(raw x (1 + waste %))
-
Board-on-board pitch
pitch = picket width - 1 in overlap
-
Panel count
full panels = floor(run / panel width); add 1 cut panel if the remainder is over 0.01 ft; total = ceil(raw x (1 + waste %))
-
Concrete volume
per-hole = pi x (diameter / 2)^2 x depth; total = per-hole x posts; bags = ceil(total / bag yield)
-
Slope-adjusted run
slope run = effective run / cos(atan(slope % / 100)); shown alongside, counts use the flat run
-
Cost
materials = (posts x post price + rails x rail price + infill x unit price + 60 lb bags x bag price) x regional multiplier; labor = effective run x labor per ft x terrain multiplier x regional multiplier; installed total = materials + gate hardware + removal + permit + labor
Every number the calculator shows comes from these formulas applied to your inputs.
Next step
- Fence post depth calculator Get the right embedment depth for a fence post from frost line and above-ground height, so corner posts hold and winter frost cannot heave them.
- Concrete bags calculator Turn hole diameter, depth and the number of holes into a bag count for 50, 60 and 80 pound mixes, with the volume math shown.
Related calculators
- Fence cost calculator Estimate total fence cost from run length, height and your local material and labor rates, with the budget math shown.
- Privacy fence calculator Calculate posts, rails and pickets for a solid privacy fence in any material, with a zero-gap board layout by default.
- Wood fence calculator Calculate posts, rails, pickets and concrete for a pressure-treated pine, cedar or redwood fence. Every formula shown, cost optional.
Related reading
In-depth guides
Buying guide
A fence post calculator answers a narrower question than a full material list: how many posts does this specific run need, and where do the extra ones go. Line posts come from dividing the run length by your spacing and rounding up, but a plain division misses the posts a real layout needs at every corner and at every open end. This tool adds those in separately, which matters because a yard with two corners and three straight runs needs more posts than three independent straight-line counts would suggest on their own. Spacing itself is not one fixed number across every material: wood privacy commonly runs on an 8 foot interval, while chain link is typically laid out at 10 feet because the fabric and top rail carry tension differently than board and rail construction does. Panel systems sold in fixed widths narrow the choice further, since the post spacing has to match the panel length exactly rather than whatever interval looks convenient on paper. The guide on how many posts a fence actually needs walks through the same math with a few worked yard shapes if you want to see the rounding logic applied before you commit to a number.
Spacing choice is where most of the real judgment calls live, and it is worth getting right before you dig the first hole. Going wider than a material's design spacing saves on posts and concrete up front, but it loads more weight onto each remaining post, which tends to show up later as rail sag or a line post leaning out of plumb after a few seasons of wind and frost cycles. The reverse, tightening spacing below what a design calls for, is harmless structurally but adds posts and footings nobody asked for. The post spacing reference lays out the common ranges by material side by side, and if your run has to turn a corner partway through, the corner and end post guide covers why those posts are typically a size up from the line posts between them, since a corner post takes load pulling in two directions instead of one.
Every post this calculator counts also needs a footing, and that is deliberately kept in the same output rather than treated as a separate step later. Hole diameter and depth feed a concrete estimate alongside the post count, because ordering posts without ordering concrete only produces half a shopping list. For the footing side of the math, pair this tool with the fence post depth calculator to settle how deep each hole needs to go for your frost line and post height, then run the concrete bags calculator on the result to convert that hole volume into a bag count for whichever bag size you can actually carry and mix on site. The post depth and setting guide walks through both of those decisions together, which is worth reading end to end if you are setting posts for the first time and want the reasoning behind the numbers, not just the numbers themselves.
Posts are rarely the only line item a project needs priced, and a grade change adds another variable to the spacing decision. If you are working with a yard that is not flat, the sloped yard guide explains how post count and spacing interact with racked or stepped panels on a hill, which shifts the math slightly away from a flat-run count. Once post count and footing numbers are settled, most people move on to the fence cost calculator to put a dollar figure on the full project, or to a material-specific tool like the privacy fence calculator or the wood fence calculator to add rails and pickets on top of the posts this page counts. The rest of the footing and foundation tools, including gravel and retaining wall math, sit together under the foundation calculators category.
Buying margin is worth building into the post count before ordering, not after a mid-project trip to the lumberyard. A broken post during setting, a rotten bottom discovered only once the old fence comes down, or a last-minute decision to add a gate are all common enough that ordering one or two extra posts beyond the calculated total is standard practice, especially for pressure-treated lumber where a visibly twisted or checked piece is sometimes mixed into a bundle. Gate openings also change the post count directly rather than through the spacing input: a gate needs its own pair of posts sized for hinge and latch hardware, typically heavier than the line posts on either side of it, and that pair should be counted separately from the spacing-based line post total this calculator produces. None of that changes the underlying math, it just means the number on screen is a floor for ordering purposes rather than the exact count to buy. For a project that also needs hardware and gate-specific posts sized correctly, pairing this calculator with a gate-focused tool keeps the whole post order consistent before the first hole gets dug.
Frequently asked questions
How many posts do I need for 100 feet of fence?
Divide the run by your spacing and add one for the end: at 8 foot spacing that is 13 posts for a straight 100 foot run (100 divided by 8 rounds up to 13), plus a corner or end post wherever a segment terminates without a corner.
What spacing should I use between posts?
8 feet is the common spacing for wood privacy and most board builds, and 10 feet is typical for chain link. The exact recommendation also depends on post size and material strength, so this calculator defaults to your material's norm and lets you change it.
Are corner posts counted separately from line posts?
Yes. A 90 degree corner uses a corner post sized and set to take tension from both directions, which is why this calculator counts corner and end posts on top of the line post spacing math.
What post size does a residential fence need?
A 4 by 4 post is the common minimum for wood privacy up to about 6 feet. Taller or panel-loaded runs often step up to 4 by 6 or 6 by 6, and chain link uses schedule-40 pipe sized to height and spacing; follow the manufacturer table for your load.
How many concrete bags does each post need?
It depends on the hole and the bag size. A common 10 inch by 24 inch hole with a 4 by 4 post takes roughly 2 to 3 bags of 60 lb mix with this calculator's volume math, which is why it reports 50, 60 and 80 lb counts together.
Should I set fence posts in concrete or gravel?
Concrete gives the most rigid setup and is the usual residential choice; gravel backfill drains better and can work in sandy or rocky ground where concrete would heave or crack. Use the post depth and setting guide for a full comparison.
How deep should a fence post be set?
A widely used rule is at least one third of the above-ground height, so a 6 foot post sets 24 inches or so, plus enough to stay below your local frost line. The depth calculator turns those two rules into one number per post.
Why does the calculator add concrete to the post count?
Because setting is part of the install cost. Your take-off is only honest when the bags per footer are in the same page as the posts themselves, which is exactly how this tool and the full fence calculator behave.