CalcMyPool

Pool Fence Cost Calculator

Enter your pool's size and how far the fence will stand from the water. The calculator works out how long the fence is, prices it for the material and height you pick, adds the gates and any extras, each from low to high, and lines up every material for the same fence. A checklist shows the barrier rules most codes use. Have a quote already? Enter it to see where it falls.

Pool

Set in the ground, with the fence on the deck or the lawn around it.

Measure the water, inside the coping.

32 × 16 ft is an example: enter yours.

Usually the deck's width, 3 to 5 ft. Mesh fences go at least 20 in from the water; metal closer than 5 ft has to be bonded.

Optional. Where a house wall or an existing fence that meets the code closes part of the run, enter that length (doors into the pool area then need alarms or self-closing doors). Measured the whole fence already? Enter it on the right to use it instead.

$20 to $45 per foot installed, at 4 ft tall.

Height

The minimum in most codes. Some towns require 60 in: check yours.

Self-closing and self-latching, $200 to $800 each. Some installers include one in the per-foot price: ask.

Ground

A level deck or lawn.

The national figures the guides give.

Add to the budget

Bonding ties a metal fence to the pool's bonding grid, as the electrical code asks within 5 ft of the water. It comes on by itself when the fence is that close.

The total from an installer, to see where it falls.

Pool fence cost

$2,960 – $7,310

4 ft aluminum fence, 128 ft long around a 32 × 16 ft pool, with 1 gate, bonding and the permit.

  • 128ft of fence
  • $23–57per foot, all in
  • 1gate

What it adds up to

ItemLowHigh
Aluminum fence, 128 ft, 4 ft tall$2,560$5,760
Self-closing gate, 1$200$800
Bond the metal fence (electrician)$150$600
Permit$50$150
Total$2,960$7,310

Installers quote one total. Ask what it includes: gates, posts set in concrete or core-drilled into the deck, hauling the old fence, and the permit.

Every material, same fence

MaterialPer footAll in
Removable mesh$10–30/ft$1,680–5,390
Black chain link$5–16/ft$1,040–3,600
Aluminum$20–45/ft$2,960–7,310
Vinyl$15–40/ft$2,170–6,070
Wood$12–33/ft$1,790–5,170
Steel or wrought iron$20–40/ft$2,960–6,670
Glass, framed or semi-frameless$95–175/ft$12,560–23,950
Glass, frameless$150–350/ft$19,600–46,350

Same length, height, gates and extras; bonding only for the metal ones (wood and vinyl need none). Prices per foot are for a 4 ft fence. Mesh and aluminum are the usual pool choices; glass costs the most.

Barrier checklist

  • A 4 ft (48 in) fence meets the minimum most codes use (ISPSC, CPSC), measured on the outside. Some towns require 60 in.
  • That height must hold for 3 ft outside the fence: no planters, steps, walls or equipment a child could climb to get over (ISPSC).
  • No more than 2 in under it over grass or gravel, 4 in over concrete.
  • No gap a 4 in ball could pass. With rails under 45 in apart, keep them on the pool side and the pickets no more than 1¾ in apart.
  • Gates open outward, away from the pool, close and latch by themselves, and can be locked. A latch lower than 54 in goes on the pool side, at least 3 in below the top.
  • At 4 ft from the water, a metal fence has to be bonded to the pool (NEC 680.26(B)(7)). At 5 ft or more, it doesn't.

Before you get quotes

  1. The 32 × 16 ft pool with a 4 ft aluminum fence 4 ft from the water is an example. Enter yours.
  2. Call your building department first. Ask which barrier code they use, the height, whether the house wall may be one side, and whether the fence needs a permit and an inspection before the pool is filled.
  3. Get at least three written quotes for the same fence: material, height, length, number and type of gates, posts in concrete or core-drilled, and who pulls the permit. Ask whether a gate is included in the per-foot price.
  4. Check your HOA's rules on fence style and color, and ask your home insurer whether it has fence rules of its own.
  5. Call 811 a few days before the post holes are dug.
  6. Tell the installer and your electrician the fence must be bonded, so it's done before the deck or the inspection.
  7. Pricing the whole pool? The pool cost calculator includes the fence along with the deck and extras.

How it was worked out

Fence length = 2 × (32 ft + 16 ft) + 8 × 4 ft = 128 ft. Fence = 128 ft × $20 to $45 per foot = $2,560 to $5,760. Gates = 1 × $200 to $800 = $200 to $800. Bonding = $150 to $600. Permit = $50 to $150. Total = $2,960 to $7,310 (each worked-out line to the nearest $10).

How much does a pool safety fence cost?

For a 16 × 32 ft pool with the fence 4 ft from the water, the fence is about 128 ft long. In 4 ft aluminum with one self-closing gate, that usually costs about $2,760 to $6,560; in removable mesh about $1,480 to $4,640. Bonding the metal fence to the pool and the permit bring the aluminum fence to about $2,960 to $7,310, the calculator's opening example. The material sets most of the price, then the length, the number of gates, the height, the ground and local labor rates.

The national cost guides give quite different totals, mostly because they price different fences:

