Fence Post Spacing Calculator
Find the number of fence posts and the hole depth for a fence run, from the total length, target post spacing, and post height.
Reviewed by the ToolNestr Editorial Team — July 2026
How the fence post spacing calculator works
Posts break a fence run into equal bays, so the number of posts is the run length divided by your target spacing, rounded up, plus one extra post to close both ends. Dividing that same length by the actual post count gives the real, evenly divided spacing, which is usually a little tighter than your target since posts rarely divide a run perfectly.
Hole depth follows three rules at once, and the calculator uses whichever is deepest. A common carpentry rule buries one-third of the total post length. Most residential codes also set a practical minimum around 24 inches. And critically, the hole should reach below the local frost line, the depth to which the ground freezes in winter, so freezing and thawing soil cannot slowly heave the post loose.
Frost depth follows IRC foundation frost-protection guidance and varies enormously by region, from near zero in warm climates to 48 inches or more in the coldest parts of the country — check your local building department for the figure that applies to you, since using a generic number can leave a post too shallow.
Minimum footing depth relative to the frost line follows IRC Table R403.1(1) and local building-department frost-depth maps; the one-third-of-post-length rule is a widely used residential carpentry guideline.
Enter the run
Total fence length and your target spacing, both in feet.
Set post and frost depth
Post length in feet and your local frost depth in inches.
Read post count and depth
Get posts, real spacing, hole depth, and finished fence height.
The formula explained
Post count
= ceil(length ÷ spacing) + 1. A 100 ft run at 8 ft spacing: ceil(12.5) + 1 = 13 + 1 = 14 posts.
Hole depth
= max(post⁄3, frost, 24″). An 8 ft (96″) post, 36″ frost line: max(32, 36, 24) = 36 in.
Height above ground
= post length − depth. 96″ − 36″ = 60 in (5 ft) of finished fence height.
Worked example
A 64 ft backyard fence, 6 ft target spacing, 7 ft posts, 30″ frost line.
Setting posts right
Widen the hole, not just the depth
A hole about three times the post's width gives room for concrete to fully surround the post, which resists wind and frost heave far better than a snug hole.
Add drainage at the bottom
A few inches of gravel under the post keeps standing water off the end grain, reducing rot in wood posts and corrosion in metal ones.
Check corner and gate posts
Corner, end, and gate posts carry more load than mid-run posts and often need a larger post, a deeper hole, or extra concrete beyond the standard spacing plan.
Tighten spacing for wind
Solid privacy fencing catches wind like a sail. In windy areas, spacing posts closer than the panel maximum reduces the leverage that can loosen or snap a post over time.
Real-world context
A warm-climate backyard fence shows how shallow frost lines simplify the job. A 150 ft run at 6 ft spacing with 8 ft posts and only a 12-inch frost line needs ceil(150⁄6) = 25 bays, so 26 posts, with real spacing landing at an even 6 ft. Hole depth is max(32, 12, 24) = 32 inches, driven by the one-third-of-post-length rule rather than frost, since the frost line here is shallower than the practical 24-inch minimum would need anyway.
A cold-climate fence flips which rule controls. A 40 ft run at 8 ft spacing with 6 ft posts and a 48-inch frost line needs ceil(40⁄8) = 5 bays, so 6 posts at an even 8 ft real spacing. Hole depth is max(24, 48, 24) = 48 inches — the frost line now dominates, and the post only sticks up 72 − 48 = 24 inches above grade, which is worth checking against the target fence height before ordering posts.
A tall privacy fence needs closer spacing to resist wind load. An 80 ft run at 6 ft spacing with 9 ft posts and a 30-inch frost line needs ceil(80⁄6) = 14 bays, so 15 posts, with real spacing tightening to about 5.7 ft. Hole depth is max(36, 30, 24) = 36 inches, leaving 108 − 36 = 72 inches (6 ft) of finished fence height — a good illustration of how much more concrete and post length a tall privacy fence consumes compared with a short picket fence.
Common misconceptions
"If I bury one-third of the post, I'm always safe." Not in cold climates. The one-third rule is only a starting point — if it puts the post bottom above the local frost line, freeze-thaw cycles can still heave the post over successive winters. The calculator always uses whichever of the one-third rule, the frost line, or the 24-inch practical minimum is deepest.
"Dividing the fence length by the spacing gives the post count." It's off by one. Posts sit at both ends of a run as well as between spans, so the post count is the number of bays (spans) plus one — a 100 ft fence at 10 ft spacing needs 11 posts, not 10, or the last section comes up short.
Related calculators
Frequently asked questions
How far apart should fence posts be?
Most residential wood fences space posts 6 to 8 feet apart, and vinyl or panel fencing often follows a fixed panel width such as 6 or 8 feet. Taller or heavier fences, and fences on windy or sloped sites, do better with closer spacing.
How deep should a fence post hole be?
A common rule is to bury one-third of the post length, with a minimum of 24 inches for most residential fences, and always below the local frost line so freezing soil cannot heave the post. Confirm your local frost depth, since it varies widely by region.
Why does frost depth matter for fence posts?
Water in the soil expands as it freezes. If a post bottom sits above the frost line, the freezing and thawing soil around it can slowly heave the post out of the ground over several winters, even though it felt solid when set.
How much concrete do I need per post?
For a typical 8 to 10 inch diameter hole and a 4x4 post, one 50 lb bag of fast-setting concrete mix is a common estimate per post; larger holes or posts need more. Check the bag instructions for your hole size.
Sources & references
This tool uses standard formulas and reference values from:
- • American Concrete Institute — ACI 318, Building Code Requirements for Structural Concrete. concrete.org
- • ICC — International Residential Code (IRC), span, footing and framing tables. codes.iccsafe.org
- • APA – The Engineered Wood Association, allowable span and load guidance.
Estimates for planning only. Span, load and code values vary by jurisdiction — verify against your local adopted code and a licensed engineer before building.