CozySpruce

Fence Calculator

Calculate exactly how many posts, rails, pickets, and bags of concrete you need for your fence project. Supports privacy, semi-privacy, and shadowbox styles.

FreeNo Sign UpInstant Results

Fence Length

Fence Height

Fence Style

Post Spacing

Gates

3-4 ft for walk gates, 10-16 ft for drive gates

Your Results Will Appear Here

Enter your fence length, choose a height and style, then click “Calculate” to see materials needed.

Top-Rated Fencing Materials & Supplies

Hand-picked products to help you get the best results on your project.

Best Seller

Severe Weather

Severe Weather 4x4x8 Pressure-Treated Post

  • ✓Pressure-treated lumber
  • ✓Ground contact rated
  • ✓8 ft length
Check Price on Amazon
Premium Pick

Severe Weather

Severe Weather 6ft Dog-Ear Cedar Fence Picket

  • ✓Western red cedar
  • ✓Dog-ear top
  • ✓Naturally rot resistant
Check Price on Amazon
Budget Friendly

Quikrete

Quikrete Fast-Setting Concrete Mix, 50 lb

  • ✓Sets in 20-40 min
  • ✓No mixing needed
  • ✓Perfect for posts
Check Price on Amazon
Essential Tool

Simpson Strong-Tie

Simpson Strong-Tie Post Base, ABU44Z

  • ✓Galvanized steel
  • ✓Adjustable 4x4 base
  • ✓Keeps post off ground
Check Price on Amazon

As an Amazon Associate, we earn from qualifying purchases.

How to Use This Fence Calculator

Step 1: Enter Fence Length

Measure the total linear feet of fencing needed. Walk your property line with a measuring wheel or use your property survey for accurate measurements.

Step 2: Choose Height & Style

Select 4, 6, or 8 ft height. Choose privacy (no gaps), semi-privacy (1” gaps), or shadowbox (alternating boards on both sides) style.

Step 3: Set Post Spacing

Choose 6 ft (standard, strongest) or 8 ft (maximum, fewer posts). Wind-exposed areas should use 6-foot spacing.

Step 4: Add Gates

Enter the number and width of gates. Walk gates are typically 3–4 ft wide. Drive gates are 10–16 ft wide. The calculator subtracts gate openings from fence length.

Step 5: Get Materials List

Click Calculate to see your complete materials list: posts, rails, pickets, concrete bags, and hardware estimates with cost range.

Understanding Fence Styles

Fence Style Comparison

StylePrivacyPickets/100ftBest For
PrivacyFull privacy~220Backyards, pools
Semi-PrivacyPartial~185Side yards, gardens
ShadowboxAngled privacy~330Neighbor-friendly look

Post Depth & Concrete

Set posts 1/3 of their total length in the ground (minimum 2 feet). Plan on about two 50 lb bags of fast-setting concrete per post. Dig holes 3 times the post width (about 12 inches for 4×4 posts). Let concrete cure 24 hours before attaching rails and pickets.

Wood Types for Fencing

Pressure-treated pine: Most affordable, lasts 15–20 years, requires staining.  Cedar: Naturally rot-resistant, lasts 10–15 years, beautiful appearance.  Redwood: Premium option, lasts 15–20 years, naturally insect-resistant.

Pro Tips for Fence Building

Call 811 Before Digging

This is the most important step. Call 811 at least 48 hours before digging to have underground utilities (gas, electric, water, cable) marked for free. Hitting a buried line is dangerous and expensive.

Set Posts 1/3 in Ground

For a 6-foot fence, use 8-foot posts set 2 feet deep. This provides the stability needed to resist wind loads. In areas with heavy frost, set posts below the frost line (typically 36–42 inches) to prevent heaving.

Use Pressure-Treated Lumber for Ground Contact

Only use lumber rated for ground contact on posts and bottom rails. Regular lumber rots quickly underground. Look for “Ground Contact” or “UC4A” stamps on treated lumber.

Check Local Building Codes

Most municipalities require fences to be 6 inches inside the property line. Many require permits for fences over 6 feet. HOAs often restrict height, style, and materials. Check all requirements before buying materials.

Install Posts First, Then Wait

Set all posts and let concrete cure for 24 hours before attaching rails and pickets. This gives you time to verify post alignment and spacing. Use a string line to keep posts straight.

Frequently Asked Questions

For a standard privacy fence (no gaps), you need about 220 pickets for 100 linear feet. Each picket is 5.5 inches wide, so you get about 2.18 pickets per foot. For semi-privacy fencing with 1-inch gaps, you need fewer—about 185 pickets. Shadowbox style alternates boards on both sides with some overlap, so it takes about 1.5 times as many—about 330 pickets.

The general rule is to bury 1/3 of the total post length. For a 6-foot fence using 8-foot posts, set them 2 feet deep. The minimum depth should be 2 feet for any fence. In frost-prone areas, set posts below the frost line (typically 36–42 inches) to prevent heaving.

Standard post spacing is 6–8 feet on center. Six feet is the most common and provides the strongest fence. Eight feet is the maximum for most fence styles—farther apart and the rails can sag. Wind-exposed areas should use 6-foot spacing for better stability.

DIY wood fence materials cost $15–$30 per linear foot depending on wood type and height. Cedar costs more than pressure-treated pine but lasts longer. For professional installation, expect $25–$50 per linear foot. A typical 150-foot fence costs $2,250–$4,500 for materials.

Most municipalities require permits for fences over 6 feet tall, and some require them for any fence. Check with your local building department before starting. You’ll also need to verify your property lines—most codes require fences to be built 6 inches inside the property boundary. HOA neighborhoods may have additional restrictions.

Pressure-treated pine posts last 15–20 years in ground contact. Cedar posts last 10–15 years naturally, longer with sealant. Redwood lasts 15–20 years. Steel post brackets that keep wood off the ground can extend post life significantly. The post is always the first component to fail, so quality posts are worth the investment.

Related Calculators