Which building code applies — the IRC or the IBC?
In the U.S., detached one- and two-family homes and townhouses up to three stories above grade usually follow the International Residential Code (IRC). Apartments, commercial, industrial, and taller buildings follow the International Building Code (IBC). Your state or city adopts — and can amend — whichever applies.
Source: 2021 IRC §R101.2; 2021 IBC §101.2 (scope) ·
These are model codes — the edition your jurisdiction has adopted, plus any local amendments, is what governs. Confirm with your AHJ.
Building codes in the U.S. are model codes written by the International Code Council (ICC). Your state or city adopts a specific edition and can amend it, so the enforceable rules are set locally — but almost every jurisdiction starts from two companion codes, and the first question on any project is which one you’re under.
The quick rule
- Use the IRC (International Residential Code) for detached one- and two-family homes and townhouses no more than three stories above grade, plus their accessory structures (garages, sheds, decks). — IRC §R101.2
- Use the IBC (International Building Code) for everything else: apartment and condo buildings, commercial, offices, retail, industrial, assembly, schools, and townhouses taller than three stories. — IBC §101.2
The IBC explicitly hands the residential group above back to the IRC, so the two don’t overlap for a given building.
Where people get tripped up
- A townhouse of four or more stories is an IBC building, not an IRC one.
- Apartment/condo buildings (stacked dwelling units) are IBC “Residential” (Group R) occupancies — the IRC only covers detached one- and two-family homes and townhouse units side-by-side.
- The three-story limit’s exact wording has been read differently over editions — confirm it in your adopted edition if your project is close to the line.
- Other codes still apply alongside these (plumbing, mechanical, electrical, energy, fire, and accessibility), and your local amendments win.
Once you know whether you’re under the IRC or the IBC, the rest of the requirements — stairs, guards, egress, framing — follow from that code. As always, confirm the adopted edition and any local amendments with your AHJ (the authority having jurisdiction) before you rely on it.
Sources
- ICC Digital Codes — 2021 IRC — §R101.2 (scope — detached one- & two-family dwellings and townhouses ≤ 3 stories)
- ICC Digital Codes — 2021 IBC — §101.2 (scope — all other buildings; exception sends the IRC group to the IRC)