Fence Calculator
Plan a wood fence by working out how many posts, rails and pickets you need, how much concrete to buy and what the materials will cost.
Formulas shown on this page · Last reviewed October 2026
How the fence calculator works
Gate openings are subtracted from the total length first. The remaining run is divided into sections no longer than your post spacing, and picket count is based on picket width plus the gap between boards.
sections = ceil(run ÷ post spacing)
posts = sections + 1 + gates
rails = sections × rails per section
pickets = ceil(run × 12 ÷ (picket width + gap))
concrete = posts × 2 bags (50 lb)
Posts and rails for common lengths (8 ft spacing, no gates)
| Fence length | Sections | Posts | Rails (2 / 3 per section) |
|---|---|---|---|
| 50 ft | 7 | 8 | 14 / 21 |
| 100 ft | 13 | 14 | 26 / 39 |
| 150 ft | 19 | 20 | 38 / 57 |
| 200 ft | 25 | 26 | 50 / 75 |
Fence height and post length
| Fence height | Typical post | Rails |
|---|---|---|
| 4 ft | 6 ft | 2 |
| 5 ft | 7 ft | 2–3 |
| 6 ft | 8 ft | 3 |
Practical tips
- Call 811 before digging to have buried utilities marked, and check your local setback and height rules or HOA limits.
- Use pressure-treated lumber rated for ground contact for posts; cedar pickets last longer but cost more.
- Buy 5–10% extra pickets for culls and cuts on slopes. Hardware (screws, brackets, gate latches) is not in the cost estimate.
- Gate posts carry extra load – use 6×6 posts or a steel frame for gates wider than 4 ft.
Frequently asked questions
How many posts do I need for 100 feet of fence?
With posts 8 feet apart, 100 ft needs ceil(100 ÷ 8) = 13 sections and 13 + 1 = 14 posts. Each gate adds one more post, and corners and ends need heavier posts, so add a couple of spares.
How many pickets do I need for 100 feet of fence?
With 5.5 inch pickets and a 1/2 inch gap, each picket uses 6 inches, so you need 2 pickets per foot: 200 pickets for 100 ft. A solid privacy fence with no gap needs 100 × 12 ÷ 5.5 = 219 pickets.
How many bags of concrete are needed per fence post?
Plan on about 2 bags of 50 lb concrete per post for a 10 inch wide, 2 ft deep hole, which holds roughly 0.9 cu ft of concrete around a 4×4 post. A 100 ft fence with 14 posts therefore needs about 28 bags.
How deep should fence posts be set?
Bury at least one-third of the post length and never less than 2 feet, deeper where the frost line is lower. For a 6 ft fence that means an 8 ft post with 2 ft underground. Posts should be no more than 8 ft apart center to center.