A pool fence that looks solid can still fail a toddler: a horizontal rail at the wrong height becomes a ladder, a gate that sticks open becomes a doorway. The federal guidance that most local codes borrow from is built around three ways a child gets in, over, under and through, and each one turns into a measurement you can check with a tape.
- CPSC’s pool barrier guidelines are advice, not law, but some states and towns have written them into their building codes.
- The core numbers are a top at least 48 inches above grade, gaps that stop a 4 inch sphere and a bottom gap of 4 inches or less, tightened to 1 inch for removable mesh.
- Gates are where most of the cost and most of the risk sit: they should swing outward, close on their own and latch out of a child’s reach.
- For a 24 by 12 foot pool with a 3 foot walkway, the calculator puts a DIY removable mesh barrier at $878 in materials for 96 feet with one gate.
Guidance, code and who signs off
The Consumer Product Safety Commission wrote its Safety Barrier Guidelines for Residential Pools for owners, buyers and builders of pools, spas and hot tubs. The booklet says outright that the guidelines are not a CPSC standard and not mandatory. It also says some states and localities have adopted them into building codes, and it tells readers to check what their own area requires.
That makes the building department the first call, not the fence company. The department can tell you the required height (CPSC notes some places require 60 inches rather than 48), whether the house wall may count as a side, and whether the fence needs its own permit and inspection. The building permit cost calculator shows how towns usually set the fee. Fencing a pool without the permit your town requires creates the same problems as any unpermitted work; the guide to remodeling without a permit covers what that can cost later.
Over, under and through: the measurements
CPSC turns each way a child gets past a barrier into a dimension. For outdoor pools, its checklist includes these:
- The top of the barrier at least 48 inches above the ground, measured on the side away from the pool. Fences of 5 feet or more are preferred.
- No more than 4 inches between the ground and the bottom of the barrier on a hard surface, 2 inches on grass or gravel, and 1 inch for removable mesh.
- No opening that lets a 4 inch sphere pass.
- Vertical members no more than 1¾ inches apart where the horizontal rails are less than 45 inches apart, with those rails on the pool side.
- Chain link mesh no larger than 1¼ inches square unless slats close the openings to 1¾ inches.
- Solid walls without ledges or protrusions that could serve as footholds.
Check any fence spec sheet against these numbers before buying. An existing yard fence was not necessarily built to them, so reusing one as a pool barrier calls for a careful measure of the rails, the picket spacing and the gap at the bottom.
Gates and doors carry the most risk
A barrier is only as good as its weakest opening. CPSC calls for pedestrian gates that open outward, away from the pool, are self-closing and have a self-latching device. Where the latch release is less than 54 inches above the bottom of the gate, it should be on the pool side, at least 3 inches below the top, with no opening over half an inch within 18 inches of it. Gates used for equipment should at least self-latch.
When the house forms part of the barrier, the guidance shifts to the doors. It lists three options: an alarm on every door with direct access to the pool, meeting UL 2017, a power safety cover meeting ASTM F1346, or another measure such as self-closing, self-latching doors that protects at least as well. Fixr prices self-closing gates at $200 to $500 for non-glass fences and up to $1,000 for glass, which is why the number of gates moves a quote more than people expect.
How each fence type handles the rules
Removable mesh meets the height and opening rules easily, but its bottom gap limit is the tightest at 1 inch, and it only works while it is up. Aluminum comes in narrow-picket styles; confirm the spec sheet shows spacing of 1¾ inches or less and the rails on the pool side. Vinyl privacy panels have no openings, so the main check is that the outside face offers no foothold. Glass has no openings at all and no climbable rails, which makes compliance simple and the price high.
On cost, the spread is wide. Fixr’s installed figures run from $7 to $10 per foot for mesh to $95 to $210 for glass. The pool fence cost calculator lays out all four types per foot and turns your pool size into feet of fence, so this guide does not repeat that table. If the rest of the yard needs a boundary fence as well, the fence cost calculator prices it; a shared run can serve as part of the pool barrier only if it meets the same dimensions.
Three sides or four: what the house wall really saves
Using the back of the house as one side shortens the fence by the length of that side, often 40 feet or more. CPSC still prefers a barrier that surrounds the pool completely, because a door left open or an alarm switched off defeats the three-sided design. The saving on fence has to be weighed against door alarms on every door that opens to the pool area, or a safety cover.
The math is usually closer than it looks. On a 32 by 16 foot pool with 4 feet of deck, the fourth side is 40 feet. At aluminum’s installed midpoint that is about $1,000. A four-sided fence also keeps the pool closed off from the house during parties, when doors are open most of the day.
Do this before the fence company visits
- Ask the building department for the required height, the gate rules and whether a permit and inspection apply.
- Walk the fence line and note anything within reach outside it that a child could climb: a planter wall, an AC unit, a woodpile.
- Decide where people actually walk from the house, so the gate goes there and not where it is cheapest to hang.
- Check your homeowners policy for any pool fence or cover conditions, and keep the declarations page handy.
- Measure the pool and the deck so you can compare quotes on the same footage.
Run your own numbers
Enter the pool size and how much deck goes inside the fence, then switch between fence types. The barrier basics line lists the CPSC dimensions to check on any quote.
Calculator example 1: A 24 by 12 foot pool with a 3 foot walkway needs 96 feet of fence. Done as a DIY removable mesh barrier with one gate, materials come to $878, or $9.15 per foot. The calculator reminds you that mesh allows only a 1 inch gap at the bottom, so the deck sleeves have to be set with that in mind.
Calculator example 2: At the other end, a 40 by 20 foot pool with 6 feet of decking, two gates and a $150 permit needs 168 feet. Frameless glass prices at $27,770 installed. The chart shows aluminum at $5,050 for the identical layout, and both have to meet the same barrier dimensions.
Calculator example 3: Back to a 32 by 16 foot pool, this time with an aluminum fence on three sides and the house wall as the fourth. The fence shrinks to 88 feet and $2,550 installed. Closing the fourth side would add 40 feet and about $1,000, which buys a barrier that does not depend on door alarms.
Frequently asked questions
Are CPSC pool barrier guidelines the law?
What height does a pool fence have to be?
Can a gate open toward the pool?
Is a pool cover enough without a fence?
See also: pool opening and closing cost calculator.
Sources
- CPSC: Safety Barrier Guidelines for Residential Pools (Pub. 362)
- Fixr: How much does it cost to install a pool fence? (updated January 2025)
- Angi: How much does a pool fence cost?




