What codes are for

A building code is a set of minimum rules for how buildings must be built so they are safe to live in. Most rules exist because something went wrong in the past: a fire spread, a roof fell in, a family was poisoned by a heater.

Codes cover structure, fire safety, electrical, plumbing, heating, ventilation and energy use. They are minimums, and the minimum depends on which edition your area uses. In climate zone 5, the 2009 energy code asks for R-38 in the attic, and the 2021 edition asks for R-60. Both houses are legal where their edition applies. The R-60 attic lets through roughly a third less heat, every winter, for the life of the house.

The model codes

Most US places adopt model codes written by national groups, then change them locally.

  • IRC (International Residential Code): houses, including structure and fire safety. It has an appendix for tiny houses.
  • IECC (International Energy Conservation Code): insulation, air sealing and energy use, set by climate zone.
  • NEC (National Electrical Code, NFPA 70): wiring and electrical safety, including solar and batteries.
  • UPC or IPC (plumbing codes): water supply, drains and venting.

Each state, county or town picks which codes and which edition, or year, to use. Some rural areas adopt few codes or enforce them lightly. That does not make unsafe work safe.

Three kinds of rules

Three different sets of rules usually apply, often from different offices:

  • Zoning decides what can go where: allowed uses, minimum home size, how far buildings sit from property lines (setbacks), and whether an RV can be a full-time home.
  • Building codes decide how it is built. The building department checks them.
  • Health rules cover septic systems and private wells. In many places, a county or state health or environmental office handles them.

Land can also carry private rules, such as deed restrictions or homeowner association rules.

Text description

A diagram with your project at the top and arrows to three boxes. Zoning: what can go where, such as allowed uses, minimum home size, setbacks from property lines, and RVs as full-time homes; handled by the zoning or planning office. Building codes: how it is built, covering structure and fire safety, electrical and plumbing, and heating and energy, through model codes such as the IRC, IECC, NEC and the UPC or IPC; checked by the building department. Health rules: septic systems and private wells, such as whether a septic system can work and where a well can go; often handled by a county or state health office. A dashed box at the bottom says to also check private rules, such as deed restrictions and homeowner association rules. Offices and names vary by place. On a phone the three boxes are stacked in one column.

Who usually decides?

Sort it

Which set of rules usually covers each question? Offices and names vary by place.

  1. How far must the house sit from the property line?
  2. Is the wiring for the solar system safe?
  3. Can I live full-time in a tiny house on wheels here?
  4. Can a septic system work on this soil?
  5. How much attic insulation do I need?
  6. Where can a new private well go?
  7. Does the bedroom need a window big enough to escape through?

From permit to move-in

The details vary, but the usual path looks like this:

  1. Zoning check: confirm the use and placement are allowed.
  2. Permit application: submit plans, a site plan and fees.
  3. Plan review: the department checks the plans and may ask for changes.
  4. Inspections during building: often at the foundation, at framing, at rough-in (wiring, plumbing and ducts before walls are closed), at insulation, and others as required.
  5. Final inspection.
  6. Certificate of occupancy: the document that says the home can be lived in. Lenders and insurers often ask for it too.

Work must stay open until it is inspected. Covering it early can mean tearing it open again.

Step 1 of 6, Zoning check. Confirm the use and placement are allowed before you spend on plans.

Text description

A step-by-step flow of six numbered stages with a stepper that shows one stage at a time. 1, zoning check: confirm the use and placement are allowed. 2, permit application: submit plans, a site plan and fees. 3, plan review: the department checks the plans and may ask for changes, which loops back to the application. 4, inspections during building: often at the foundation, at framing, at rough-in, when wiring, plumbing and ducts are in but walls are still open, at insulation, and others as required. Keep work open until it is inspected. 5, final inspection: the inspector checks the finished work. 6, certificate of occupancy: the document that says the home can be lived in. Stages before the current one show a check mark. A note says the details vary by place.

Why it is worth it

Doing the work yourself

Many places let owners do some work on their own home, sometimes called owner-builder rules. What is allowed varies a lot.

  • Some places let owners do their own electrical or plumbing work, with a permit and inspection. Others require a licensed trade.
  • Gas lines, septic systems and wells are commonly limited to licensed professionals.
  • Even where owner work is allowed, it must meet code and pass inspection.

Check

Check your understanding

You buy rural land and plan a small cabin with solar and a septic system. What is the best first step?

Summary

  • Building codes are minimum safety rules. Common model codes are the IRC, IECC, NEC and UPC or IPC.
  • Zoning decides what goes where. Building codes decide how. Health rules cover septic and wells.
  • The usual path: zoning check, permit, plan review, inspections, final, certificate of occupancy.
  • Owner-builder rules vary. Gas, septic and wells usually need licensed pros.
  • Ask early. Bring your brief.

Next, you will see how insurers, lenders and inspectors look at a small or off-grid home, and what to ask them.

Go deeper: reading a code without getting lost

Codes are long, and they are written for builders and inspectors. You do not need to read them cover to cover. Ask your building department which sections matter for your project, and which edition they use. Many model codes can be read free online in a view-only form from their publishers. When a section is unclear, ask the inspector how they read it. Their reading is the one that counts on your job.

Finish up

Mark this lesson complete to track your progress. It is saved only in this browser.

Sources

  1. International Residential Code (IRC), including Appendix AQ, Tiny Houses, International Code Council
  2. NFPA 70, National Electrical Code (NEC), National Fire Protection Association
  3. Uniform Plumbing Code (UPC), IAPMO
  4. Building Energy Codes Program, US Department of Energy
  5. 2009-2021 IECC and IRC Minimum Insulation Requirements for New Homes, Building America Solution Center (US DOE and PNNL)
  6. Septic Systems (SepticSmart), US Environmental Protection Agency
  7. Private Drinking Water Wells, US Environmental Protection Agency

Spotted an error? See Corrections for how to report it.