CalcBuiltAll calculators

Fence Cost Calculator

A fence cost calculator that prices an installed fence by material, height, terrain and gates, with typical 2026 US per linear foot ranges and a labor split.

By CalcBuilt Editorial TeamUpdated September 9, 2026Formulas checked against manufacturer specs, see how we calculate.

Quick answer: To price a fence, multiply the fence line by an installed rate per linear foot for the material and height, then add each gate as its own line item. A 150 ft pressure treated wood fence 6 ft tall on flat ground with one 4 ft gate typically runs $4,100 to $7,800, or $28 to $52 per linear foot.
Your measurements
rails per sectionPost spacingHeight
Fence elevation: posts at a set spacing, rails between them, pickets covering the run.
Results update as you type. The link in your address bar saves these entries.

Results

Total range
$4,100 to $7,800
150 ft of pressure treated wood fence 6 ft tall on flat and clear ground, with 1 gate
Cost per linear foot
$28 to $52 per linear ft
Measured over the full 150 ft including the gate openings, which is how installers quote a fence
Materials versus labor
$1,863 to $3,515 of materials
Labor, equipment and disposal are the other $2,277 to $4,296. Materials run 40 to 50 percent of an installed fence, so doing the digging and setting yourself saves less than half
Gates
$490 to $1,240
1 gate at 4 ft wide, including the extra post, hinges, latch and a diagonal brace. A gate leaf over 5 ft sags unless it is welded or trussed
Survey and utility locate
$400 to $900
A residential boundary survey, typically $400 to $900. The 811 utility locate is free in every state and takes 2 to 3 business days, so call before the crew arrives

Fence Cost formula

Fence line = Total length - gates x gate width
Rate per ft = material rate x height factor x terrain factor x post setting factor
Gates = Gates x (base + width x per-foot hardware rate) x material factor
Total = Fence line x rate + Gates + Removal x $3 to $8 per ft

Worked example

A 300 ft vinyl privacy fence 6 ft tall across a sloped lot, with one 4 ft walk gate and one 10 ft double drive gate, posts set in concrete. The fence line is 300 - 4 - 10 = 286 ft. Vinyl at $30 to $60 times the 1.15 slope factor gives $34.50 to $69.00 per foot, so the line costs $9,867 to $19,734.

The walk gate is (250 + 4 x 60) x 1.2 = $588 low and (600 + 4 x 160) x 1.2 = $1,488 high. The drive gate is (250 + 10 x 60) x 1.2 = $1,020 and (600 + 10 x 160) x 1.2 = $2,640. Total lands near $11,500 to $23,900, or $38 to $80 per linear foot. The two gates alone are 14 percent of the low end.

Quick reference

Typical 2026 US installed price per linear foot, flat ground, posts in concrete
Material4 ft6 ft8 ft
Chain link$12 to $23$15 to $30$20 to $40
Pressure treated wood$20 to $35$25 to $45$33 to $59
Vinyl$23 to $47$30 to $60$40 to $79
Western red cedar$27 to $47$35 to $60$46 to $79
Ornamental aluminum$27 to $55$35 to $70$46 to $92
Composite$35 to $70$45 to $90$59 to $119

What sets the price per foot

Four things move an installed fence price: the material, the height, the ground and the gates. Material is the big one, from chain link at $15 to $30 per foot up to composite at $45 to $90. Height matters less than people expect, because the holes, the concrete and the labor barely change between a 4 foot and a 6 foot fence. Going to 8 feet adds a third rail and longer posts, roughly a third more.

Ground condition is the line nobody quotes until they walk it. Slope means stepping the panels or racking them, and rigid vinyl and aluminum panels will not rack, so a sloped lot in vinyl gets stepped panels with a wedge of daylight under each one. Rock, tree roots or hardpan can turn a 20 minute auger hole into an hour with a rock bar, which is why a bid usually carries an unforeseen conditions clause.

Gates, corners and the property line

Gates are priced per gate, not per foot, because each one takes an oversized post, hinges, a latch, a drop rod on a double, and a diagonal brace. A single leaf over 5 feet wide sags unless it is welded steel or trussed with a cable and turnbuckle, so a 10 foot opening is normally hung as two 5 foot leaves. Budget a 6x6 or a steel post for any gate, set 6 inches deeper than the line posts.

Before any of that, settle the line. Find the survey pins, and if they are gone, a residential boundary survey typically runs $400 to $900, which is far less than moving a finished fence. Call 811 for the free utility locate and allow 2 to 3 business days. Then read the zoning code and the HOA rules for height, setback from the sidewalk, corner lot sight triangles, and whether the finished side has to face out.

