How to measure the fence line
Walk the planned fence line and measure every straight run in feet, then add them up. Include gate openings in the total: the calculator adds one extra post per gate rather than subtracting the opening. If you’re fencing along a property line, confirm where the line actually is first. A survey or the corner pins on your plat is far cheaper than moving a finished fence.
Before choosing a height, check your town’s zoning code and any HOA rules. Backyard fences are commonly limited to 6 ft, and front-yard fences are often limited to 3–4 ft.
Worked example: 150 ft of 6 ft wood privacy fence
These are the calculator’s default inputs: 150 ft, 6 ft tall, wood privacy, one walk gate, posts 8 ft apart, hire a contractor, national average prices.
| Step | Calculation | Result |
|---|---|---|
| Sections | 150 ÷ 8 = 18.75, rounded up | 19 |
| Posts | 19 + 1 + 1 for the gate | 21 |
| Rails | 19 sections × 3 | 57 |
| Pickets | 150 × 12 ÷ 5.5, rounded up | 328 |
| Concrete per post | (π × 5.25² − 3.5²) × 24 in ÷ 1,728 | 1.03 cu ft |
| Concrete bags | 21 × 1.03 ÷ 0.60, rounded up | 37 × 80 lb |
| Fence, installed | 150 ft × $25–$50 | $3,750 – $7,500 |
| Gate, installed | 1 × $400–$800 | $400 – $800 |
| Total | $4,150 – $8,300 |
That’s about $28–$55 per linear foot including the gate. Building it yourself, the materials come to $1,500–$4,500 plus the concrete (37 bags at the default price of $5.68 is about $210).
How the post holes are sized
The calculator follows two common rules of thumb. Posts are buried one third of the fence height (24 in for a 6 ft fence, so you’d buy 8 ft posts), and holes are three times the post width in diameter, 10.5 in for a 4x4 post that’s 3.5 in square. Each hole is dug 6 in deeper for a gravel base so water drains away from the post end. Concrete fills the ring around the post above the gravel, which is why the volume is the hole minus the post.
In cold climates, posts should go below the local frost line, which may be deeper than one third of the height. Your building department can tell you the required depth.
What drives the cost
- Material. Installed ranges per foot run $10–$40 for chain link, $25–$50 for wood privacy, $30–$60 for vinyl and $25–$75 for aluminum. The comparison table shows each for your fence.
- Height. Taller fences use longer posts, more boards and more labor. The calculator scales the 6 ft prices by 0.8× for 4 ft and 1.3× for 8 ft. These multipliers are editorial estimates, not published averages.
- Gates. Each walk gate adds $400–$800 installed. Double drive gates cost considerably more.
- Terrain and soil. Slopes require stepped or racked panels, and rocky soil or roots can slow hole digging dramatically.
- Old fence removal and permits are not included.
DIY vs hiring a pro
Choosing DIY changes the estimate to materials only: the per-foot material range times your length, plus concrete bags at your price. For a wood privacy fence, that’s $10–$30 per foot against $25–$50 installed. The trade-off is labor: 21 post holes at 30 in deep is a lot of digging, so rent a one- or two-person power auger. Call 811 a few days before you dig so buried utilities get marked. DIY totals don’t include gate kits, hinges, gravel, fasteners or stain.
Related tools
For a single post or a few deck footings, the concrete calculator handles round holes directly. Use the gravel calculator for post-hole gravel or a path along the fence, and the paint calculator to estimate stain for a wood fence.
How this calculator works
- Sections = length ÷ post spacing, rounded up. Posts = sections + 1 + number of gates.
- Concrete per post = (π × (hole diameter ÷ 2)² − post width²) × buried depth, converted from cubic inches to cubic feet. Bags = total ÷ 0.60, rounded up.
- Pro cost = installed range × length × height multiplier × local factor + gates × gate range × local factor.
- DIY cost = material range × length × height multiplier + concrete bags × bag price.
Assumptions and limitations
- Installed and material prices are national 2026 ranges per linear foot for a 6 ft fence. 4 ft and 8 ft fences are scaled by 0.8× and 1.3× — an editorial assumption, not a published figure.
- Posts are 4x4 (3.5 in actual) set one third of the fence height deep in a hole three times the post width (10.5 in), on 6 in of gravel. One extra post is added per gate.
- Wood fences use 2 rails per section up to 4 ft tall and 3 rails above that, with 5.5 in pickets installed edge to edge.
- Concrete is 80 lb bags yielding 0.60 cu ft each. Pro prices include concrete; DIY totals add it separately.
- DIY totals exclude gate kits, gravel, fasteners, stain, tool rental and permits. Pro totals exclude old-fence removal, surveys, grading and permits.
These results are planning estimates, not quotes. Local prices, site conditions and building codes vary, so get written estimates from licensed contractors before you commit to a budget.
Try your own numbers. Every price and assumption above is editable in the estimator.
Back to the fence estimatorFrequently asked questions
How deep should fence posts be?
How far apart should fence posts be?
Is it worth building a fence yourself?
Sources and data
- HomeGuide (2026) — privacy fence cost
- HomeGuide (2026) — fence installation cost
- HomeGuide (2026) — wood fence cost
- Angi (2026) — vinyl fence cost
- HomeGuide (2026) — chain link fence cost
- Inch Calculator — cost to install fence
- Angi — how far apart should fence posts be
- HomeGuide (2026) — concrete prices
- Angi (2026) — how much does it cost deliver concrete
- Quikrete data sheet (Concrete Mix No. 1101)
- ShopSavvy price tracker (Lowe's listing) — quickrete 80lb concrete mix
- HomeGuide (2026) — concrete slab cost
Prices are US national ranges reviewed October 2026 (data version 2026.10). A few values are editorial estimates where no single published source exists; the Cost Index marks each one. Read our methodology and editorial policy.