KitQuarter

Fence Cost Calculator

Work out what a new fence costs before you call a contractor. Enter the fence length, material and height to see an installed estimate with gates and a contingency allowance.

Add all runs together. A typical backyard is about 150 linear ft.

Chain link is the lowest cost. Vinyl and composite cost more and need less upkeep.

Taller fences use more material per foot, so the rate scales with height.

Each gate costs $350 installed, including posts and hardware.

A buffer for slope, rock and old fence removal. 10% is typical.

Formula: fence run = length x rate per linear ft x height factor. Total = (fence run + gates x $350) x (1 + contingency).

James Carter, Math and Tools Editor
Reviewed by James Carter, Math and Tools Editor · 47 calculator guides
Formulas verified against standard references. Calculator logic tested with verified worked examples. Published: November 11, 2026 | Last updated: November 11, 2026. Fact-checked: November 11, 2026. Our methodology

How to Use the Fence Cost Calculator

Getting a fence estimate takes five quick entries. The tool prices the fence run by length, material and height, then adds gates and your contingency.

  1. Enter the total fence length in linear feet, adding all runs together.
  2. Pick your fence material. Chain link is the lowest cost, wood sits in the middle, and vinyl, aluminum and composite cost more.
  3. Pick the fence height, then enter the number of gates.
  4. Set your contingency and press Calculate, or press Enter. The total appears first and large, with the fence run cost, the cost per linear foot and the contingency below. Press Reset to clear the form and start over.
A photo of a worker installing a wooden privacy fence in a suburban backyard on a sunny day
A 150 ft wood fence at 6 ft high costs about $5,335 with one gate and contingency.

The Fence Cost Formula

The fence cost formula is total = (length x rate per linear ft x height factor + gates x $350) x (1 + contingency). The rates per linear foot at 6 ft high are $18 for chain link, $30 for wood privacy, $45 for vinyl, $40 for aluminum, and $55 for composite. These are midpoints of the ranges in the HomeGuide and Angi 2026 guides, which put installed fencing at $6 to $50 per linear foot across all materials.

The height factor is 0.8 for a 4 ft fence, 1.0 for a 6 ft fence, and 1.25 for an 8 ft fence, because a taller fence uses more material per foot. Our fence calculator works out how many posts, rails and pickets the same fence needs.

Worked Example: 150 ft Wood Privacy Fence

A fence is 150 linear ft long, wood privacy at 6 ft high, with one gate and a 10% contingency. Here is exactly what the calculator does.

  1. Fence run: 150 x $30 x 1.0 = $4,500.
  2. Gates: 1 x $350 = $350.
  3. Contingency: 10% of $4,850 = $485.
  4. Total: $4,850 + $485 = $5,335.

That works out to $35.57 per linear foot. As a second check, a 100 ft chain link fence costs 100 x $18 = $1,800, plus 10% contingency, for $1,980 with no gates. The same steps work for any fence, so try your own numbers in the tool above.

A photo of a close-up of a white vinyl fence with a gate latch and a measuring tape along the fence line
Vinyl costs more up front and needs almost no upkeep.

Fence Cost by Material

Chain link is the cheapest way to fence a yard, at about $18 per linear foot installed for a 6 ft fence. It suits pets and security, but it gives no privacy. Wood privacy is the middle choice at about $30 per foot, and it gives full privacy at a fair price, though it needs staining or sealing every few years.

Vinyl costs about $45 per foot and needs almost no upkeep, aluminum costs about $40 and suits pools and slopes, and composite costs about $55 and lasts 25 to 30 years without refinishing. Lifespans run 15 to 25 years for chain link, 15 to 20 years for wood, 25 to 30 years for vinyl and composite, and 30 to 50 years for aluminum, so the dearest fence is not always the dearest per year.

Gates, Slope and Permits

Gates cost more than the fence run per foot, because each gate needs two posts, hinges, a latch and often a frame. This calculator prices each gate at $350 installed. A wide double gate for a driveway costs more than a walk gate, so treat $350 as a planning figure for a standard walk gate.

Slope adds labor, because posts must be stepped or racked to follow the ground, and rock adds time to digging post holes. Old fence removal is a separate cost, often a few dollars per linear foot. Most towns require a fence permit, often $20 to $150, and a fence on the wrong side of the property line can cost far more to fix, so confirm the line before you dig.

How to Keep the Fence Budget in Check

Pick the shortest fence that does the job. A 4 ft fence costs about 20% less per foot than a 6 ft fence, and chain link costs about 40% less than wood privacy, so a shorter chain link fence around a large yard saves a large amount. Keep the gate count low, since each gate adds $350.

Get three itemized bids before you set a budget, and check that each one lists the fence run, the gates, the removal of the old fence and the permit separately. Keep your 10% contingency untouched until the posts go in. Our concrete calculator prices the post concrete, and our lumber calculator prices the wood for a wood fence.

A photo of a long chain-link fence running along a green backyard boundary at golden hour
Chain link is the lowest cost way to fence a large yard.

Frequently asked questions

How much does a fence cost per linear foot?

Installed fencing costs $6 to $50 per linear foot across all materials, according to Angi 2026. At 6 ft high, chain link runs about $18, wood privacy about $30, aluminum about $40, vinyl about $45, and composite about $55 per foot in this calculator.

How much does a 150 ft wood fence cost?

A 150 ft wood privacy fence at 6 ft high costs about $5,335 with one gate and a 10% contingency. The fence run alone is $4,500, the gate adds $350, and the contingency adds $485.

What is the cheapest fence to install?

Chain link is the cheapest fence, at about $18 per linear foot installed for a 6 ft fence. A 100 ft chain link fence costs about $1,980 with a 10% contingency and no gates.

How long does a wood fence last?

A wood fence lasts 15 to 20 years with regular staining or sealing. Without upkeep it rots sooner, especially where posts meet damp soil, so set posts in concrete and keep the bottom clear of soil.

Do I need a permit to build a fence?

Most towns require a fence permit, often $20 to $150, and some neighborhoods limit fence height and style. Check the local rules and the property line before you dig any post holes.

How many posts does a 150 ft fence need?

Fence posts are usually spaced 8 ft apart, so a 150 ft fence needs about 19 posts. Divide the length by 8 and round up, then add one post for the start of the run.

This is an estimate for planning only, and actual prices vary by material, labor, site and area, so get at least three itemized bids before you set a budget.