Decks

Deck Railing Height, Stair Rules and Baluster Spacing

6 min · Updated 2026-09-27

When a deck needs a railing, how high (36 inches, 42 in California), baluster gaps under 4 inches, and the 7¾-inch riser and 10-inch tread limits.

Written by DueRivaLast reviewed: 2026-09-27Review standard

The code’s word for a deck railing is a guard. The 2024 International Residential Code asks for one wherever an open side of a deck, stair or landing is more than 30 inches above the ground at any point within 36 inches of its edge. On a deck it stands at least 36 inches high, with no gap below that height a 4-inch sphere can pass; along the open side of a stair, 34 inches and a 4⅜-inch sphere. California’s residential code, which Los Angeles adopts, raises the deck’s 36 inches to 42. The stair figures are the same in both codes: risers 7¾ inches high at most, treads 10 inches deep at least.

Deck railing and stair figures
RuleModel code and AustinLos Angeles
Guard requiredOpen side over 30 in above grade within 36 in of its edgeOpen side over 30 in above grade within 36 in of its edge
Guard height36 in or more42 in or more
Guard along a stair34 in or more above the nosings34 in or more above the nosings
Gaps in a guardNo 4 in sphere passesNo 4 in sphere passes
Gaps along a stairNo 4⅜ in sphere; no 6 in sphere in the triangle under the railNo 4⅜ in sphere; no 6 in sphere in the triangle under the rail
Riser height7¾ in at most7¾ in at most
Tread depth10 in at least10 in at least
Nosing¾ to 1¼ in, more with open risers; none on treads of 11 in or more¾ to 1¼ in, more with open risers; none on treads of 11 in or more
Stair width36 in or more above the handrail36 in or more above the handrail
Headroom6 ft 8 in or more6 ft 8 in or more
Handrail34 to 38 in, at 4 or more risers34 to 38 in, at 4 or more risers

Where a deck needs a guard, and how high

HOUSEDECK123GRADE
  1. A required guard stands at least 36 inches above the deck surface; 42 inches under California’s code, Los Angeles included.
  2. Up to that height, no opening may let a 4-inch sphere through, the gap under the bottom rail included.
  3. A guard is required where the open side is more than 30 inches above the floor or grade below at any point within 36 inches horizontally of the edge.

Not to scale. 2024 International Residential Code R321.1 and 2025 California Residential Code R321.1.2; sources below.

What does the code call a deck railing?

The code defines a guard as a component near the open side of an elevated walking surface that minimizes the chance of a fall to the level below, and a handrail as a rail meant for grasping, for guidance or support. The railing around a deck is a guard. Along the open side of a stair, one rail can be both.

When does a deck need a railing?

Guards go on the open sides of floors, stairs, ramps and landings more than 30 inches above the floor or grade below, measured at any point within 36 inches horizontally of the edge. The measurement looks at the ground beside the deck, not only under it: a deck 28 inches above the ground at its rim still needs a guard there if the ground drops to more than 30 inches below the deck within 36 inches of the edge. Insect screening does not count as a guard.

How high does a deck railing have to be?

A required guard stands at least 36 inches above the deck surface. On the open side of a stair it may be 34 inches, measured from a line connecting the tread nosings, and where its top also serves as the stair’s handrail it lands between 34 and 38 inches. California’s residential code keeps those two stair figures and raises every other required guard to 42 inches, so a Los Angeles deck needs a 42-inch guard where the model code asks for 36.

How far apart can balusters be?

From the deck surface up to the required height, no opening in a guard may let a 4-inch sphere through. That covers the gaps between balusters and the one under the bottom rail: each has to stay narrower than 4 inches. Along the open side of a stair the limit is 4⅜ inches, and the triangle a riser, a tread and the guard’s bottom rail form may not pass a 6-inch sphere. California’s code uses the same three figures.

The deck railing calculator counts the balusters a section between two posts needs to keep every gap under the sphere.

What are the riser and tread rules for deck stairs?

