How to Calculate Fence Materials
Posts: Posts = ceil(length รท spacing) + 1 + gate count. Corner posts and gate posts may need thicker (6ร6) posts.
Related: Try our deck calculator, lumber calculator, or concrete calculator for your project.
Panels: Panels = max(0, ceil(length รท spacing) โ gate count). Each panel fits between two posts; a gate opening removes one panel section.
Concrete: 1-2 bags of 80lb concrete per post. Hole = 1/3 to 1/2 of post height deep, 3ร post width wide.
Fence Cost Comparison
| Type | $/ft (installed) | Lifespan | Privacy |
| Chain-link | $10-20 | 15-20 yrs | None |
| Wood picket | $15-25 | 10-15 yrs | Partial |
| Wood privacy | $15-30 | 10-15 yrs | Full |
| Vinyl | $20-40 | 20-30 yrs | Full |
Tip: Check local HOA rules and building codes for height limits and setback requirements. Call 811 before digging to locate utilities.
Fence Types: A Complete Guide
The right fence depends on your goal โ privacy, security, decoration, or containment. Here is how the major types compare.
| Type | $/ft (installed) | Lifespan | Privacy | Best For |
| Chain-link | $10โ$20 | 15โ20 yrs | None | Budget, utility, dog runs |
| Wood picket | $15โ$25 | 10โ15 yrs | Partial | Curb appeal, front yards |
| Wood privacy | $15โ$30 | 10โ15 yrs | Full | Backyards, pools |
| Vinyl (PVC) | $20โ$40 | 20โ30 yrs | Full | Low-maintenance privacy |
| Aluminum | $20โ$35 | 30+ yrs | None | Pool code, decorative |
| Wrought iron | $30โ$60 | 50+ yrs | None | Premium security, historic homes |
| Bamboo / composite | $15โ$35 | 15โ25 yrs | Full | Eco-friendly, modern look |
How to Build a Fence: Step by Step
- Mark the layout. Use stakes and mason line to mark the fence line. Confirm property lines with a survey or plat map โ building on your neighbor's land is an expensive mistake.
- Call 811. This free service marks underground utilities (gas, electric, water, cable) before you dig. Required by law in most areas.
- Dig post holes. Holes should be 1/3 to 1/2 of the above-ground post height deep, and 3ร the post width wide. A 6ft fence needs 2โ3ft deep holes. Use a post hole digger or gas auger.
- Set posts. Place 4ร4 posts in holes, check plumb with a level, and fill with concrete (1โ2 bags per post) or compacted gravel. Let concrete cure 24โ48 hours before attaching rails.
- Install rails. For a 6ft privacy fence, use 3 horizontal rails (top, middle, bottom). For shorter fences, 2 rails suffice. Use galvanized screws or ring-shank nails.
- Attach pickets or panels. Start at one end, use a spacer block for consistent gaps (or butt them tight for privacy). Check plumb every 3โ4 pickets.
- Install gates. Gates need 4ร4 or 6ร6 posts and heavy-duty hinges. A 4ft gate is standard for walkways; 10โ12ft double gates for vehicles. Use a self-closing latch for pool code compliance.
Material Quantities by Fence Length
| Length | Posts (8ft spacing) | 2ร4 Rails (3-rail) | Pickets (6ft, 1ร6) | Concrete (80lb bags) |
| 50 ft | 8 | ~21 | ~150 | ~12 |
| 100 ft | 14 | ~42 | ~300 | ~21 |
| 150 ft | 20 | ~60 | ~450 | ~30 |
| 200 ft | 26 | ~78 | ~600 | ~39 |
| 300 ft | 39 | ~117 | ~900 | ~59 |
Quantities assume 6ft privacy fence with 8ft post spacing and 1ร6 pickets. Add 10% waste. Use our concrete calculator for precise post-hole concrete, and lumber calculator for board-foot totals.
Gates and Hardware
- Hinges: Use 3 hinges per gate for gates over 4ft wide. T-hinges for wood fences, wrap-around hinges for vinyl.
- Latches: Standard thumb latch for walk gates. Self-closing + self-latching required for pool fences in most codes.
- Gate posts: Use 6ร6 posts for gates over 4ft wide, or any gate that gets heavy use. Gate posts take the most stress.
- Wheel/caster: For wide double gates (10ft+), add a caster wheel to the free end to prevent sagging.
Codes, Permits, and HOA
- Permits: Most cities require a permit for fences over 6โ7ft, or any fence in a front yard. Fees are typically $50โ$200.
- Height limits: Front yard fences are often limited to 3โ4ft; backyards 6โ8ft. Corner lots may have visibility triangle rules.
- Setbacks: Fences usually must be 0โ6in from the property line. Check your local zoning code.
- HOA rules: Many homeowners associations restrict fence height, color, and material. Submit an architectural review request before building.
- Pool code: If the fence encloses a pool, it must be at least 48" tall with self-closing, self-latching gates and no horizontal rails on the outside (to prevent climbing).
Common Fence Building Mistakes
- Not calling 811. Hitting a gas line or fiber optic cable can be deadly and costly. Always call before digging.
- Shallow post holes. Posts set too shallow heave in winter and lean over. Below frost line is ideal; 1/3 of post height is minimum.
- Not setting posts plumb. Use a 4ft level on two sides of each post. A leaning post means a leaning fence.
- Using untreated lumber in ground. Only ground-contact-rated pressure-treated lumber or 4ร4 posts rated for ground contact should go in concrete. Regular SPF will rot in 2โ3 years.
- Forgetting the gate brace. A gate without a diagonal brace will sag within months. Install a turnbuckle or wooden brace from the top hinge side to the bottom latch side.
FAQ
How many posts for 100ft fence?
At 8ft spacing: 100 รท 8 + 1 = 14 posts (including end posts).
How deep for fence posts?
1/3 to 1/2 of above-ground height. 6ft fence = 2-3ft deep holes.
Concrete per post?
1-2 bags of 80lb concrete. 6ft fence 4ร4 posts = ~1.5 bags each.
Average fence cost?
Wood $15-30/ft, vinyl $20-40/ft, chain-link $10-20/ft. 100ft = $1,500-4,000.