IRC Rules in Plain English: Footings, Decks, Stairs, Railings and Walls
These are the residential building code rules homeowners ask us about most: footings, decks, stairs, railings, retaining walls and grading. Each one is in plain English with its section number in the 2021 International Residential Code (IRC), and every section number links to the official code text, which the International Code Council lets anyone read free online.
Most states build on the IRC but change parts of it, and towns can add their own rules. To see which edition your state uses, check building codes by state. Your local building department has the final word on your project.
Footings and frost depth
Every exterior footing has to sit on undisturbed soil below the reach of frost. The code sets the 12-inch minimum; the frost depth itself is set locally.
| Rule | What the 2021 IRC requires | Read the code |
|---|---|---|
| Minimum footing depth | At least 12 in. below undisturbed ground | R403.1.4 |
| Frost protection | Below the local frost line, on solid rock, or frost-protected another approved way. Never on frozen soil. | R403.1.4.1 |
| Frost line number | Set by your town or county in its Table R301.2. See frost line depth by state. | R301.2 |
| Concrete footing size | At least 12 in. wide and 6 in. thick; bigger where the load or soil calls for it | R403.1.1 |
Decks
Section R507 covers wood decks. These are the rules that come up on almost every deck permit.
| Rule | What the 2021 IRC requires | Read the code |
|---|---|---|
| Deck footing depth | At least 12 in. below undisturbed ground | R507.3.2 |
| Attached decks | If the deck is attached to the house, its footings have to be protected from frost (below the frost line, on rock or another approved method) | R507.3.3 |
| Small freestanding decks | No footings needed if the deck is freestanding, 200 sq ft or less, its joists sit directly on precast pier blocks, and it is no more than 20 in. above grade within 36 in. of the edge | R507.3 Exc. 2 |
| Ledger board | At least a 2×8, pressure-treated (or naturally durable) No. 2 or better. It can’t carry beam loads and can’t hang on stone or brick veneer. | R507.9.1.1 |
| Lateral hold-downs | When you use the code’s lateral connection detail: at least 2 hold-downs, each within 24 in. of an end of the deck, rated 1,500 lb or more | R507.9.2 |
| Flashing | Corrosion-resistant metal at least 0.019 in. thick, or an approved non-metal flashing | R507.2.4 |
Stairs
Stair rules apply to inside stairs and to deck and porch stairs.
| Rule | What the 2021 IRC requires | Read the code |
|---|---|---|
| Width | At least 36 in. clear above the handrail | R311.7.1 |
| Headroom | At least 6 ft 8 in. | R311.7.2 |
| Riser height | 7 3/4 in. max (8 1/4 in. in Pennsylvania). Risers in one flight can’t differ by more than 3/8 in. | R311.7.5.1 |
| Tread depth | 10 in. min (9 in. in Pennsylvania). Treads in one flight can’t differ by more than 3/8 in. | R311.7.5.2 |
| Landings | A landing at the top and bottom of every stairway, at least as wide as the stairs | R311.7.6 |
| Tread and landing slope | No steeper than 2 percent | R311.7.7 |
| Handrail required | On at least one side of any flight with 4 or more risers | R311.7.8 |
| Handrail height | 34 to 38 in. above the tread nosings | R311.7.8.1 |
Guards and railings
| Rule | What the 2021 IRC requires | Read the code |
|---|---|---|
| When a guard is required | Any deck, porch, landing or stair side more than 30 in. above the grade or floor below, measured within 36 in. of the edge | R312.1.1 |
| Guard height | At least 36 in.; at least 34 in. along the sides of stairs | R312.1.2 |
| Openings | A 4 in. ball can’t pass through; 6 in. for the triangle under a stair rail | R312.1.3 |
Retaining walls
| Rule | What the 2021 IRC requires | Read the code |
|---|---|---|
| When an engineer is needed | A wall that isn’t braced at the top and holds back more than 48 in. of soil, or any wall over 24 in. tall that also carries a load like a driveway, slope or building | R404.4 |
| Design standard | Engineered walls need a safety factor of 1.5 against sliding and overturning | R404.4 |
Permits for walls vary by state and town. See retaining wall permits by state.
Grading and drainage
| Rule | What the 2021 IRC requires | Read the code |
|---|---|---|
| Slope away from the house | The ground has to fall at least 6 in. in the first 10 ft away from the foundation | R401.3 |
| Where that won’t fit | If a lot line, wall or slope is in the way, use a swale or drain to carry water away | R401.3 Exc. |
For runoff between neighbors, see drainage laws by state.
Which edition applies in Pennsylvania
Pennsylvania’s Uniform Construction Code moved to the 2021 IRC, with state amendments, on January 1, 2026. A project with a design or construction contract signed before that date can still use the 2018 code if the permit was applied for within six months. Read the state’s UCC regulations and statutes, or look up who enforces the code where you live with our PA building permit lookup.
Using this guide? Link to it or cite it. It’s free to use with a link back, and we keep it updated against official sources.
Cite as: Muthler Landscaping & Construction, “IRC Rules in Plain English: Footings, Decks, Stairs, Railings and Walls,” https://muthlerlandscaping.com/state-guides/irc-rules/ (last checked November 14, 2026).
Get an email when your state’s rules change
We re-check every entry against official sources. Tell us your state and we’ll email you when something changes.