How to use the fence calculator
- Measure the full fence line in feet, including the gates. Walk it with a measuring wheel or tape and add up every side.
- Pick the height and style. Privacy fences have pickets touching; spaced picket fences leave a gap (2–3 in is typical).
- Enter gates and corners. Each gate opening is removed from the picket count and adds a post. Each corner can add a section because sides rarely divide evenly by the post spacing.
- Check the prices under “Materials and prices” and change them to what your local store charges. The list updates as you type.
How the numbers are worked out
The calculator assumes a standard wood fence: 4x4 posts set in concrete, 2x4 rails running between posts, and vertical pickets nailed to the rails.
posts = sections + 1 + gates
rails = sections × rails per section (2, 3 or 4 by height)
pickets = ⌈(length × 12) ÷ (picket width + gap)⌉ + gate pickets + extra %
concrete per post = (π × (hole width ÷ 2)² − 3.5²) × depth
Example: a 100 ft, 6 ft tall privacy fence with one 4 ft gate and posts 8 ft apart needs 12 sections, 14 posts (8 ft long), 36 rails and 230 pickets including the gate and 5% extra. Setting each post 2 ft deep in a 10 in hole takes about 0.92 cu ft of concrete, or 3 bags of 50 lb mix per post.
Fence material quick reference
| Fence height | Post length | Burial depth | Rails per section |
|---|---|---|---|
| 3–4 ft | 6–8 ft | 2 ft | 2 |
| 5–6 ft | 8 ft | 2 ft | 3 |
| 7 ft | 10 ft | 2.5 ft | 4 |
| 8 ft | 12 ft | 3 ft | 4 |
Tips before you buy
- Call 811 before you dig. It is free in the US and marks buried gas, water and power lines a few days before you start.
- Check permits and HOA rules. Many towns limit fence height (often 6 ft in back yards and 4 ft in front) and require a permit.
- Use ground-contact lumber for posts. Look for “ground contact” or UC4A on the tag of pressure-treated posts.
- Buy a few extra pickets. Some boards arrive split or badly warped; 5–10% extra covers culls and cuts.
- On a slope, measure along the ground and consider 6 ft post spacing so steps between sections stay small.
Setting posts in concrete? Use the concrete calculator to size a footing or a larger batch. Building a deck next to the fence? Try the deck calculator.
Last updated November 30, 2026.