Fence budget

Fence cost calculator

A fence costs its length times the installed price per foot in your quote, plus gates and removal of any old fence. A 150 ft fence with posts every 8 ft has 19 sections and 21 posts including one gate. In the Census Bureau's 2023 survey, the median fencing job cost $2,300. This fence cost calculator totals yours.

HELOC Payment Calculator editorial teamUpdated 6 sources

Calculator

Fence cost

Length, posts and gates, priced from your quote

Layout

ft
ft

Your quote

$
$
Remove an old fence?
$
Posts2119 sections + 1 gate post
Length150 ft
Survey median job$2,300average $3,940 · Census AHS 2023, fencing and wall jobs

Enter your installed price per foot (and gate and removal prices) from a written quote to see the cost.

How it is calculated. Sections = fence length ÷ post spacing, rounded up. Posts = sections + 1, plus one per gate. Cost = length × price per foot + gates × gate price + removal (length × removal price, if chosen) + other items.

How the fence cost calculator counts posts and cost

A straight run of fence has one more post than it has sections, so the calculator divides the length by your post spacing, rounds up, and adds one; each gate adds a post for its latch side. Corners and ends of separate runs need their own posts, so for an L- or U-shaped fence, run each straight side through the calculator or add a post per extra corner. Installers usually quote the fence itself per linear foot with posts included, and gates as separate items.

Posts for one straight run (no gates)
Fence lengthPosts at 6 ft spacingPosts at 8 ft spacing
50 ft108
100 ft1814
150 ft2620
200 ft3526
300 ft5139

Use the spacing your fence product or installer specifies. The calculator does not assume a standard, because panel widths and wind and soil conditions differ.

What fencing jobs cost: the survey number

Owners reported 5.7 million fencing and wall jobs over two years in the Census Bureau's 2023 American Housing Survey, with a median of $2,300 and an average of $3,940.[1] That category includes repairs, short runs and do-it-yourself work, so a full new perimeter fence installed by a contractor can cost well above the median. Your own total is length × your price per foot plus the gates.

Call 811 before the post holes

Digging post holes is excavation. Every state has a one-call notification center and requires by law a call 48 to 72 hours before digging, and the federal pipeline safety agency stresses that this applies to private homeowners as well as contractors.[2] Marking takes a few days, so build it into the schedule before the installer arrives.

Pool fences: the barrier guidelines

A fence around a pool has to do more than mark the yard. The U.S. Consumer Product Safety Commission's barrier guidelines recommend a barrier at least 48 inches high measured on the side away from the pool, with no more than 4 inches of clearance at the bottom; chain-link mesh should be no larger than 1¼ inches unless slats are fastened in.[3] The guidelines are recommendations, not mandatory standards, and some states and localities require 60 inches, so the local code decides.[3]

Pool barrier points from CPSC Publication 362 (recommendations)
FeatureGuideline
HeightTop at least 48 in above grade, measured outside the pool area
Gap at the bottomNo more than 4 in above the ground
Chain-link meshNo larger than 1¼ in square without slats
Local rulesSome jurisdictions require 60 in; check yours

A pool fence costs more per footSelf-closing, self-latching gates and closer picket spacing add cost. Enter the pool section as its own run with its own price per foot and gate price.

Worked example: 150 ft of fence with one gate

  1. Sections: 150 ÷ 8 = 18.75, rounded up to 19.
  2. Posts: 19 + 1 + 1 gate = 21.
  3. Cost: 150 × your installed price per foot + 1 × your gate price, plus removal and permit if they apply.

The calculator also reports the all-in price per foot, gates included, which is the number to compare between bids.

Paying for a fence

Most fences are paid in cash, but a fence financed with home equity raises two questions. Interest on home equity debt is deductible only when the money buys, builds or substantially improves the home; the IRS counts work that adds value as an improvement and work that only maintains the home as a repair.[4] And a home equity loan pays one lump sum while a HELOC lets you draw as needed, usually at an adjustable rate;[5] both are secured by the house.[6] Compare options in the home improvement loan calculator. Planning a deck or an outbuilding too? See the deck cost calculator or the pole barn cost calculator and measure the yard with the square footage calculator.

Frequently asked questions

How much does a 150 ft fence cost?

150 × your installed price per foot, plus each gate and any old-fence removal. At 8 ft spacing it needs 19 sections and 20 posts, plus a post per gate.

How many fence posts do I need?

For a straight run: the length divided by the post spacing, rounded up, plus one. Add a post for each gate and for each corner where runs meet.

Do I need to call 811 before installing a fence?

Yes. All states require a call to the one-call center 48 to 72 hours before digging, and that includes homeowners digging post holes.[2]

How tall does a pool fence have to be?

The CPSC's guidelines recommend at least 48 inches, with no more than 4 inches of clearance at the bottom; some places require 60 inches. The guidelines are not mandatory, so your local code governs.[3]

Sources

  1. American Housing Survey 2023, Table C-16-OO: Home Improvement Costs, Owner-Occupied Units · U.S. Census Bureau, 2023 AHS release
  2. Call Before You Dig (811) · Pipeline and Hazardous Materials Safety Administration, U.S. Department of Transportation, accessed November 13, 2026
  3. Safety Barrier Guidelines for Residential Pools (Publication 362) · U.S. Consumer Product Safety Commission, April 2023
  4. Publication 936 (2025), Home Mortgage Interest Deduction · Internal Revenue Service, for 2025 returns, reviewed April 30, 2026
  5. What is the difference between a home equity loan and a home equity line of credit (HELOC)? · Consumer Financial Protection Bureau, reviewed August 28, 2026
  6. What You Should Know About Home Equity Lines of Credit (HELOC) · Consumer Financial Protection Bureau, August 2022