Code Guide

Deck Railing Height & Code Requirements

What the IRC actually requires for deck guardrails and handrails — heights, spacing, load capacity, and the details that fail inspection most often.

When you need a railing at all

One number governs: 30 inches. If any part of the walking surface is more than 30 inches above the grade or surface below — measured within 36 inches horizontally of the deck edge — a guardrail is required on that edge. Below 30 inches, guards are optional, which is why so many low platform decks are built rail-free on purpose. Note that grade can slope: a deck 24 inches high at the house may be 40 inches high at the far corner, and that corner needs a guard.

Required heights at a glance

ElementIRC requirementMeasured from
Deck guardrail (residential)36" minimumDeck surface to top of rail
Deck guardrail (many local codes, CA, commercial)42" minimumDeck surface to top of rail
Stair guardrail34"-38"Tread nosing to top of rail
Stair handrail (4+ risers)34"-38"Tread nosing to top of grip
Baluster opening< 4" sphereClear gap between members
Stair tread triangle opening< 6" sphereRiser, tread & bottom rail
Bottom rail to deck gap< 4"Deck surface to bottom rail
Handrail grip diameter1-1/4" to 2"Round cross-section

The 200-pound load test

A guardrail must resist a 200-pound concentrated load applied in any direction at the top. That single requirement fails more deck railings than any height issue, because the load path runs through the post-to-frame connection. Lag screws driven into the side of a rim joist do not pass. What does pass: through-bolts with washers into blocking, or a rated hold-down tension device like a Simpson DTT2Z at each post. Notching the post around the rim joist without a tension tie is the classic failure — the joint pries open under lateral load.

Baluster spacing math

"Less than 4 inches" means a 4-inch sphere can't pass anywhere, including at the ends of a run and under the bottom rail. For a 1-1/2 inch square baluster, that gives a maximum center-to-center spacing of about 5-3/8 inches. For a 3/4-inch round metal baluster, roughly 4-5/8 inches. Always divide the rail length evenly rather than starting at one end with a fixed spacing — you'll otherwise end with an oversized gap at the post. The baluster calculator handles the even-division math for you.

Handrails versus guardrails

They're different things and a stair often needs both. A guardrail prevents falls off the open side. A handrail is something you can wrap your hand around, mounted 34-38 inches above the tread nosing, continuous for the full flight, and returned to a post or wall at each end so a sleeve can't catch. A 2x4 laid flat on top of a guardrail is not graspable and will fail inspection on any flight with four or more risers.

Details inspectors flag most

In rough order of frequency: post attachment without a tension tie; the gap under the bottom rail exceeding 4 inches after decking settles; missing handrail returns; the last baluster gap at a post being wider than the rest; stair guard height measured from the tread surface rather than the nosing; and pool decks with climbable horizontal members. Fixing any of these after the fact means pulling railing apart — worth getting right the first time.

Local codes override everything here

The IRC is a model code. Your jurisdiction adopts a version of it, sometimes with amendments — 42-inch guards, 36-inch minimum stair widths, or restrictions on cable railings are all common local changes. Call your building department before ordering railing, and see the deck permit guide for what to expect at plan review. Price your railing with the deck railing calculator.

Frequently asked questions

How high does a deck railing need to be?

The IRC requires residential deck guardrails to be at least 36 inches tall, measured from the deck surface to the top of the rail. Many jurisdictions and all commercial decks require 42 inches, and California requires 42 inches statewide — always confirm locally.

When is a deck railing required?

A guardrail is required whenever the walking surface is more than 30 inches above the grade or surface below, measured within 36 inches horizontally of the deck edge. Below 30 inches, a railing is optional.

What is the maximum gap between deck balusters?

A 4-inch sphere must not pass through any opening in the guardrail. In practice that means balusters spaced no more than 3-7/8 inches apart clear, and the triangular gap at stair treads must block a 6-inch sphere.

How much force must a deck railing withstand?

The IRC requires guardrails to resist a 200-pound concentrated load applied in any direction at the top rail, and infill to resist 50 pounds per square foot. That load requirement is why post attachment hardware matters more than post size.

What height should a deck stair handrail be?

A graspable handrail must be 34 to 38 inches above the tread nosing, and is required on any stair flight with four or more risers. The guardrail on the same stair still needs to meet its own 34-38 inch (stairs) or 36-inch (deck) height rule.

Are horizontal deck railings allowed?

Horizontal rails and cable railings are permitted by the IRC as long as openings block a 4-inch sphere, but many local jurisdictions restrict climbable horizontal members — especially around pools. Check before you buy a cable kit.

Railing kits, balusters & hardware

As an Amazon Associate we earn from qualifying purchases. Affiliate disclosure.

Get your deck estimate in 60 seconds

Free, no signup required.

Open Calculator

Get the Smart Decking Calculator app

Estimate decks on the go, save projects, and share with contractors.

Download onApp StoreSOONGet it onGoogle Play

Building something else? Try our sister calculators