Water Heater Code Rules
These are the code rules a plumber follows when installing a water heater, summarized from public International Code Council (ICC) material on the International Plumbing Code (IPC). Your city may have adopted a different edition or local changes, so your permit office has the final word.
Temperature and pressure relief valve (IPC 504.4)
Every storage water heater needs a temperature and pressure relief valve that meets ANSI Z21.22. No shutoff valve or check valve may sit between the relief valve and the tank. The valve must open at no more than 210°F, and at no more than the tank's rated working pressure or 150 psi, whichever is less.
Relief valve discharge pipe (IPC 504.6)
The discharge pipe carries hot water away safely if the valve opens. The code says it must:
- Not connect directly to the drainage system.
- Discharge through an air gap in the same room as the water heater.
- Be at least as large as the valve outlet and run full size to the end.
- Serve only one relief valve.
- End at the floor, the water heater pan, a waste receptor or outdoors.
- End where people in the home can easily see it.
- Not be trapped, and flow by gravity.
- End no more than 6 inches above the floor or receptor.
Drain pan (IPC 504.7)
A pan is required where a leak would cause damage, such as in an attic or above a finished room. The pan must be at least 1.5 inches deep, with a drain of at least 3/4 inch. A plastic pan is not allowed under a gas-fired water heater.
Why it matters for your quote
These rules are why a water heater replacement quote may include a new relief valve, a discharge pipe or a pan. They are safety items, not upsells. See our water heater replacement cost guide for typical prices.
Does my old water heater have to meet the new code?
Not while it keeps running. The rules apply when a water heater is installed or replaced, which is why a replacement often costs more than the unit and labor alone. An inspector checks the relief valve, the discharge pipe, the pan, the venting and the gas or electrical connections before signing off the permit.
Who checks the work?
Your local building department. In most cities a water heater replacement needs a permit, and the plumber who pulls it is responsible for passing the inspection. Ask for the permit number before work starts. Read how we check our sources.
Sources: ICC IPC/UPC Essentials (PDF), ICC Section 504 sample (PDF) and the ICC Building Safety Journal.