What this calculator leaves out

Clearing along the line: brush, stumps, a hedge or a retaining wall that has to come out first. Grading, drainage swales and any fence that crosses a creek or a drainage easement. Automatic gate operators, keypads, intercoms and the trenched power and low voltage runs they need, which alone run into the thousands. Staining or painting a new wood fence, which is a separate crew and normally waits 3 to 6 months for treated lumber to dry.

It also leaves out permit fees where the height or the zoning triggers one, an engineered design for a fence over 7 feet or in a high wind zone, and the extra depth frost requires. It assumes one straight property line. Every corner adds a braced post, and a fence that turns four times costs more per foot than the same footage in a straight run.

Code limits that apply

  • IRC R105.2checked

    Fences not over 7 ft high are exempt from a building permit

    If you miss it: An 8 ft privacy fence built without a permit gets a stop work order and often an order to cut it down to the zoning limit

  • IRC R317.1

    Any post or rail in ground contact carries a UC4A or UC4B ground contact stamp

    If you miss it: Above-ground UC3B 4x4 posts rot at the soil line in 5 to 8 years and the whole fence leans before the warranty runs out

  • ISPSC 305.2

    Pool barrier 48 in min, no opening passing a 4 in sphere, self-closing self-latching gate

    If you miss it: A fence that doubles as a pool barrier fails final inspection over gate latch height and the pool cannot be filled

Rows marked checked produce a warning in the results when an entry crosses the limit. The others are on the plans or on site and this calculator does not test them. Local amendments can be stricter; the adopted edition and the inspector govern.

Mistakes that cost money

  • Building on the neighbor's side of the line means moving the whole fence; find the survey pins or pay for a survey first.
  • Most ordinances and HOAs require the finished side to face outward, which changes the post layout and what the bid covers.
  • Front yard height caps are commonly 4 ft against 6 ft in the rear, so a 6 ft fence carried around the corner gets cut down.
  • Rigid vinyl and aluminum panels do not rack; on slope they step, and each step leaves a wedge gap a dog can get under.
  • A 4 ft gate hung on a 4x4 sags within a season; budget a 6x6 or steel gate post set 6 in deeper with a diagonal brace.
  • Corner, end and gate posts carry the fence tension and take a bigger hole and a third bag of concrete than line posts.

Key facts

  • A square acre measures 208.7 ft on each side, so fencing one takes roughly 835 linear feet of fence line.
  • IRC R105.2 exempts fences not over 7 ft high from a building permit, though local zoning height limits and setbacks still apply.
  • Materials typically account for 40 to 50 percent of an installed residential fence price, with labor, equipment and disposal making up the rest.
  • A residential boundary survey typically runs $400 to $900, and the 811 utility locate before digging is free in every US state.
  • Chain link is the cheapest common fence at typically $15 to $30 per linear foot installed at 6 ft, while composite runs $45 to $90.

Frequently asked questions

How much does a fence cost per foot?

Installed in 2026 at 6 ft tall on flat ground, chain link typically runs $15 to $30 per linear foot, pressure treated wood $25 to $45, vinyl $30 to $60, cedar $35 to $60, aluminum $35 to $70 and composite $45 to $90. Slope, rock and gates push those up.

How much does it cost to fence an acre?

A square acre is 208.7 ft on a side, so about 835 linear feet of fence. In pressure treated wood 6 ft tall that is roughly $21,000 to $38,000 installed, and in chain link 4 ft tall about $9,800 to $19,500. An irregular acre needs more fence than a square one.

Is it cheaper to build a fence myself?

Materials are only 40 to 50 percent of the installed price, so doing it yourself saves at most half. You still rent an auger, buy the concrete and haul the waste, and a misread property line costs more than the labor you saved.

Who pays for a fence between neighbors?

It depends on where the fence sits. A fence entirely on your land is yours to pay for and maintain. Many states have a division fence statute that lets adjoining owners share the cost of a boundary fence, but it usually requires written agreement before the work starts.

Sources and references

Next steps for this project

  1. Post Holes
  2. Floor Joists
  3. Deck
  4. Stairs
  5. Baluster Spacing
  6. Fence
  7. Board feet

The usual order for a framing, decks & fences project. See all framing, decks & fences calculators.

Results are estimates based on standard formulas and typical product specifications. Confirm quantities with your supplier and local code before ordering.