The code calls a change in elevation of one or more risers a stair, and a stairway can be interior or exterior, so the steps from a deck to the yard are a stair. Each riser is at most 7¾ inches, measured between the leading edges of adjacent treads, and each tread at least 10 inches deep, measured horizontally from nosing to nosing. Within a flight, the tallest riser may exceed the shortest by no more than ⅜ inch, and tread depths may differ by no more than the same ⅜ inch. Nosings project ¾ to 1¼ inches, or more where the risers are open; treads 11 inches deep or more need none. Open risers are allowed, but where the opening is more than 30 inches above the ground it may not pass a 4-inch sphere.

A deck stair’s risers, treads and rails

DECK1234GRADE
  1. Each riser is 7¾ inches high at most; within a flight, the tallest exceeds the shortest by no more than ⅜ inch.
  2. Each tread is at least 10 inches deep, measured horizontally from nosing to nosing.
  3. A handrail runs 34 to 38 inches above the line connecting the nosings on a flight of four or more risers; a guard along the open side of a stair is at least 34 inches.
  4. Along the open side, no 4⅜-inch sphere may pass, and the triangle a riser, a tread and the bottom rail form may not pass a 6-inch sphere.

Not to scale. 2024 International Residential Code R318.7, R320 and R321.1; California’s code prints the same stair figures.

When do deck stairs need a handrail and a landing?

A stair is at least 36 inches wide above the handrail; at and below it, 31½ inches with a handrail on one side and 27 with handrails on both. Headroom is at least 6 feet 8 inches. One flight rises no more than 12 feet 7 inches between landings, and apart from a few top landings at doors, each flight has a floor or landing at its top and bottom, at least as wide as the stair and, on a straight run, at least 36 inches deep. A flight of four or more risers needs a handrail on at least one side, 34 to 38 inches above the nosings.

How many steps does a deck stair need?

Divide the height from the ground at the foot of the stair to the deck surface by 7¾ and round up: that is the fewest risers the code allows. Then divide the height by that count to get each riser. A deck 30 inches up needs at least four risers, since 30 divided by 7¾ is about 3.9; four equal risers are 7½ inches each. The deck is the top landing, so four risers take three treads, a run of at least 30 inches at 10 inches each, and with four risers the flight needs a handrail.

The deck stair calculator does this arithmetic for a rise of up to 15 feet, adds the run and the stringer, and checks the risers, treads, nosing, width and flight against the figures above.

Is there a rise-and-run formula?

Neither code ties a riser to its tread by a formula. A stair passes or fails on the figures above: a 6-inch riser with a 12-inch tread passes, and an 8-inch riser with a 10-inch tread fails on its riser, though both pairs add up to 18 inches.

What do Austin and Los Angeles require?

Austin adopts the 2024 International Residential Code, in force since July 10, 2025, and neither its deletions nor its local amendments touch the stairway, handrail or guard sections, so the model code’s figures apply as printed. One- and two-family houses in Los Angeles are built under the Los Angeles Residential Code, which adopts the California Residential Code by reference, all but its administrative chapter and one appendix; the city readopted it by an ordinance in force since December 31, 2025. Its local amendments to the building-planning and floor chapters change none of these figures, so a Los Angeles deck takes the 2025 California code’s 42-inch guard.

How high can a deck be without a permit?

Height is one of the permit’s lines too. The model code exempts a deck of 200 square feet or less, no more than 30 inches above grade at any point, not attached to the house and not serving its required exit door. Austin’s list stops at 30 inches as well, and Los Angeles exempts platforms up to 30 inches that are not over a basement or story below. A deck more than 30 inches up is outside all three, and guards go on its open sides wherever they sit more than 30 inches up; a lower deck that meets the rest of its list needs no permit and can still need a guard where the ground within 36 inches of its edge lies more than 30 inches below it. An exemption from the permit is not one from the code: the model code says an exemption authorizes no work that breaks it, and Austin’s list says exempt work must still meet the city’s codes.

Size the platform with the deck calculator. The deck permit brief sets out each city’s permit lines, and the permit checker runs your deck’s measurements through them. Before the first footing hole, see when the law wants a call to 811.

Primary sources

What this page was checked against