Code and quoting
Water heater code requirements: the checklist inspectors use
A water heater swap fails inspection on the same handful of items: the relief valve drain, the pan, expansion control, straps, garage height, valves and access. Here is what the model codes say about each, where the IRC and the UPC differ, and how to price them in.
On this page
Swapping a 50-gallon tank is a half-day job. Failing the inspection turns it into two trips, an unhappy customer and a margin that's gone. The model codes' water heater rules come down to a short list: where the relief valve drains, the pan, thermal expansion, straps, garage height, the shutoff valves and access. Get those right and the inspection is a formality.
This guide goes through that list item by item, using the model codes most US plumbers work under: the International Residential Code (IRC) for one- and two-family homes, the International Plumbing Code (IPC), and the Uniform Plumbing Code (UPC), which California and other western states build on. Where the codes differ, the tables say so.
Model codes are adopted and amended by states and cities, and the edition in force differs from place to place. Section numbers below are from the 2021 IRC and IPC and the 2024 UPC unless noted. Your building department has the final word, so check the local edition and amendments before you quote.
The checklist at a glance
| Item | IRC 2021 | IPC 2021 | UPC 2024 |
|---|---|---|---|
| T&P relief valve and discharge pipe | P2804 | 504.4, 504.6 | 504.4 to 504.6, 608.3, 608.5 |
| Drain pan | P2801.6 (2024: P2801.5) | 504.7 | 507.5 |
| Thermal expansion control | P2903.4 | 607.3 | 608.3 |
| Seismic strapping | P2801.8, in seismic categories D0 to D2 | 502.4, refers to the building code | 507.2, everywhere |
| Garage: 18 in. ignition height, vehicle protection | P2801.7, M1307.3 | 502.1.1, refers to the mechanical and fuel gas codes | 507.13 |
| Cold water shutoff valve | P2903.9.2 | 503.1 | 606.5 |
| Access and working space | P2801.4, M1305.1 | 501.4 | 507.25 |
The T&P valve and its discharge pipe
Every storage water heater needs pressure and temperature relief: separate valves or a combination temperature and pressure (T&P) valve. The UPC requires the combination valve on storage heaters. The IRC adds that the temperature sensor must read the water in the top 6 inches of the tank, and none of the three codes allows a shutoff or check valve between the tank and the relief valve.
The discharge pipe is where most write-ups happen. IRC P2804.6.1 and IPC 504.6 use the same list. In plain terms, the pipe must:
- Not connect directly to the drainage system. It ends with an air gap in the same room as the heater.
- Be at least the size of the valve outlet, full size all the way, and serve only one relief valve.
- End at the floor, in the heater's pan, over a waste receptor, or outdoors, somewhere it can't hurt anyone or damage anything, and where occupants will see it.
- Not be trapped, and drain by gravity.
- End no more than 6 inches and no less than two pipe diameters above the floor or the receptor's flood rim.
- Have no threads on the end, and no valves or tee fittings anywhere along it.
- Be an approved material for relief valve discharge piping.
Where the UPC is stricter
The UPC (608.5) wants the pipe pointing down, drained by gravity through an air gap, protected from freezing, and when it runs outdoors, ending 6 inches to 2 feet above the ground. The big difference: the UPC doesn't let the relief valve discharge into the water heater's pan (608.5 and 507.5). The IRC and IPC allow it. If you work in both kinds of jurisdictions, that one line decides where the pipe goes.
The drain pan
The IRC and IPC require a pan wherever a leak from the tank would cause damage: an attic, a finished basement, a closet over living space. The pan must be at least 1½ inches deep and drain through a pipe of at least ¾ inch, run full size to an indirect waste receptor or outdoors, ending 6 to 24 inches above the ground. The IPC also lets it end over a floor drain.
The IRC sets pan materials too: galvanized steel or aluminum at least 0.0236 inch thick, plastic at least 0.036 inch, or another approved material. A plastic pan under a gas heater must meet flame-spread and smoke ratings.
Two details catch people out:
- Replacements. The IRC and IPC don't require a pan drain on a replacement heater if the old one had no pan drain. We didn't find the same exception in the UPC, which requires a pan in attics, in floor-ceiling assemblies and anywhere a leak would cause damage.
- The relief valve. Under the UPC, the T&P discharge can't go into that pan.
Thermal expansion
When a check valve, pressure-reducing valve or backflow preventer stops heated water from expanding back into the main, the system is closed and all three codes want expansion control on it. The UPC is the most specific: a listed, properly sized expansion tank meeting IAPMO/ANSI Z1088, on the building side of the closed device, supported by the structure. It also requires a pressure regulator where static pressure is over 80 psi.
We cover how to spot a closed system, size the tank and set the pre-charge in our guide to the water heater expansion tank requirement.
Seismic strapping
This is where the codes differ most.
- IRC: strapping applies in Seismic Design Categories D0, D1 and D2, and to townhouses in Category C. The 2021 text calls for anchors or straps in the upper third and lower third of the tank, strong enough to resist a sideways force equal to one third of the heater's operating weight, or the manufacturer's method. The 2024 IRC points to the building code section instead.
- IPC: refers to the building code where earthquake loads apply.
- UPC: requires strapping everywhere, not just in seismic zones. Straps go in the upper and lower thirds, with the lower strap at least 4 inches above the controls.
- California puts it in state law: Health and Safety Code 19211 requires all new, replacement and existing residential water heaters to be braced, anchored or strapped. The City of Escondido's handout adds that the strapping kit must be one approved by the Division of the State Architect.
Garages: 18 inches and bumpers
In a residential garage, the burner, ignition and other ignition sources must be at least 18 inches above the floor (IRC P2801.7 and M1307.3, UPC 507.13). Both codes exempt heaters listed as flammable vapor ignition-resistant (FVIR), so check the heater's label and listing before you skip the stand. The UPC's wording also reaches spaces that open into the garage.
Where a car could hit the heater, the codes want protection: approved barriers under the IRC, and barriers, elevation or a location out of the vehicle's path under the UPC. A bollard or a stand isn't free, so it belongs on the quote.
Valves, gas and the sediment trap
- Cold water shutoff. The IRC wants a readily accessible full-open valve on the cold supply at or near the heater; the IPC a valve near the heater that serves only the heater. The UPC asks for a control valve ahead of each water-supplied appliance, and the California Plumbing Code wants a full-way valve on the cold side.
- Gas shutoff. The fuel gas chapters of the 2024 IRC (G2420.5) and the UPC (1212.6) want an accessible appliance shutoff valve within 6 feet of the heater, upstream of the union or connector. Under the IRC it must be in the same room.
- Sediment trap. Unless the appliance has one built in, install a sediment trap (a tee with a capped nipple in the bottom) downstream of the shutoff, as close to the gas inlet as practical: 2024 IRC G2419.4 and UPC 1212.9. Water heaters aren't on the exempt list.
Access, clearances and where a heater can't go
The heater must be placed so it can be seen, serviced and replaced (IRC P2801.4, IPC 501.4). The IRC asks for a level working space of at least 30 by 30 inches in front of the control side; the UPC asks for 30 inches of working space in depth, width and height unless something else is specified.
Gas appliances don't go in bedrooms, bathrooms, toilet rooms or storage closets, or in a space that opens only into one (IRC G2406.2). The exceptions that matter for water heaters: a direct-vent heater, or a dedicated enclosure with a weather-stripped, self-closing door and combustion air from outdoors. The UPC (504.1) has the same idea. Venting itself follows the fuel gas chapter: IRC P2801.3 points to Chapter 24, and the UPC to its Section 509.
Permits
The UPC is blunt: installing, removing or replacing a water heater without a permit from the authority having jurisdiction is unlawful (UPC 502.1). Under the IRC, the permit rules are whatever your city or county adopted, so ask the building department. Many publish a short checklist of what their inspectors look at, like the City of Escondido's handout listed below. Find it before your first quote in a new city; our water heater replacement quote checklist covers how to price the permit and the trip for the inspection.
Put the code items on the quote
Each item above costs something: a pan and its drain line, a run of discharge pipe to the outside, an expansion tank, straps, a stand or bollard, a new shutoff valve, a sediment trap, the permit. If the quote only says "replace water heater," you either eat those costs or have an awkward conversation at the door.
A simple fix is to write them as their own lines, even when the price is small. The customer sees why the job costs what it costs, and the inspector's visit doesn't bring surprises. Our free plumbing estimate template has a filled-in water heater example with the shutoff valves and expansion tank on their own lines.
Plumbo's Quote Guard asks about the expansion tank, the shutoff valves and the permit on every water heater quote, and adds them from your own price book. Plumbo is on the App Store and Google Play. Try the 60-second demo →
Questions plumbers ask
Can the T&P valve drain into the water heater pan?
Under the IRC and IPC, yes: the pan is one of the allowed discharge points. Under the UPC, no: both 608.5 and 507.5 prohibit it. Check which code your city adopted.
Do I need a drain pan when I replace a water heater?
Where a leak would cause damage, the IRC and IPC require the pan, but not a pan drain if the old heater didn't have one. The UPC requires a pan in attics, in floor-ceiling assemblies and wherever a leak would cause damage, and we found no replacement exception in it.
How high off the garage floor does a gas water heater need to be?
The ignition source must be at least 18 inches above the floor, unless the heater is listed as flammable vapor ignition-resistant (FVIR). The listing is on the heater's label and in its installation manual.
Are water heater straps required outside California?
Under the UPC, yes, in every jurisdiction that adopts it without changing that section. Under the IRC, only in Seismic Design Categories D0 to D2 (and C for townhouses). Your building department can tell you the local category.
This guide summarizes model code sections for planning and quoting. It isn't legal advice or a substitute for the code edition and amendments adopted where you work.
Sources
- UpCodes, 2021 International Residential Code, Chapter 28 Water Heaters (Colorado adoption without amendments: P2801, P2804), checked October 17, 2026.
- UpCodes, 2024 International Residential Code, Chapter 28 (renumbered sections), checked October 17, 2026.
- UpCodes, 2021 IRC, Chapter 29 (P2903.4, P2903.9.2) and Chapter 13 (M1305.1, M1307), checked October 17, 2026.
- UpCodes, 2021 International Plumbing Code, Chapter 5 (South Carolina adoption; sections used were not amended), checked October 17, 2026.
- UpCodes, 2024 IRC G2420.5 Appliance shutoff valve and G2419.4 Sediment trap, checked October 17, 2026.
- IAPMO, 2024 Uniform Plumbing Code, read-only edition (502.1, 504, 507, 606.5, 608, 1212), checked October 17, 2026.
- International Code Council, CodeNotes: Water Heater Safety (IPC 504.6 and IRC P2804.6.1), checked October 17, 2026.
- California Health and Safety Code, Section 19211 (water heater bracing), checked October 17, 2026.
- City of Escondido, Residential Water Heater Installations (California Plumbing Code checklist), checked October 17, 2026.