BCBetter Calculators

Fence Calculator

Estimate fence posts, panels, rails, and material cost for any fencing project.

🧮

Enter your values and click Calculate

How It Works

Panel count = ceil(total length ÷ post spacing). This gives the number of fence sections between posts. Posts = panel count + 1 (the closing post at the end of the run) + number of gates (each gate needs an extra post for the gate frame). Rails = panel count × 3, since a standard 6-foot privacy fence uses three horizontal rails per section (top, middle, bottom). The recommended post length is fence height × 1.5, rounded up — the standard rule is that posts should be set one-third of their total length into the ground for stability. For a 6-foot fence, a 9-foot post set 3 feet deep is standard. The cost estimate multiplies total linear feet by $15, a rough average for installed wood privacy fencing in the US. Actual costs vary: basic chain-link runs $10–$20/ft installed; wood privacy $15–$30/ft; vinyl $20–$40/ft; aluminum/ornamental $25–$50/ft.

Examples

Standard Backyard
150 ft of 6-foot privacy fence with 8-foot post spacing and 1 gate.
Result: 20 posts, 19 panels, 57 rails. Estimated cost ~$2,250.
Small Dog Yard
80 ft of 4-foot fence with 6-foot post spacing and 2 gates.
Result: 16 posts, 14 panels, 42 rails. Estimated cost ~$1,200.
Large Property Perimeter
400 ft of 6-foot fence with 8-foot spacing and 2 gates.
Result: 53 posts, 50 panels, 150 rails. Estimated cost ~$6,000.

Frequently Asked Questions

How deep should fence posts be set?
The standard rule is to set posts one-third of their total length into the ground. For a 6-foot fence, use 9-foot posts set 3 feet deep. In areas with frost, posts should be set below the frost line to prevent heaving — frost depth varies from 12 inches in the South to 48+ inches in northern states. Use concrete (one 50-lb bag per post hole is typical) to secure posts. Allow 24–48 hours for concrete to cure before attaching panels.
What is the best post spacing for a wood fence?
Standard wood privacy fence post spacing is 6–8 feet on center. Eight-foot spacing works well for pre-built fence panels (which are commonly sold in 6-foot and 8-foot widths). Tighter spacing (6 feet) provides more rigidity and is better for areas with high wind or heavy snow loads. Wider spacing (8 feet) uses fewer posts and reduces material cost. Never exceed 10 feet between posts for a standard wood fence — the rails will sag under the weight of the pickets.
What type of wood should I use for fence posts?
Ground-contact fence posts should be rated for ground contact (UC4A or UC4B pressure treatment). Pressure-treated pine is the most common and economical choice. Cedar and redwood are naturally rot-resistant and require no treatment but cost more. Avoid untreated pine or spruce — in-ground contact will rot them within a few years. Posts at or above ground level (such as for a deck railing) can use UC3B-rated lumber, which has lower chemical treatment levels.
Do I need a permit to build a fence?
Many municipalities require a permit for fences above a certain height (commonly 4 or 6 feet) or for fences in front yards. HOA rules may also restrict fence type, height, color, and placement. Before digging post holes, call 811 (the US 'Call Before You Dig' service) to have underground utilities marked — hitting a gas or electrical line is dangerous and costly. Always verify property lines with your survey or local assessor records before installing a fence along a boundary.

Related Calculators