SourceTypical totalPer foot, installed
Angi and HomeAdvisor$1,500–10,000, about $4,000 on average$15–25 on average
HomeGuide$2,000–13,500 for 200–300 ft; $7,800 on average$10–45
Fixr$3,000–10,000; $6,500 for 100 ft of aluminum with a gate and a safety net$5–40, glass $95–210
HomeGnome$1,700–5,100 for 100–300 ft in budget materials, $3,400–10,200 in premium$17–34
Life Saver (mesh maker)100 ft with one gate: mesh $2,000–2,700, aluminum $2,700–3,500$10–50, glass $80–350

Real quotes land anywhere in those ranges, and sometimes above. A Raleigh, North Carolina installer quoted on Thumbtack prices 4 ft black aluminum at about $20 to $21 a foot with one or two gates included, or $25 with custom arched gates: $4,000 to about $7,350 for the 200 to 350 ft pool fences typical in his area. On Reddit, a homeowner reported $12,000 for 243 ft of 4 ft decorative aluminum around a yard, with a 14 ft double gate and a walk gate: about $49 a foot. If your quotes come in higher than the national figures, pick "High-cost metro" in the calculator and compare again.

Pool fence cost per foot by material

Each range below is the part at least two of the guides agree on, for a 4 ft fence, installed. The last column is the 128 ft fence around a 16 × 32 ft pool with one gate at $200 to $800, before bonding and the permit:

MaterialPer foot, installed128 ft with one gate
Black chain link$5–16$840–2,850
Removable mesh$10–30$1,480–4,640
Wood$12–33$1,740–5,020
Vinyl$15–40$2,120–5,920
Aluminum$20–45$2,760–6,560
Steel or wrought iron$20–40$2,760–5,920
Glass, framed or semi-frameless$95–175$12,360–23,200
Glass, frameless$150–350$19,400–45,600

Removable mesh is a popular pool fence: panels of coated mesh on aluminum poles that drop into holes drilled in the deck, so it lifts out when no small children are around. Aluminum is the usual permanent choice, rust-free and built to pool codes. Chain link is cheap but needs small mesh to meet most codes. Wood and vinyl work as long as the rails face the pool so they can't be used as a ladder. HomeGuide prices wrought iron higher, at $50 to $85 a foot, and HomeGuide, Angi and HomeGnome put glass anywhere from about $100 to $600 a foot for custom work. For frameless glass, Fixr gives $150 to $210 and Life Saver $180 to $350, so the calculator uses $150 to $350.

How long is a pool fence?

A fence boxed in around the pool is twice the pool's length plus its width, plus eight times the distance from the water (each corner adds the distance twice). A fence that curves around a round or freeform pool is the edge plus 2π times the distance. With the fence 4 ft from the water, one gate, and before bonding and the permit:

PoolFenceMesh, one gateAluminum, one gateVinyl, one gate
12 × 24 ft104 ft$1,240–3,920$2,280–5,480$1,760–4,960
14 × 28 ft116 ft$1,360–4,280$2,520–6,020$1,940–5,440
16 × 32 ft128 ft$1,480–4,640$2,760–6,560$2,120–5,920
18 × 36 ft140 ft$1,600–5,000$3,000–7,100$2,300–6,400
20 × 40 ft152 ft$1,720–5,360$3,240–7,640$2,480–6,880

Many fences don't go all the way around. Where the house wall, or an existing fence that meets the code, closes one side, enter that length and the calculator takes it off. A fence that follows the yard instead of the deck can be much longer: Thumbtack's installer says 200 to 350 ft is typical in his area. In that case, measure it and enter your own length. By length, with one gate:

Fence lengthMeshVinylAluminum
100 ft$1,200–3,800$1,700–4,800$2,200–5,300
150 ft$1,700–5,300$2,450–6,800$3,200–7,550
200 ft$2,200–6,800$3,200–8,800$4,200–9,800
300 ft$3,200–9,800$4,700–12,800$6,200–14,300

Gates, height and other costs

ItemTypical costNotes
Self-closing, self-latching gate$200–800 eachHomeGuide, HomeGnome, Life Saver; glass gates up to about $1,000 (Fixr). Some installers include one gate in the per-foot price.
5 ft fence instead of 4 ft10–20% more on the fenceLife Saver, HomeGnome, HomeAdvisor
Sloped or uneven ground10–50% more on the fenceHomeGnome adds about 50%, and HomeAdvisor says up to 50% more labor; the 10% for a gentle slope is our estimate
Taking out an old fence$3–10 a footAngi $3–7, HomeGnome $5–10
Bonding a metal fence to the pool$150–600Our estimate for an electrician's visit; see below
Permit$50–150HomeGuide $40–150, Life Saver $50–250; installers often pull it
Pool or gate alarm$40–220HomeGnome
Concrete footings for aluminum posts$5–10 a footLife Saver, for aluminum posts set in concrete

Pool fence requirements

