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.
| Fence length | Posts at 6 ft spacing | Posts at 8 ft spacing |
|---|---|---|
| 50 ft | 10 | 8 |
| 100 ft | 18 | 14 |
| 150 ft | 26 | 20 |
| 200 ft | 35 | 26 |
| 300 ft | 51 | 39 |
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]
| Feature | Guideline |
|---|---|
| Height | Top at least 48 in above grade, measured outside the pool area |
| Gap at the bottom | No more than 4 in above the ground |
| Chain-link mesh | No larger than 1¼ in square without slats |
| Local rules | Some 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
- Sections: 150 ÷ 8 = 18.75, rounded up to 19.
- Posts: 19 + 1 + 1 gate = 21.
- 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
- American Housing Survey 2023, Table C-16-OO: Home Improvement Costs, Owner-Occupied Units
- Call Before You Dig (811)
- Safety Barrier Guidelines for Residential Pools (Publication 362)
- Publication 936 (2025), Home Mortgage Interest Deduction
- What is the difference between a home equity loan and a home equity line of credit (HELOC)?
- What You Should Know About Home Equity Lines of Credit (HELOC)