Fence Calculator

Calculate exactly how many posts, rails, and pickets you need for any fence project โ€” plus a full material cost estimate. Works for wood privacy, picket, and chain link fences.

Select fence type 3 fence styles
ft
Perimeter or total linear feet of fence
Each gate needs 2 extra posts
Material pricing (optional)
$
4ร—4ร—8 pressure-treated: $10โ€“$15
$
1ร—6ร—6 cedar: $2โ€“$4
$
2ร—4ร—8 PT: $6โ€“$10
$
Pre-hung wood gate: $60โ€“$150
Frequently asked questions
How many fence posts do I need? โ€บ
Divide your total fence length by the post spacing, then add 1 for the final end post. For an 8 ft post spacing on a 100 ft fence: 100 รท 8 = 12.5, round up to 13, plus 1 = 14 posts for a straight run. Add 2 posts per gate and 1 extra post for each 90ยฐ corner. This calculator handles all of that automatically.
How deep should fence posts be set? โ€บ
The standard rule is to bury one-third of the total post length, plus 6 inches below the frost line in cold climates. For a 6 ft fence, use 8 ft posts and bury 2 ft deep (one-third of 8 ft). In areas that freeze, dig below the frost line to prevent frost heave โ€” frost depth ranges from 12 inches in the South to 60+ inches in northern states. Check local codes for the frost depth in your area.
How many pickets do I need per fence section? โ€บ
Divide the section width (post spacing in inches) by the picket width plus the gap. For 8 ft spacing with 5.5 in pickets and 1.5 in gaps: 96 รท (5.5 + 1.5) = 13.7, round up to 14 pickets. For a privacy fence with no gaps and 5.5 in pickets: 96 รท 5.5 = 17.5, round up to 18 pickets per section. This calculator does all this math for every section.
What size posts do I need for a 6 ft fence? โ€บ
Use 4ร—4 posts for most residential wood fences up to 6 ft tall. Use 4ร—6 or 6ร—6 posts for corner posts, gate posts, and any fence 7 ft or taller. All wood posts set in ground should be pressure-treated (PT) rated for ground contact (UC4B). Cedar and redwood are naturally rot-resistant but still benefit from PT for in-ground sections.
How much does a fence cost per linear foot? โ€บ
Wood privacy fence materials run $5โ€“$15 per linear foot. Installed cost (materials + labor) is typically $15โ€“$35 per linear foot for wood. Vinyl fence runs $20โ€“$45/ft installed. Chain link runs $10โ€“$25/ft installed. A 150 linear foot privacy fence typically costs $2,250โ€“$5,250 installed. Labor is usually 40โ€“60% of total project cost.

About this fence calculator

This fence calculator works for three common fence types โ€” wood privacy, wood picket, and chain link โ€” each with type-specific material calculations. It accounts for post spacing, gate openings (which need extra posts), picket width and gap, number of rails, and post burial depth. The cost estimate covers all major materials.

Don't forget these extras

In addition to posts, rails, and pickets, budget for: post hole concrete (about 2 bags per post), post caps, fence screws or nails, gate hardware (hinges, latch, handle), and stain or sealant for wood fences. For chain link, you'll also need tension wire, top rail, fence ties, and tension bands. Add 10โ€“15% to your material estimate for fasteners and hardware.