How to calculate a fence
A straight fence run breaks down into sections between posts:
Sections = fence length ÷ post spacing, and posts = sections + 1
The extra post is the end post that closes the final section. Corners and gates need their own posts, so add those separately.
Typical post spacing
| Fence type | Common spacing |
|---|---|
| Pre-made panels | 6 or 8 ft (match the panel) |
| Wood picket / privacy | 6–8 ft |
| Chain link | up to 10 ft |
Fence materials compared
Material drives the cost, the look, and how much maintenance the fence needs:
| Material | Relative cost | Lifespan | Upkeep |
|---|---|---|---|
| Chain link | $ (lowest) | 15–20 yrs | Almost none |
| Pressure-treated wood | $$ | 15–20 yrs | Seal/stain every 2–3 yrs |
| Cedar | $$–$$$ | 20–30 yrs | Seal every few years |
| Vinyl | $$$ | 20–30+ yrs | Wash only |
| Aluminum | $$$ | 30+ yrs | Almost none |
Set your posts deep enough
The rule of thumb is to bury about one-third of the post's above-ground height (a 6 ft fence wants a post set ~2 ft deep), and always below your local frost line so frost heave can't lift it. Set posts in concrete for a privacy or panel fence; a compacted-gravel set is sometimes used for lighter fences and better drainage. Get each post plumb and let the concrete cure before hanging panels or gates.
Don't forget
- Concrete for posts. Each post typically needs 1–2 bags — size it with our concrete calculator.
- Rails. Non-panel fences usually need 2–3 horizontal rails per section.
- Pickets. For a picket fence, divide the length (in inches) by picket width + gap to count pickets.
- Corners, ends, and gates. Each corner and end needs a post, and every gate needs its own pair of sturdy posts and hardware.
How much does a fence cost?
Cost depends heavily on material and height — chain link is cheapest, then wood, with vinyl and aluminum higher. For installed per-foot ranges and a full project breakdown, see our guide on how much it costs to install a fence.
Before you build: lines, utilities, and rules
A fence is permanent and sits on a boundary, so a little homework up front saves expensive mistakes:
- Call 811 first. Have underground utilities located before you dig postholes — it's free and required in most areas.
- Confirm the property line. Don't guess from a hedge or an old fence; check your survey, or set the fence a few inches inside the line to be safe.
- Check setbacks and permits. Many towns limit fence height (often ~6 ft in back, ~3–4 ft in front) and require a permit; an HOA may dictate style and color.
- Talk to your neighbor. A quick conversation about the line and sharing costs heads off disputes later.