BenchCalcs
All calculators

Home & DIY · Cost

Fence Cost Calculator

Estimate what a new fence should cost — by length, material, height, gates, and region. You get a low-to-high price range with the fence run, gates, and cost per linear foot broken out.

Inputs

Total run of fence — measure each side and add them up.

Sloped or rocky ground costs more to set posts in.

Adds roughly $3–$10 per linear foot for demo and disposal.

Sets a low / average / high cost tier for your state. You can still change it below.

Result

Adjust the inputs to see your result.

How the estimate works

Fence contractors price by the linear foot of fence run — a single per-foot number that already blends posts, panels, rails, hardware, and labor. The calculator takes your total length (typed directly, or worked out from your yard's length and width), multiplies it by a national per-foot range for your material, then scales for height (a 3- or 4-foot fence is lighter and cheaper to set than an 8-foot privacy wall) and for the ground it sits on.

Each material has its own installed range — from about $10–$25 per foot for chain-link up to $35–$70 for composite and $30–$100 for wrought iron. Gates are added separately (roughly $150–$600 each) because they need hinges, a latch, and a wider, reinforced opening. If you're replacing a fence, removal is added at about $3–$10 per foot. Finally your region scales the whole job up or down. The result is an honest low-to-high range, because real fence bids vary that much by terrain and crew.

The formula

Under the hood the estimate is straightforward, and you can sanity-check any bid against it:

Fence run = length × per-foot rate × height factor × terrain factor
Total = (fence run + gates + removal) × region factor

Height factor runs from 0.75 (a 3-foot fence) to 1.25 (8-foot). Terrain factor is 1.0 on flat ground, 1.15 on a slope, and 1.35 on rocky or root-filled sites. Region factor is 0.85 in lower-cost rural areas, 1.0 at the national average, and 1.25 in high-cost metros. Gates and removal are priced per unit and per foot respectively, then scaled by region but not by height or terrain.

Worked example

Say you're fencing a back yard: 150 linear feet of 6-foot wood privacy fence, 1 gate, on flat ground, at the national average, keeping your old fence. Wood privacy runs $20–$45 per foot:

  • Fence run, low: 150 ft × $20 × 1.0 (height) × 1.0 (terrain) = $3,000
  • Fence run, high: 150 ft × $45 × 1.0 × 1.0 = $6,750
  • One gate: $150 (low) to $600 (high)
  • Total range: $3,150 – $7,350, midpoint ≈ $5,250

Now make it harder: same fence on a rocky slope (×1.35) in a high-cost metro (×1.25), and tear out the old fence ($3–$10/ft). The low end becomes (150 × $20 × 1.35 + $150 + 150 × $3) × 1.25 ≈ $5,800, and the high end climbs past $13,000 — the same length of fence, nearly double the price. That spread is exactly why we show a range and why terrain and region belong in the math, not just the fine print.

Material comparison

MaterialInstalled $/linear ftLifespanUpkeepPrivacy
Chain-link$10–$2520+ yrsVery lowNone
Wood — picket$15–$3515–20 yrsHigh (stain/seal)Low
Wood — privacy$20–$4515–20 yrsHigh (stain/seal)Full
Vinyl / PVC$25–$5525–40 yrsVery low (rinse)Full
Aluminum / ornamental$30–$6040–60 yrsNoneNone
Composite$35–$7025–40 yrsVery lowFull
Wrought iron$30–$10050+ yrsMedium (rust/paint)None

Read the table by job, not by sticker price. For a dog run or a back boundary, chain-link gives you the most enclosed yard per dollar. For a private back yard you want vinyl or a wood privacy fence. For curb appeal on a front yard, ornamental aluminum or wrought iron — open, elegant, and effectively maintenance-free in the case of aluminum.

What drives the price

  • Material is the biggest lever — composite or ornamental aluminum can cost 3× a chain-link fence of the same length.
  • Height adds material and labor: an 8-foot fence needs deeper posts and more panel per foot than a 4-foot one.
  • Gates are pricey per unit — a single drive gate can cost as much as 30–50 feet of fence.
  • Terrain and region swing labor sharply: sloped, rocky, or root-filled ground and high-cost metros push you toward the top of the range.

Common mistakes

  • Not calling 811 first. The free utility locate is mandatory; hitting a gas or power line is dangerous and, in some states, a felony.
  • Skipping the survey. Building inches over the property line is the #1 neighbor lawsuit — and you may have to tear it out.
  • Forgetting the permit. Most cities require one over 6 feet or in the front yard; an HOA may also dictate style and color.
  • Taking one bid. Fence bids for the same run routinely vary 30–40%. Always get three.

DIY vs. hiring a pro

Roughly half of a fence bid is labor, so doing it yourself can cut the price 40–50% — a $5,000 contractor job can land near $2,500–$3,000 in materials. But a fence is more physical and more exacting than it looks: every post must be plumb, set below the frost line, and on a consistent line, or the whole run looks wavy and gates won't hang square. Chain-link and pre-built wood or vinyl panels are the most DIY-friendly. Leave these to a pro: long runs on a slope, anything needing rock drilling, automated driveway gates, and custom welded steel. Whoever does the work, calling 811 for a utility locate is mandatory and free — and on rocky or sloped ground, the labor premium often makes a pro the better value anyway.

When this calculator is the wrong tool

Use a pro quote for: retaining-wall or grade work, automated/electric driveway gates, custom welded steel, or commercial security fencing. This tool estimates a standard residential fence; for tough sites, set the terrain to sloped or rocky and still confirm with an on-site bid.

Sources & how we keep this current

The per-linear-foot ranges, gate pricing, and removal costs here are national averages compiled from public 2024–2026 home-improvement cost guides — primarily Angi and HomeAdvisor, cross-checked against Forbes Home and Fixr. Lifespan and maintenance figures draw on manufacturer guidance and trade sources such as the American Fence Association. We re-check the ranges a few times a year and update the underlying data file (last verified June 2026) when published averages move. These are planning numbers, not a quote: regional labor rates, soil and terrain, material availability, and your specific layout all swing the real bid, so always get two or three written estimates from licensed local fence contractors before you commit.

Related guide

FAQ

Questions, answered

How much does it cost to install a fence?
Most homeowners pay roughly $15–$45 per linear foot installed, so a typical 150-foot wood privacy fence runs about $3,000–$7,500 with one gate. Chain-link is cheapest at $10–$25 per foot; composite and ornamental aluminum top the range. Your final price depends on material, height, number of gates, terrain, and local labor rates.
What's the cheapest fence material?
Chain-link is the cheapest at roughly $10–$25 per linear foot installed, followed by wood picket at $15–$35. Chain-link gives you the most enclosed yard per dollar, which is why it's the go-to for dog runs and back boundaries. The trade-off is curb appeal and privacy.
Vinyl vs wood fence — which costs more?
Vinyl costs more up front (about $25–$55 per foot vs $20–$45 for a wood privacy fence), but it never needs staining, sealing, or painting and won't rot or warp. Over 15–20 years vinyl often costs less than wood once you count the repainting and board replacement a wood fence needs.
Do I need a permit or a survey to build a fence?
Usually yes to a permit for anything over about 6 feet, and often for any fence in the front yard — check your city or HOA rules first. A property survey is strongly recommended: building even a few inches over the line is the single most common neighbor lawsuit, and you may be forced to tear it down.
How is fence cost calculated per linear foot?
Contractors price by the linear foot of fence run, which already blends posts, panels, hardware, and labor. This calculator multiplies your fence length by a per-foot material rate, scales it for height (a 4-foot fence is cheaper than an 8-foot one) and for terrain (sloped or rocky ground costs more to set posts in), adds a per-gate cost, optionally adds removal of the old fence, then adjusts for your region. Gates are priced separately because they need hardware and a wider opening.
How much does it cost to remove an old fence?
Budget about $3–$10 per linear foot to tear out and haul away an existing fence — so $450–$1,500 on a 150-foot run. Chain-link and wood come out fastest; setting old posts in concrete is the slow, expensive part because each footing has to be dug or broken out. Tick the removal box in the calculator to fold this into your estimate. Some contractors discount removal if they're also installing the new fence.
Does sloped or rocky ground really cost more?
Yes — it's one of the biggest hidden cost drivers. On a slope, panels have to be stepped or racked and posts set at varying depths, which slows the crew. Rocky soil or heavy tree roots can force an auger swap, hand-digging, or even rock drilling at a per-hole premium. We add roughly 15% for sloped or uneven ground and about 35% for rocky, root-filled sites. Always get a bid after a site visit, never sight-unseen, for anything but flat ground.
How much does a wrought iron fence cost?
Real wrought iron (and welded steel sold as ornamental iron) runs about $30–$100 per linear foot installed — the widest range of any common material — because much of it is custom-fabricated and heavy to handle. It's the priciest option at the top end but lasts 50+ years and offers security with an open, see-through look. If you want the iron look for less, powder-coated aluminum mimics it at roughly half the cost and never rusts.
Wood vs vinyl vs composite — what lasts longest?
Aluminum and wrought iron last longest (40–60+ years), followed by vinyl and composite (25–40 years with almost no upkeep). A pressure-treated wood privacy fence lasts about 15–20 years but only if you re-stain or seal it every 2–3 years; neglected, it grays, warps, and rots far sooner. Chain-link's galvanized or vinyl-coated mesh easily lasts 20+ years. The cheapest fence to buy is rarely the cheapest to own.
How many posts and how much concrete will I need?
Posts go every 6–8 feet, so a 150-foot fence needs roughly 20–26 line posts plus end, corner, and gate posts. Plan on 1–2 bags of fast-setting concrete per post for a standard residential fence (more for tall or heavy panels). Set posts at least one-third of their above-ground height deep, and below your local frost line, or winter heave will push them up and out of line.