Fence post and rail calculator
Fence length and height, post spacing and rail rows: you get posts with embedment, rail footage and post-hole concrete.
Purchase quantity
10 post
Net measurement: 65.617 ft · Waste 10 %
- Posts10 post
- Post length (with embedment)7.874 ft
- Rails144.357 ft
- Post concrete (12 × 12 in hole)0.641 yd³
Your prices per language/currency. Used when you enable “Use my prices” in calculators. My prices →
How it's calculated (visible formula)
posts = ceil(length ÷ spacing) + 1; post = height + max(2 ft; height ÷ 3); rails = length × rows
- Net geometric measurement, no waste.
- Adjustable waste % for cuts and breakage.
- Purchase rounded up to sellable units (boxes, bags, buckets, boards).
How to calculate it, step by step
- Lay out the fence line with string and measure its length.
- Set fence height and post spacing.
- Posts = length ÷ spacing + 1, plus corners and gates.
- Add embedment depth to height for each post's length.
- Work out rails by rows and concrete for the holes.
Worked example: 66 ft × 6 ft fence, posts every 8 ft, 2 rails
- 66 ÷ 8 = 8.3 → 9 + 1 = 10 posts
- Post: 6 + 2 = 8 ft
- Rails: 132 ft + 10% ≈ 145 ft
→ 10 posts of 8 ft, 145 ft of rail and about 0.5 m³ of concrete.
Common mistakes
- Forgetting the end post (the +1).
- Setting posts shallower than 2 ft or one third of the height.
- Not adding gate and corner posts.
Pro tips
- Set corner and end posts first and string a line between them.
- Put 4 in of gravel in the bottom of each hole for drainage.
- Crown the concrete so water runs away from the post.
- Confirm property lines and HOA rules before digging.
From calculation to quote
Add labor, overhead and your margin, and generate the professional PDF.
FAQs
- How deep should fence posts be?
- One third of the above-ground height and at least 24 in — below the frost line in cold areas.
- How far apart are fence posts?
- 6–8 ft for wood; wider spacing makes rails sag.
- Concrete or gravel?
- Concrete for treated wood or metal posts; put gravel under the post for drainage.
- What lumber for fence posts?
- Pressure-treated posts rated for ground contact, or steel posts.
- 4×4 or 6×6 posts?
- 4×4 for fences up to about 5 ft; 6×6 for taller or windy sites.
- How do I fence a slope?
- Step the panels or rack the rails to follow the grade.
Sources and standards
Maintained by Srikanta M · Formula v1.0.0 · Verified 2026-09-10 · Updated 2026-09-10 · Limits: quantity estimation, not structural design or site supervision.