Enter Fence Details
Choose your fence type, enter the length and height, and optionally add gates and prices. Results update live as you type.
Results
Materials Needed
Cost Estimate
Calculation Assumptions
What You Get
- ✓Free — no sign-up, nothing to install
- ✓Live results as you type
- ✓Feet, inches, cm, meters & yards — mix any units
- ✓Export a PDF takeoff in one click
- ✓Shareable link that saves your inputs
- ✓Works on phone, tablet & desktop
- ✓Multiple fence types & wood styles
- ✓Gates, rails & post spacing options
- ✓Perimeter or single-run mode
ON THIS PAGE:
What Is a Fence Calculator
A fence calculator estimates how many posts, rails, pickets or panels, and bags of concrete you need for a fence project based on the fence length, height, post spacing, and number of gates and corners. It also provides an optional cost estimate by itemizing prices for posts, rails, pickets, concrete, and gates.
Fencing is typically sold by the linear foot for materials and by the post for concrete. Getting the right quantities matters because running short on posts or pickets means another trip to the supplier, while over-ordering wastes money. Our calculator supports wood (privacy, picket, shadowbox), chain link, vinyl/PVC, and metal/ornamental fence types.
Enter the total fence length, fence height, post spacing, and number of gates and corners. The calculator determines how many sections your fence has, then calculates the posts, infill material, and concrete volume for each post hole.
How to Calculate Fence Materials
Calculating fence materials follows a straightforward formula. Here is the process used by our calculator:
- Step 1: Determine the number of sections
Subtract the total gate width from the fence length, then divide by the post spacing and round up. For a 200-foot fence with one 4-foot gate and 8-foot spacing: (200 - 4) / 8 = 24.5, rounded up to 25 sections.
- Step 2: Count the posts
For an open run, you need sections + 1 posts. For a closed perimeter, you need sections posts (the last post connects back to the first). Add 2 posts per gate (one on each side) and extra posts for each corner.
- Step 3: Calculate rails or panels
Multiply sections by the number of rails per section (2 to 4). For vinyl fences, count panels instead — one panel per section. The panel width matches the post spacing.
- Step 4: Count pickets (wood/metal fences)
Convert the fence length to inches, then divide by the picket width plus gap. For a 6-inch picket with 0.5-inch gap on 300 feet: 3600 / 6.5 = 554 pickets. Board-on-board (shadowbox) fences need 15 to 20% more because pickets overlap.
- Step 5: Calculate concrete
Each line post needs about 1.5 bags of 50 lb quick-set concrete. Each gate post needs about 4.5 bags for extra stability. Corner posts are larger holes that need proportionally more concrete.
Fence Types & Post Spacing
Different fence types have different post spacing, infill materials, and concrete requirements. The table below summarizes the common options.
| Fence Type | Typical Height | Post Spacing | Post Depth | Infill |
|---|---|---|---|---|
| Wood Privacy | 6 ft, 8 ft | 8 ft | 2 to 2.67 ft | Solid boards or pickets |
| Wood Picket | 3 ft, 4 ft | 8 ft | 1 to 1.33 ft | Spaced pickets |
| Board-on-Board | 6 ft, 8 ft | 8 ft | 2 to 2.67 ft | Overlapping boards |
| Chain Link | 4 ft, 6 ft | 10 ft | 1.33 to 2 ft | Wire fabric |
| Vinyl / PVC | 4 ft, 6 ft, 8 ft | 8 to 10 ft | 1.33 to 2.67 ft | Panels |
| Metal / Wrought Iron | 4 ft, 6 ft | 8 to 10 ft | 1.33 to 2 ft | Vertical pickets |
Note: Post depth is calculated as 1/3 of the total post length. The total post length is the fence height plus the buried depth. For example, a 6-foot fence needs an 8-foot post buried 2 feet deep. In cold climates, posts should be buried below the frost line.
Wood Fence Species Comparison
All wood fences are not the same lumber. Here is how the three common species compare for a residential fence (2026 national ranges, materials only):
| Species | Material (per sq ft) | Installed (per sq ft) | Lifespan | Notes |
|---|---|---|---|---|
| Pressure-treated pine | $2 – $5 | $5 – $12 | 10 – 15 years | Budget standard; must be ground-contact rated (UC4A+) for posts |
| Cedar | $4 – $8 | $9 – $18 | 15 – 25 years | Naturally rot-resistant; no chemical treatment needed; weathers to silver-gray |
| Redwood | $6 – $12 | $12 – $25 | 20 – 30 years | Premium look and natural decay resistance; coastal-grown grades cost most |
Practical rule: treated pine posts with cedar pickets is the most common cost/longevity compromise — the posts stay affordable where rot risk is highest, and the visible fence face gets cedar's appearance and lifespan.
Fence Cost per Foot
Fence costs vary widely by material, height, and region. The table below shows typical material-only and installed costs in the United States.
| Fence Type | Material (per linear foot) | Installed (per linear foot) | 200 ft Total (material) |
|---|---|---|---|
| Wood Privacy (6 ft) | $8 – $15 | $15 – $25 | $1,600 – $3,000 |
| Wood Picket (4 ft) | $5 – $10 | $10 – $18 | $1,000 – $2,000 |
| Chain Link (6 ft) | $5 – $10 | $8 – $15 | $1,000 – $2,000 |
| Vinyl / PVC (6 ft) | $12 – $20 | $20 – $35 | $2,400 – $4,000 |
| Metal / Wrought Iron (6 ft) | $20 – $35 | $30 – $50 | $4,000 – $7,000 |
Additional costs: Gates typically cost $50 to $300 for a single walk gate and $150 to $600 for a double drive gate, depending on material. Concrete for post holes adds about $3 to $7 per bag. Posts range from $8 to $25 each depending on material. Stain or paint adds $1 to $3 per square foot.
Fence Cost for Common Projects
Here are estimated costs for typical residential fence projects, based on average US prices for wood privacy fencing at $12 per linear foot material cost:
| Project | Length | Height | Material Cost | Installed Cost |
|---|---|---|---|---|
| Small backyard section | 60 ft | 6 ft | $720 – $900 | $900 – $1,500 |
| Average backyard | 150 ft | 6 ft | $1,800 – $2,250 | $2,250 – $3,750 |
| Full backyard enclosure | 250 ft | 6 ft | $3,000 – $3,750 | $3,750 – $6,250 |
| Front yard picket | 100 ft | 4 ft | $500 – $1,000 | $1,000 – $1,800 |
| Pool fence (code-compliant) | 80 ft | 5 ft | $1,600 – $2,800 | $2,400 – $4,000 |
| Agricultural chain link | 500 ft | 6 ft | $2,500 – $5,000 | $4,000 – $7,500 |
* Estimates are based on average US prices as of 2026. Actual prices vary widely by region, material, and contractor. Permit fees and utility marking are additional.
Worked Example
Let us calculate materials for a 200-foot wood privacy fence, 6 feet tall, with one single gate (4 ft wide), 2 corners, and 8-foot post spacing:
Step 1: Calculate effective fence length
Step 2: Calculate sections
Step 3: Count posts
Step 4: Calculate rails
Step 5: Count pickets
Step 6: Calculate concrete
Step 7: Estimate cost
For this project, you would need approximately 33 posts, 50 rails, 440 pickets, and 52 bags of concrete. The material cost is around $2,450 to $2,600. Hiring a contractor for installation would add another $1,500 to $2,500, bringing the total installed cost to approximately $4,000 to $5,000.
Post Depth & Hole Guide
Proper post depth is critical for fence stability. Posts that are too shallow will lean or fall over in wind and rain. Posts that are too deep waste concrete and may interfere with underground utilities.
| Fence Height | Total Post Length | Post Depth (1/3) | Hole Diameter | Concrete per Post |
|---|---|---|---|---|
| 3 ft | 5 ft | 1.67 ft (20 in) | 8 to 10 in | 1 bag |
| 4 ft | 6 ft | 2 ft (24 in) | 8 to 10 in | 1.5 bags |
| 5 ft | 7 ft | 2.33 ft (28 in) | 10 to 12 in | 2 bags |
| 6 ft | 8 ft | 2.67 ft (32 in) | 10 to 12 in | 2.5 bags |
| 8 ft | 10 ft | 3.33 ft (40 in) | 12 in | 3 bags |
Gate posts need larger holes (12 to 14 inches) and more concrete (4 to 5 bags) because they bear the weight of the gate and experience more stress from opening and closing.
The geometry behind the bags: hole diameter is roughly 3× the post width, and hole depth matches the post's buried depth. Hole volume is a cylinder — π × radius² × depth — and the concrete you actually pour is that hole volume minus the volume of the buried post section. The calculator's per-post bag counts above follow this rule of thumb and include typical spillage and over-dig waste.
Frost line: In cold climates (USDA zones 3 to 6), bury posts below the local frost line — typically 36 to 48 inches deep — to prevent frost heave from pushing posts out of the ground.
Soil type: Sandy or loose soil may need deeper posts or wider holes for stability. Clay soil holds posts well but expands and contracts with moisture. Rocky soil may require a powered auger rather than a hand digger.
Tips for Building a Fence
- Check local codes and HOA rules first
Most areas require a fence permit. HOAs often restrict fence height (usually 6 feet max for backyard, 4 feet for front), style, color, and setback from property lines. Call 811 (USA) to have underground utilities marked before digging — it is free and required by law.
- Set posts first, then attach rails
Dig all post holes, set the terminal (end and corner) posts in concrete first, then stretch a string line between them to align the line posts. Let concrete cure for 24 to 48 hours before attaching rails.
- Use pressure-treated or rated posts
Use ground-contact rated (UC4A or higher) lumber for all posts that touch soil. Pressure-treated pine is the most common. Cedar and redwood are naturally rot-resistant. Never use untreated wood for in-ground posts — it will rot within 3 to 5 years.
- Pre-drill holes near board ends
Pre-drill pilot holes for screws near the ends of pickets and rails to prevent splitting. Use exterior-grade screws (not nails) for easier maintenance and replacement. Stainless steel or coated screws resist rust.
- Stain or seal within 30 days
Apply wood stain or sealant within 30 days of installation to protect against moisture, UV damage, and rot. Re-apply every 2 to 3 years. Staining before assembly is easier than staining an erected fence.
- Plan gate placement carefully
Place gates where you will use them most often — near the driveway, side yard, or garden access. Double-swing gates are easier for mowers and equipment. Walk gates should be at least 3 feet wide. Add a self-closing hinge and latch for pool code compliance.
Frequently Asked Questions
References
- International Code Council, "International Residential Code (IRC) — R403.1.6 Foundation Footings," iccsafe.org
- University of Missouri Extension, "Building a Fence: Considerations and Planning," extension.missouri.edu
- Virginia Cooperative Extension, "Fence Planning for Horses and Other Livestock," extension.vt.edu
- Oregon State University Extension Service, "Fencing for Livestock and Small Acreages," extension.oregonstate.edu
Disclaimer: The fence calculator results on this page are estimates for planning purposes only. Actual material quantities may vary based on terrain, soil conditions, local building codes, and fence manufacturer specifications. Always consult a qualified fence contractor and verify quantities with your material supplier before purchasing. Fence prices shown are national averages and will vary by region and supplier.