IRC vs IBC: which code covers which building
The International Residential Code (IRC) covers detached one- and two-family dwellings and townhouses that stay within three stories above grade plane, with each unit having its own means of egress. The International Building Code (IBC) covers everything else. That one line sorts most buildings, and this guide shows how to apply it.
The scope line in plain words
Both codes come from the International Code Council (ICC), and each one says what it covers in its Chapter 1. The IRC's scope reaches construction, alteration, repair, use and occupancy, location, removal and demolition of detached one- and two-family dwellings and townhouses up to three stories above grade plane, plus their accessory structures. The IBC takes the buildings outside that scope.
Two tests do the work:
- What is it? A detached house or a detached duplex is in the IRC's scope. A townhouse is too, if it meets the code's definition of a townhouse in Chapter 2. An apartment building, an office or a shop is not.
- How tall is it? Count stories above grade plane. Four stories puts a townhouse outside the IRC.
Your jurisdiction adopts the codes, and some states amend the scope or write their own residential code. Read what your jurisdiction adopted and which edition, 2021 or 2024.
Examples
| Building | Code |
|---|---|
| Detached single-family house, two stories | IRC |
| Detached duplex | IRC |
| Row of townhouses, three stories each, separate egress | IRC |
| Garage or shed that serves the house | IRC, as an accessory structure |
| Apartment building with units stacked over each other | IBC |
| Office building, shop or restaurant | IBC |
| Townhouse row at four stories | IBC |
Mixed cases
- A home business. A house with a small business inside is still a house if it stays within the IRC's scope. When the use grows into a shop or a public space, the building can move to the IBC. Local rules decide where that line sits, so ask the building department before you build or inspect.
- A live/work unit in a townhouse. The IRC's scope exceptions let a live/work unit in a townhouse that meets the IBC's live/work provisions be built under the IRC. The unit still has to meet those IBC provisions, so check both codes.
- Care and lodging uses. The IRC's scope exceptions also let a few small uses in a dwelling, such as a small owner-occupied lodging house or a small care facility, be built under the IRC, within set limits. Check the current text of the scope section for those limits.
- A building too tall or too many units on one egress. If a townhouse is over three stories, or a unit shares its egress with another unit, the IRC no longer fits and the IBC applies.
Try one question
Question 1 of the free 10-question check on ICC B1. No signup. About 12 minutes. Some checks include a calculation question, with a calculator on the page when they do. Then ask Plumb, the AI study assistant, why the answer is right and the others are wrong.
Public Safety and Special Construction
In a new bedroom, the only emergency escape window has a keyed sash lock, with the key hanging on a hook beside the window. What should the inspector do?
Press A-D or 1-4 to choose an answer while this question is on screen.
Choose an answer to begin
What it means for the B1 and the B2
ICC's B1 is the residential building inspector exam, and our IRC chapters for the B1 guide shows where each IRC chapter sits on it. A B1 candidate works mostly in the IRC's world: houses, duplexes and townhouses.
The B2 is the commercial exam. ICC's outline scopes it to commercial structures of any size or occupancy, so the buildings it asks about are the ones the IRC leaves out. Check ICC's Exam Catalog for the books allowed for your exam and code year, and see the ICC B2 certification guide. Occupancy groups are a good place to start on that side: occupancy classification explains how the IBC sorts a building by use.
Still choosing between the exams? B1, B2 or R5 compares them side by side.
Check where you stand
See which residential areas to study first. Take the free 10-question check. It is weighted to ICC's B1 outline, needs no signup and explains every answer.
Going commercial? Take the free 10-question B2 check.
Not affiliated with or endorsed by ICC. ICC is named only to identify the codes, the exams and their owner.
FAQ
What is the difference between the IRC and the IBC?
The IRC is the code for detached one- and two-family dwellings and townhouses up to three stories above grade plane. The IBC covers the other buildings, such as apartment buildings, offices and shops.
When do I use the IRC and when do I use the IBC?
Use the IRC for a detached house, a detached duplex or a townhouse of three stories or fewer with separate egress. Use the IBC for any other building, including a townhouse over three stories.
Do townhouses fall under the IRC or the IBC?
Townhouses within three stories above grade plane, with each unit having its own means of egress, fall under the IRC. A taller one falls under the IBC. A townhouse live/work unit that meets the IBC's live/work provisions can still be built under the IRC.
Is an apartment building covered by the IRC?
No. Buildings with dwelling units stacked over each other are outside the IRC's scope and fall under the IBC.
Which code is on the ICC B1 and the B2?
The B1 is a residential exam and ties to the IRC. The B2 covers commercial structures of any size or occupancy, and ICC's Exam Catalog lists the books for your exam and code year.
Ask Plumb: Am I ready?
Ask Plumb before you buy AI your AI study assistant
See what's on the ICC B1 exam, test yourself with 5 quick questions, or find the plan that fits you.
The ICC B1 course
Available now · instant accessLearn how the IRC is laid out, drill finding sections fast, then practice. Written for the 2024 IRC.
Instant access. Terms and refunds · Secure checkout by Stripe · Billed by Nori Software
What's inside
- 7modules of lessonsEvery task on the outline
- 4full-length timed exams60 questions in 120 minutes each
- 426practice questionsEach one explained
- 4worked calculationsStep by step
- 8timed code lookups a setFind it fast in IRC, with your median time
- 1week-by-week study planSet to your exam date
Turn a practice answer into a study step. In untimed practice, ask Plumb AI about any question you answer, follow up, then see your weakest topics and what to drill next.
Every answer comes with a full explanation.
Sources
Show the list
- Chapter 1 Scope and Administration, 2021 International Residential Code, ICC Digital Codes (the IRC's scope, three stories, separate egress, accessory structures and the listed exceptions). Checked 16 Nov 2026.
- Effective Use of the International Building Code, ICC Digital Codes (the IBC covers the buildings outside the IRC's scope). Checked 16 Nov 2026.
- B2 Commercial Building Inspector content outline, International Code Council (commercial structures of any size or occupancy). Checked 16 Nov 2026.
- Certification Exam Catalog, International Code Council (books by exam and code year). Checked 16 Nov 2026.
Rafter Tie editorial teamSources checked
Facts checked against the sources listed above. If something has changed, tell us and we will correct it.
Your next step
Ready to see where you stand on ICC B1?
Free, untimed and scored by domain. No signup. About 12 minutes. Some checks include a calculation question, with a calculator on the page when they do.
Free 10-question checkB1 course with IRC navigation drills. Lessons, timed practice exams and a plan around your exam date.
Get B1 course with IRC navigation drills · $99Want a timed run? Take the free 25-question practice test (about 50 minutes). No email needed.
Prefer paper? Free printables
- Print the study checklist (free PDF). Topics to cover, on one printable page. No email.
- Print a class quiz (free PDF). 5 practice questions with an answer key on page 2.
- Print the flashcards as cut-out cards (free PDF). The free flashcard sample, ready to cut and carry.
From the blog
- Residential building inspector practice questions
- ICC B1 exam prep: what to do from booking to exam day
- Building inspector jobs: who hires and what they ask for