Fence Calculator

Estimate posts, rails, pickets, concrete, and total materials cost. Results update instantly.

ft
ft
ft

Perimeter = 2 × (Length + Width)


Fence Specifications

ft
in
in
bags

Unit Prices (optional — for cost estimate)

$
$
$
$
$

Materials Needed

Posts
Rails
Pickets
Concrete Bags
Gate Sets
Sections

Cost Breakdown

Item Qty Unit $ Subtotal
Posts
Rails
Pickets
Concrete
Gate hardware
Total materials cost
Total Estimated Cost

How to Calculate Fence Materials

Planning a fence project starts with accurate materials quantities. Buying too little means a frustrating mid-project supply run; buying too much wastes money. This calculator handles the full list — posts, rails, pickets, concrete, and gate hardware — in one place.

Step 1: Measure Your Fence Line

For a rectangular yard, measure the length and width in feet. The perimeter (total linear footage) is 2 × (length + width). If your yard is an irregular shape, walk the fence line with a measuring wheel or tape and record the total distance. Enter that total in the "Total Linear Feet" tab. A typical residential backyard fence runs 150 to 250 linear feet.

Step 2: Choose Post Spacing

Standard post spacing is 8 feet, which aligns with common pre-cut rail lengths (8-foot boards) and minimizes lumber waste. In high-wind areas or for heavier board-on-board designs, 6-foot spacing adds rigidity. Chain-link fences often use 10-foot spacing. The number of posts equals the number of fence sections plus one end post: Posts = (Linear Feet ÷ Spacing) + 1, always rounded up. Corner posts and gate posts add to this total, so the calculator includes 2 extra posts per gate opening.

Step 3: Count Rails per Section

Most residential privacy fences use 2 horizontal rails per section — one near the top and one near the bottom. Three-rail fences are common for taller 8-foot fences, split-rail styles, or any fence that needs extra lateral strength. Each section requires the same number of rails as your selected value, so total rails = sections × rails-per-section.

Step 4: Calculate Pickets

Pickets per section = post spacing (in inches) ÷ (picket width + gap). For a standard 8-foot section (96 inches) with 3.5-inch pickets and no gap, that is 96 ÷ 3.5 = 27.4 pickets, rounded up to 28. Adding a 0.5-inch gap changes each slot to 4 inches: 96 ÷ 4 = 24 pickets per section. The most common picket sizes are 3.5 inches (nominal 1×4), 5.5 inches (nominal 1×6), and 7.25 inches (nominal 1×8).

Step 5: Concrete for Post Holes

Each post hole needs enough concrete to secure the post against frost heave, wind load, and soil movement. Two 60-lb bags is the standard for 4×4 posts in average soil. Upgrade to 3 bags for 6×6 posts or posts in sandy, wet, or loose soil. The hole should be roughly 10 to 12 inches in diameter and one-third the total post length deep (minimum 24 inches for a 6-foot fence).

Step 6: Gate Hardware

Each gate opening requires a hardware set that typically includes hinges, a latch, and a gate stop or cane bolt. Standard residential gate hardware kits run $30 to $60 at home improvement stores. Double gates (two-door openings) may need a floor cane bolt to hold one door in place. Adjust the per-set price to match the hardware you plan to purchase.

Understanding the Cost Estimate

The default prices reflect typical national averages at home improvement retailers in the United States: pressure-treated 4×4 posts (~$18 each), 8-foot 2×4 rails (~$8 each), cedar or pine pickets (~$2.50 each), 60-lb concrete bags (~$6.50 each), and basic gate hardware (~$45 per opening). Prices vary significantly by region, wood species, and whether you buy in bulk. Update the unit prices to match your local quotes for the most accurate estimate.

Pro Tips for Fence Projects

  • Add 10% waste factor — always order 5-10% extra pickets and rails to account for cuts, splits, and defects in the lumber.
  • Call 811 before digging — in the United States, calling 811 is legally required before any digging. Utility locators will mark underground lines for free.
  • Check local setback rules — most municipalities require fences to be set back 2 to 6 feet from property lines and limit fence height, especially in front yards.
  • Use pressure-treated lumber — ground-contact rated posts (UC4B or higher) resist rot for 20+ years. Cedar and redwood also have natural rot resistance for above-ground components.
  • Pre-drill pickets — pre-drilling reduces splitting, especially near board ends, and makes the fence last longer.

Frequently Asked Questions

Divide the total linear footage of your fence by the post spacing (commonly 8 feet), then add 1 for the final end post. For example, a 100-foot fence with 8-foot spacing needs (100 / 8) + 1 = 13.5, rounded up to 14 posts. Always add extra posts for corners and gate openings.
Divide the post spacing (in inches) by the picket width plus gap. For a standard 8-foot section (96 inches) with 3.5-inch pickets and 0-inch gap, that is 96 / 3.5 = 27.4, rounded up to 28 pickets per section. With a 0.5-inch gap, each picket occupies 4 inches, giving 96 / 4 = 24 pickets.
Most fence contractors use 2 bags of 60-lb concrete per post for standard 4x4 posts. For larger 6x6 posts or posts in loose soil, use 3 bags. The post hole should be about 3 times the post diameter wide and one-third the post length deep, with a minimum of 24 inches.
The most common post spacing is 8 feet (96 inches), which matches standard pre-cut fence rail lengths and minimizes waste. For heavier privacy fences or high-wind areas, 6-foot spacing is recommended. Chain-link fences typically use 10-foot spacing.
Material costs for a wood privacy fence typically run $8 to $20 per linear foot depending on wood species, height, and hardware. A 6-foot cedar privacy fence with pressure-treated posts often costs $12 to $18 per linear foot in materials alone. Labor adds another $10 to $30 per linear foot if you hire a contractor.