Fence Calculator
Calculate fence materials including posts, rails, pickets, and gates with a full cost breakdown.
Results
Visualization
How It Works
Building a fence requires four main materials: posts (vertical supports set in concrete), rails (horizontal beams connecting posts), pickets (the visible boards), and gates. This calculator breaks down each component and gives you a shopping list.
The Formula
Posts = ceil(Length / Spacing) + 1 + (Gates x 2); Rails = Sections x RailsPerSection; Pickets = ceil(Length_in / PicketWidth)
Variables
- Length — Total fence length in feet
- Spacing — Distance between posts in feet
- Gates — Number of gate openings (each needs 2 extra posts)
- RailsPerSection — 2 for fences up to 5 ft tall, 3 for taller fences
- PicketWidth — Width of each picket board in inches
Example
100 ft privacy fence, 6 ft tall, 8 ft post spacing, 1 gate, 5.5" pickets: 13 sections, 14 posts + 2 gate posts = 16 posts, 39 rails, 219 pickets. Total cost roughly $1,032.
Tips
- Set fence posts at least 2 feet deep (one-third of total post length underground).
- Use pressure-treated lumber rated for ground contact on all posts.
- Check with your HOA and local codes for height limits and setback requirements.
- Call 811 before digging to locate underground utilities -- it is free and required by law.
- Apply a wood stain or sealant within the first year to extend the fence life by 10+ years.