How to use the fence calculator
- 1Measure the fence line. Walk the route with a long tape or measuring wheel and record the total length, including gate openings. If you are fencing a property line, confirm where it is first (see the planning section below).
- 2Choose the height and style. Wood picket fences are built on site from posts, rails and individual pickets. Pre-built panels arrive as ready-made sections. Chain link uses steel posts, a top rail and woven fabric.
- 3Set the post spacing. Most wood fences use 8 ft on center; 6 ft is stiffer and better for tall fences or windy sites. Panel fences use the panel width. Chain-link line posts are usually up to 10 ft apart.
- 4Count corners and gates. Every corner and both sides of every gate need a post, and these posts are often heavier than line posts.
- 5Check the post-hole settings and prices. The defaults follow common practice. Add your local prices to turn the material list into a budget.
How the calculator works
A fence is a chain of sections, the bays between two posts. Once you know how many sections you need, every other quantity follows. Gate openings are removed from the fenced length first, because a gate replaces a section of fence.
Fenced length F = total length − (gates × gate width)Runs R = (corners + 1) + gates (open fence)Runs R = corners + gates (fully enclosed fence)Sections S = R × ⌈F ÷ R ÷ spacing⌉Posts = S + R − cornersRounding up each run separately matters: a 70 ft run at 8 ft spacing needs 9 sections, not 8.75. That is why the calculator spreads your total length evenly across the runs created by corners and gates. If your runs are very uneven, run the calculator once per side for the most precise count.
Rails, pickets and panels
Rails = sections × rails per sectionPickets = ⌈(F × 12) ÷ (picket width + gap)⌉Panels = sectionsConcrete per post
Hole volume = π × (diameter ÷ 2)² × depthConcrete per post = hole volume − post volume below groundBags per post = ⌈concrete per post ÷ bag yield⌉Worked example
150 ft privacy fence with one gate
A 6 ft wood privacy fence, 150 ft long, with two corners, one 4 ft gate, open ends and posts 8 ft on center:
- Fenced length: 150 − 4 = 146 ft; runs: 2 + 1 + 1 = 4
- Sections: 146 ÷ 4 = 36.5 ft per run → ⌈36.5 ÷ 8⌉ = 5 sections per run → 20 sections
- Posts: 20 + 4 − 2 = 22 posts (2 ends, 2 corners, 2 gate posts and 16 line posts)
- Rails: 20 sections × 3 rails = 60 rails (2×4×8)
- Pickets (5.5 in, no gap): ⌈146 × 12 ÷ 5.5⌉ = 319 pickets
- Concrete: a 10 in hole, 24 in deep, around a 4×4 holds about 0.92 ft³ → 3 × 50 lb bags per post, 66 bags in total
With the default 5% waste allowance, the calculator rounds the pickets up to 335 and the rails to 63.
Fence post spacing by style
| Fence type | Typical post spacing | Notes |
|---|---|---|
| Wood privacy (6 ft) | 6–8 ft on center | 8 ft suits standard 8 ft rails; use 6 ft in high-wind areas |
| Wood picket (3–4 ft) | 6–8 ft on center | Lighter load, so 8 ft is common |
| Pre-built wood panels | Panel width (usually 8 ft) | Measure the actual panel; many are slightly under 96 in |
| Vinyl panels | 6 ft or 8 ft | Posts are routed for the rails, so the panel fixes the spacing |
| Chain link (residential) | Up to 10 ft | Terminal posts at ends, corners and gates |
| Ornamental aluminum or steel | 6 ft or 8 ft | Fixed by panel length |
How many rails does a fence need?
Rails (also called stringers) are the horizontal boards that pickets are fastened to. The taller the fence, the more rails it needs to stop pickets from cupping and the fence from racking.
| Fence height | Rails per section | Typical rail size |
|---|---|---|
| 3–4 ft | 2 | 2×4 |
| 5–6 ft | 3 | 2×4 |
| 7–8 ft | 3–4 | 2×4, or a 2×6 bottom rail |
Picket sizes and spacing
Lumber is sold by nominal size, but the calculator needs the actual width. A “1×6” picket is about 5½ in wide and a “1×4” is about 3½ in. Some cedar and dog-ear pickets are 5½ in and others 5⅝ in, so measure one before you order.
- Privacy fence: enter a gap of 0. Pressure-treated pickets often arrive wet and shrink as they dry, opening small gaps during the first season, so installing them snug allows for that shrinkage.
- Spaced picket fence: a gap of about 2–3 in is typical. Pool-barrier rules commonly limit openings to 4 in or less, so check local requirements if a pool is involved.
- Board-on-board (shadowbox): pickets alternate sides and overlap. Expect roughly 30–50% more pickets than a single-sided privacy fence of the same length.
Post size, length and depth
For most residential fences up to 6 ft tall, 4×4 posts are standard. Many builders use 6×6 posts for gates, for 8 ft fences and for exposed, windy sites, because they resist bending and twisting much better. Buy posts treated for ground contact (AWPA Use Category UC4A, or UC4B for critical structural posts); lumber rated only for above-ground use rots quickly when buried.
A widely used rule is to set at least one third of the above-ground height into the ground, which is why a 6 ft fence usually uses 8 ft posts set 2 ft deep. In cold climates, set posts below the local frost line to avoid frost heave. Our fence post depth calculator works out the depth, post length and concrete for each post.
Concrete bags per fence post
How many bags of concrete one 4×4 post needs for common hole sizes, with the volume of the post itself subtracted. Gravel under the post is not included.
| Hole (diameter × depth) | Concrete volume | 50 lb bags | 60 lb bags | 80 lb bags |
|---|---|---|---|---|
| 8 in × 24 in | 0.53 ft³ | 2 | 2 | 1 |
| 8 in × 30 in | 0.66 ft³ | 2 | 2 | 2 |
| 8 in × 36 in | 0.79 ft³ | 3 | 2 | 2 |
| 10 in × 24 in | 0.92 ft³ | 3 | 3 | 2 |
| 10 in × 30 in | 1.15 ft³ | 4 | 3 | 2 |
| 10 in × 36 in | 1.38 ft³ | 4 | 4 | 3 |
| 12 in × 24 in | 1.4 ft³ | 4 | 4 | 3 |
| 12 in × 30 in | 1.75 ft³ | 5 | 4 | 3 |
| 12 in × 36 in | 2.1 ft³ | 6 | 5 | 4 |
Chain link fence materials
When you select chain link, the calculator lists the components a chain-link installer orders:
- Fabric (mesh): the fenced length, sold in rolls (commonly 50 ft).
- Top rail: runs the full fenced length; it is typically sold in sticks of about 10½ ft that slip together.
- Terminal posts: ends, corners and gate posts, heavier than line posts.
- Tension bars and bands: one tension bar at each end and gate post and two at each corner. A common rule is one tension band per foot of fence height, minus one, on each tension bar.
- Ties: fabric is usually tied to line posts about every 12 in and to the top rail about every 24 in.
Estimating fence cost
Enter your own prices to get a materials budget. Prices vary widely by region, lumber species and season, so a local quote is more reliable than any national average. Remember the items that are easy to forget:
- Gate hardware: hinges, latch, drop rod and a gate-frame kit or diagonal brace
- Fasteners: exterior-rated (hot-dip galvanized or stainless steel) nails or screws
- Post caps, stain or sealer, and gravel for drainage
- Tool rental (post-hole auger), delivery fees, permits and disposal of an old fence
Before you dig: permits, property lines and utilities
- Check the zoning code or HOA rules for maximum fence height, setbacks and which side of the fence must face the neighbor.
- Confirm your property line with a plat or survey. Fence disputes usually start with an assumed boundary.
- Many cities require a permit for fences above a certain height (often 6 ft) and for any pool barrier.
Common fence estimating mistakes
- Forgetting that each gate needs two posts and removes fence length.
- Using the nominal picket width (6 in) instead of the actual width (5.5 in), which undercounts pickets by about 8%.
- Measuring post spacing between post faces instead of post centers, so 8 ft rails come up short.
- Ordering exactly the calculated amount. Add 5–10% for split pickets, bad boards and cutting waste.
- Ignoring slope. On sloped ground, either step the panels or rack the fence; stepped fences need taller posts on the downhill side.