Most towns base their pool barrier rules on the International Swimming Pool and Spa Code (ISPSC, section 305), which follows the U.S. Consumer Product Safety Commission's barrier guidelines. Your town may change them, so check before you buy. The usual rules:

  • Height: at least 48 inches, measured on the outside. Some towns require 60 inches, and the CPSC calls 5 ft or more preferable.
  • No boost: the 48 inches must hold for 3 ft outside the fence, so planters, walls, steps or pool equipment can't help a child climb over.
  • Gap underneath: no more than 2 inches over grass or gravel, 4 inches over concrete; a mesh fence no more than 1 inch.
  • Openings: nothing a 4 inch ball could pass. Where the horizontal rails are less than 45 inches apart, they go on the pool side and the pickets are no more than 1¾ inches apart. Chain link mesh no larger than 1¼ inches (CPSC; 1¾ inches in the ISPSC).
  • Mesh fences: at least 20 inches from the water, and not liftable more than 4 inches at the bottom.
  • Gates: open outward, away from the pool, close and latch by themselves, and can be locked. A latch lower than 54 inches goes on the pool side, at least 3 inches below the top, with no opening over ½ inch within 18 inches of it.
  • The house as one side: doors and windows into the pool area then need alarms, self-closing and self-latching doors, or a listed power safety cover over the pool, depending on what your town accepts.

Local rules can be stricter than the model code. One Florida owner on the Trouble Free Pool forum noted that his town wanted the fence at least 3 ft from the water while the county asked for only 20 inches. North Carolina's code, Thumbtack's installer says, calls for gates 52 to 54 inches tall.

Bonding a metal fence

The National Electrical Code requires fixed metal parts within 5 ft of the pool's inside wall to be bonded to the pool's equipotential bonding grid (section 680.26(B)(7)), and metal fences are among the examples given. Parts more than 5 ft away, or behind a permanent barrier, are exempt. Electricians on the Mike Holt forum point out there is no exception for the aluminum poles of a mesh fence set in plastic sleeves. So a metal fence close to the water needs an electrician, ideally before the deck is poured, and an inspector will look for it. Setting the fence 5 ft or more from the water avoids it; wood and vinyl fences don't need it at all. The calculator switches bonding on by itself for a metal fence closer than 5 ft; you can turn it off if your inspector says otherwise.

Removable mesh or a permanent fence?

Mesh costs less, keeps the view, and comes out when the children are older or for a party; it needs holes drilled in the deck, and the gate is the part to check for wear. A permanent aluminum, vinyl or wood fence lasts longer, can follow the yard instead of the deck, and often doubles as the yard fence. Mesh can also be put up by a handy owner: Life Saver sells do-it-yourself panels at about $8 to $12 a foot plus the gate kit, against $25 to $45 a foot for its professionally installed fence. A fence that has to pass inspection is worth getting right, though: a gate that doesn't latch every time defeats the whole fence.

Above-ground pool fence

An above-ground pool wall that is at least 48 inches tall can be the barrier itself where the pool's maker allows it, with the ladder locked, removed or fenced off when nobody is swimming. A guard fence kit on top of the wall costs about $100 to $450 (Fixr, Angi; HomeGuide $100 to $500). A deck around the pool needs its own railing and a self-closing gate. A fence on the ground around the pool is priced like an inground pool's: pick "On the ground around it" in the calculator.

How the calculator works

It works out the fence's length from the pool's size and the distance to the water, takes off any house wall or old fence, and multiplies by the material's installed price per foot, 10 to 20% more for a 5 ft fence. Gates, a slope, taking out an old fence, bonding and the permit are added as their own lines, and "Local prices" scales everything except the permit. Each worked-out line is rounded to the nearest $10, and the working is shown under the result. Prices are national ranges from the sources below, checked in November 2026; see how we calculate.

Pool fence questions

Do I need a fence around my pool?

Almost everywhere in the U.S., yes, for an inground pool: local codes based on the ISPSC call for a barrier around pools that can hold more than 24 inches of water, and some go lower. Your insurer or homeowners association may have rules of its own. Ask your building department what applies to your address.

Can a pool cover replace a fence?

Sometimes. The ISPSC accepts a listed power safety cover as one way to protect the house side of a pool, and the CPSC counts it among the barriers, but most towns still want a fence or wall around the pool area. A mesh or solid safety cover is a good second layer, not usually a substitute. The pool cover cost calculator shows what each kind costs.

How long does it take to install a pool fence?

Usually a day or less for a crew of two, Bob Vila says, once materials arrive. Permits and lead time for custom gates or glass can add weeks.

Does the fence have to go around the whole yard?

No. It has to close off the pool area so nobody reaches the water without going through a gate or a protected door. Fencing just the pool and deck is usually shorter and cheaper; fencing the yard can work too if every gate in it meets the pool rules.

What else does a new pool cost?

The pool cost calculator prices the pool with the deck, fence, electrical and other extras, and the pool maintenance cost calculator works out what it costs to run each year. Where pools are screened in, as in much of Florida, a screen cage that meets the barrier rules can take the fence's place: the pool screen enclosure cost calculator prices one.

Sources

Last checked November 29, 2026. Prices are national ranges for planning; local quotes can be well above or below them. Your building department, not this page, decides what barrier your pool needs.

Related calculators

Fence cost$2,960–7,310