Plumbing Code Basics (IPC/UPC)
A practical lookup-and-apply reference for apprentices and small-shop plumbers who need to pass inspection. Sizing, slope, traps, venting, cleanouts, and the jurisdictional amendments that actually decide whether your rough-in signs off.
Table of contents
Plumbing Code Basics (IPC/UPC)
The plumbing code is not light reading, and the point of this guide is not to turn you into an IPC scholar. The point is to know where to look, know what the inspector is going to check, and know the handful of numbers and rules that come up on every rough-in. If you can size a fixture branch, set slope on a horizontal drain, pick a trap and vent that will pass, and know when to call the local code official before you cut pipe, you will sign off jobs that other apprentices have to redo.
Two things before you open a codebook. First, there is no "the code." There is a model code published by a standards body, and then there is the adopted code - what your city, county, or state actually enforces. Those are almost never identical. Second, the model codes themselves differ by region: most of the US eastern half follows the International Plumbing Code (IPC), published by the ICC. Most of the western US - California, Oregon, Washington, Nevada, Idaho, Minnesota, and a few others - follows the Uniform Plumbing Code (UPC), published by IAPMO. A plumber on a multi-jurisdiction crew has to know both, because the slope tables, vent distances, and fixture-unit lookups are not written the same way.
Model Code vs Adopted Code vs Local Amendment
Order of authority, from highest to lowest on any given job:
- Local amendment. The city, county, or town has written its own modifications to the state-adopted code. These win. Common amendments: requiring a backwater valve in flood-zone basements, banning S-traps outright, requiring thermal expansion tanks on every water heater, requiring permit fees and inspections at specific stages.
- State-adopted code. Most states adopt a model code (IPC or UPC) with a published year (e.g., "2021 IPC with state amendments"). The state amendments sit on top of the model code.
- Model code. IPC or UPC as published. This is the base. If nothing in the local or state amendments overrides a model-code section, the model-code rule governs.
The practical habit: before you cut any pipe on a new jurisdiction, call or email the local plumbing inspector and ask what code and what year is enforced, and whether there are any amendments that apply to your scope. A five minute phone call up front prevents ripping out a week of work at inspection.
Rough Geography (IPC vs UPC)
This is not exhaustive and it changes, but as a starting point:
- IPC-based states (International Plumbing Code): most of the Midwest, Northeast, Southeast, and Texas. Examples: New York, Pennsylvania, Ohio, Michigan, Florida, Texas, Georgia, Virginia, the Carolinas.
- UPC-based states (Uniform Plumbing Code): California, Oregon, Washington, Nevada, Idaho, Montana, Wyoming, Hawaii, Minnesota, and parts of Louisiana and Arkansas.
- Hybrid / custom: a few states write their own code that references pieces of both. Massachusetts is the classic example.
Always verify for your specific state and year. The ICC and IAPMO both publish adoption maps; your state plumbing board website is the most current source.
Fixture-Unit Sizing
Fixture units are the single most-used number in plumbing layout, and they confuse new apprentices because they are not gallons, not psi, and not pipe diameter. A fixture unit is a unitless demand value that accounts for how often and how heavily a fixture is likely to be used, so you can add them up and size a pipe that serves a whole group of fixtures without oversizing for the worst case of every fixture running at once.
There are two separate fixture-unit systems, and you never mix them:
- WSFU (Water Supply Fixture Units) - used for sizing cold-water and hot-water supply piping. IPC Table 604.3 / UPC Table 610.3 publish the per-fixture values.
- DFU (Drainage Fixture Units) - used for sizing drain, waste, and vent (DWV) piping. IPC Table 709.1 / UPC Table 702.1 publish the per-fixture values.
WSFU Lookup (Typical Values)
These are close to both IPC and UPC in residential occupancy; verify in the adopted code table on your job:
| Fixture | Cold WSFU | Hot WSFU | Total WSFU |
|---|---|---|---|
| Lavatory (bathroom sink) | 0.5 | 0.5 | 1.0 |
| Kitchen sink | 1.0 | 1.0 | 1.5 (combined) |
| Bathtub / tub-shower combo | 1.0 | 1.0 | 1.4 (combined) |
| Shower (separate) | 1.0 | 1.0 | 1.4 (combined) |
| Water closet (flush tank, 1.28 gpf) | 2.5 | 0 | 2.5 |
| Clothes washer (standpipe) | 1.0 | 1.0 | 1.4 (combined) |
| Dishwasher (residential) | 0 | 1.0 | 1.0 |
| Hose bibb (outside) | 2.5 | 0 | 2.5 |
Note that "combined" is less than the sum of hot + cold because a tub or shower does not run both full-open at the same time; the code table applies a diversity factor for you.
DFU Lookup (Typical Values)
| Fixture | DFU |
|---|---|
| Lavatory | 1 |
| Kitchen sink (residential, with disposal) | 2 |
| Bathtub / shower | 2 |
| Water closet (flush tank) | 3 |
| Clothes washer standpipe | 2 |
| Floor drain (2 in trap) | 2 |
| Full bathroom group (one toilet, one lav, one tub) | 5 or 6 (grouped) |
How to Size a Branch
Add the WSFU of every fixture served by the branch. Take the total to IPC Table 604.3 (or the equivalent UPC table) and read across from your available service pressure range and developed length to find the minimum pipe size. A few rules of thumb that line up with those tables under typical residential 45-60 psi static pressure:
- 3/4 in copper or PEX usually serves up to about 6-8 WSFU on a branch.
- 1 in usually serves up to about 14-18 WSFU.
- 1-1/4 in and larger are service and main-riser territory.
Do the table lookup for anything meaningful; the rules of thumb are for sanity-checking, not for sign-off.
Worked Example: Typical Bathroom Group
Assume one full bath: one lavatory, one water closet, one tub-shower. Cold-water branch:
- Lavatory: 0.5 WSFU cold
- Water closet: 2.5 WSFU cold
- Tub-shower: 1.0 WSFU cold
- Total cold-branch demand: 4.0 WSFU
Hot-water branch:
- Lavatory: 0.5 WSFU hot
- Tub-shower: 1.0 WSFU hot
- Total hot-branch demand: 1.5 WSFU
At residential service pressure, a 3/4 in cold supply to the bathroom group is comfortably within range for 4.0 WSFU, and a 1/2 in hot branch covers 1.5 WSFU. If a second bathroom and a kitchen share the same cold main, you add those WSFU in as well before picking the main-to-bath branch size.
Horizontal Drainage Slope
Drains are gravity machines. Too little slope and solids hang up; too much slope and the liquid outruns the solids (the supernate separates and the drain "runs"), leaving a dry pack of solids on the pipe bottom that eventually clogs. Code publishes minimum slopes keyed to pipe size.
IPC Table 704.1 (UPC is very close):
| Pipe size | Minimum slope |
|---|---|
| 2-1/2 in and smaller | 1/4 inch per foot (approximately 2%) |
| 3 in to 6 in | 1/8 inch per foot (approximately 1%) |
| 8 in and larger | 1/16 inch per foot (approximately 0.5%) |
Those are minimums. Small-diameter drains (1-1/2 in lavatory arm, 2 in shower arm) run 1/4 in per foot. 3 in and 4 in are allowed to run at 1/8 in per foot, which is often how you fit a long building drain inside a shallow basement floor. Going steeper on a small drain is fine; going way steeper on a 4 in drain (3/4 in per foot under a slab, for example) is where you start getting "running" and back-pitch complaints.
The Practical Layout Check
Before you strap a long horizontal run, do the math: run length times drop per foot. A 20 ft horizontal 2 in arm at 1/4 per foot drops 5 inches over the run. If you have 4 inches of vertical space in the joist bay to work with, either your slope has to go down (not an option below code minimum), your run has to shorten, or you need to drop the drain into a lower bay. Figuring this out on paper beats discovering it with the pipe already glued.
Trap Rules
Every fixture that discharges waste to the drainage system needs a trap. The trap seal is the water held in the dip of the P that blocks sewer gas from coming back through the fixture.
- Minimum seal depth: 2 inches.
- Maximum seal depth: 4 inches.
- One trap per fixture. Double-trapping (two traps in series on the same fixture line) is prohibited; it creates an air-locked segment between the two traps and the fixture will not drain.
- Trap arm (the horizontal run between the trap weir and the vent) has a maximum length keyed to pipe size. See the venting section below for the lookup.
- S-traps are prohibited in most jurisdictions under both IPC and UPC. An S-trap (where the trap discharges into a vertical drop with no intervening vent) self-siphons: as the fixture drains, the falling column pulls the seal out behind it, and the trap ends up with no water. Always use a P-trap vented within the trap-arm distance.
- Floor drains, washing-machine standpipes, and other infrequently used fixtures are at risk of evaporation drying the seal. Deep-seal traps (bigger than the standard 2-4 in seal, up to code maximums for the fixture type) and trap primers are the common solutions.
Venting Basics
Venting keeps the pressure in the drainage system close to atmospheric so traps do not siphon (negative pressure pulling seal down the drain) or blow (positive pressure pushing seal up into the fixture). Every trap needs a vent, and the distance from the trap weir to the vent takeoff is limited by pipe size.
Maximum Trap Arm Length (IPC Table 909.1, close to UPC)
| Trap arm pipe size | Maximum distance from trap to vent |
|---|---|
| 1-1/4 in | 5 ft |
| 1-1/2 in | 6 ft |
| 2 in | 8 ft |
| 3 in | 12 ft |
| 4 in | 16 ft |
Numbers vary slightly between IPC and UPC; verify in the adopted table. The vent takeoff must be above the trap weir, which means the takeoff fitting has to land higher than the fixture's overflow line before the vent turns vertical.
Vent Types You Will Encounter
- Individual (dry) vent. One vent dedicated to one fixture, rising to connect to a vent stack or pass through the roof.
- Wet vent. A single pipe that serves as drain for one fixture and vent for another. Allowed under both codes with strict rules about which fixtures, what order on the run, and what pipe size. Common and legal for a bathroom group (tub, lav, water closet) wet-vented through a 2 in lav drain when done per the adopted code.
- Circuit vent. A branch vent serving a battery of fixtures on a horizontal branch, typically in commercial restrooms.
- Air admittance valve (AAV). A one-way mechanical vent that opens to let air in but closes to block sewer gas out. IPC allows AAVs under many conditions. UPC historically did not accept them, and many UPC jurisdictions still do not; some UPC states have amended to allow them with restrictions. Always verify local acceptance before specifying an AAV.
Vent Sizing Rule of Thumb
The model codes use a table, but a common rule of thumb is: vent size is at least half the diameter of the drain it serves, but never smaller than 1-1/4 in, and any vent that passes through the roof has to be at least 2 in (or in cold climates, often 3 in through the roof to resist frost closure). A 1-1/2 in drain gets a 1-1/4 in vent at the fixture; a 3 in stack gets a 2 in vent, upsized to 3 in before it exits through a cold-climate roof.
Cleanouts
Cleanouts are the access points an inspector looks for first because they are what makes the drainage system serviceable for the next fifty years. Required locations, under both codes with minor variation:
- Base of every vertical drainage stack where it transitions to horizontal.
- At every change of direction greater than 45 degrees on a horizontal line (two 45 fittings used to create a 90 only need a cleanout at one end, per most jurisdictions, but verify).
- At least every 100 ft of developed horizontal run on building drains 4 in and smaller; every 100 ft on 5 in and larger as well in IPC.
- At the transition from building drain to building sewer, typically with a cleanout brought up to grade (a cleanout-to-grade at the exterior wall or just outside it) so a rooter can run from outside without entering the building.
- Within a reasonable distance of the upper terminal of any horizontal branch serving three or more water closets.
Cleanouts must be the same size as the pipe they serve, up to 4 in (beyond 4 in, a 4 in cleanout is generally sufficient). They must be accessible: do not bury one behind drywall with no access panel, and do not pour a slab over one without an access sleeve.
Jurisdictional Amendments to Watch For
These are the ones that catch crews from out of town every week:
- Thermal expansion control on water heaters. In a closed system (check valve on the water service, meter with a built-in check, or a PRV), heated water has nowhere to expand and pressure spikes will pop the T and P relief. Many jurisdictions require an expansion tank sized to the heater, and the inspector will look for it.
- Backwater valves in basement fixtures below the upstream manhole rim elevation, especially in flood-prone areas. Some cities require them on every new basement; some only where the fixture is below the sewer overflow elevation.
- S-trap specific bans and P-trap-only rules on urinals (some jurisdictions ban urinal S-traps outright).
- First-hour rating and efficiency requirements on gas water heaters, plus CSD-1 and sediment-trap requirements that are local amendments.
- Dielectric unions or brass nipples at copper-to-steel transitions. Some jurisdictions specify the method.
- AAV restrictions. UPC jurisdictions often restrict or forbid air admittance valves where IPC jurisdictions allow them freely.
- Seismic strapping and gas appliance bracing in California, Oregon, Washington, and other seismic zones.
- Water service line material (Type K copper vs PEX vs HDPE) restrictions on the run from the meter to the house. Some jurisdictions have a minimum depth of cover and required materials; some ban PEX in the service.
The pattern: any time you are working in a new city, a new county, or a new state, the sensible move is to read the adopted code amendments on the building department website, or call the inspector. The time cost is small; the rework cost is not.
A Sample Rough-In Sizing Walk-Through
Scenario: ground-floor kitchen and one full bath rough-in on a residential remodel. IPC jurisdiction, 50 psi static service pressure, 3/4 in copper main coming up from the basement.
Cold-Water Demand
- Kitchen sink cold: 1.0 WSFU
- Dishwasher cold: 0 (hot only)
- Bathroom lav cold: 0.5 WSFU
- Water closet: 2.5 WSFU
- Tub-shower cold: 1.0 WSFU
- Total cold-branch demand from the 3/4 in main to both rooms: 5.0 WSFU
At 50 psi, 3/4 in copper handles 5 WSFU over a typical residential developed length with margin. Sub-branches: 1/2 in to each individual fixture is plenty except for the water closet (2.5 WSFU, still 1/2 in is fine for a single fixture) and hose bibbs (which are on a separate exterior branch anyway).
Hot-Water Demand
- Kitchen sink hot: 1.0 WSFU
- Dishwasher hot: 1.0 WSFU
- Bathroom lav hot: 0.5 WSFU
- Tub-shower hot: 1.0 WSFU
- Total hot-branch demand: 3.5 WSFU
3/4 in out of the water heater down to the first tee, then 1/2 in branches to each fixture.
Drainage
- Kitchen sink + dishwasher combined: 2 DFU, 2 in trap arm, 2 in drain.
- Lavatory: 1 DFU, 1-1/4 in trap arm into the bathroom group line.
- Tub-shower: 2 DFU, 2 in trap arm.
- Water closet: 3 DFU, 3 in trap arm and 3 in drain.
- Bathroom group total: about 6 DFU, served by a 3 in horizontal branch sloping at 1/8 in per foot to the 3 in stack. Kitchen 2 in branch ties separately into a 2 in waste line that joins the stack downstream, with proper venting.
Venting
- Kitchen sink: individual 1-1/4 in vent rising from the trap arm within 6 ft of the trap, tying into the nearest vent stack above the flood rim of the highest fixture on that vent.
- Bathroom group: wet-vented through the 2 in lav drain where the adopted IPC permits, with the lavatory vent rising to the stack. Verify the fixture arrangement meets the wet-vent fixture-order rules.
- Water closet: vented through the wet vent in the above arrangement, or individually if the layout forces it.
Cleanouts
- Base of the stack where it transitions horizontal: cleanout.
- End of the 3 in horizontal branch serving the bathroom group: cleanout.
- Kitchen 2 in branch end: cleanout.
- Transition from building drain to building sewer: cleanout-to-grade outside the wall.
That walkthrough is the work. Copy the layout, tally the fixture units, size each run against the adopted table, pick slope and trap-arm lengths off the published numbers, and add cleanouts at every required location. Do it that way and the inspector signs off. Guess at it and you are chopping pipe out of a joist bay on a Friday afternoon.
What to Keep on the Truck
- Current adopted code for your primary jurisdiction (paper or PDF). The ICC and IAPMO both sell field-friendly handbook versions.
- A laminated one-page fixture-unit lookup for the fixtures you install every week.
- A laminated slope and trap-arm table.
- The phone number of your local plumbing inspector. Saved, not guessed at.
- A spare expansion tank. One spare backwater valve for the flood-zone jobs. The specific amendments for your jurisdiction live in those parts on the truck.
Code is a tool, not a hazing ritual. The goal is a clean rough-in that drains right, supplies right, and signs off the first time the inspector looks at it. Learn the tables you use most, know where to look for the rest, and always call before you cut pipe in a jurisdiction you do not know.