Deck Stair Railing Code and Layout
Stair railings combine two systems: a guard along the open side and a graspable handrail along the pitch. Each has its own height and opening rules, and the marks are projected onto a slope instead of a level rail.
Quick answer
The IRC 2021 handrail height on stairs is 34" to 38" above the stair nosing (R311.7.8.1). Guards on the open side of a deck stair must be at least 34" high under the R312.1.2 exception, with openings that reject a 4 3/8" sphere (R312.1.3 Exception 2). The triangular opening at the bottom of the guard is limited by a 6" sphere.
Open the baluster spacing calculatorHandrail height follows the nosing, not the tread
Measure from the stair nosing, vertically to the top of the handrail. Because the nosing line is parallel to the pitch, rail height stays constant along a code-compliant flight; treads and their finish thickness do not change the measured height.
The rectangular band between 34" and 38" is the working range. Set the rail to the middle of the band when the end conditions allow it, so small framing tolerances do not push the measurement out of range.
Guard openings on the slope
A stair guard is measured with a sphere held horizontally between the balusters. The limit there is 4 3/8", not the 4" used on a level deck guard, and the difference matters when the rail is steep.
Lay out balusters on the level projection first, then transfer those positions to the sloped rail so spacing stays consistent. Splitting the rail into equal bays on the slope alone produces a different opening at each end.
The triangle at the bottom of the stair guard
The opening formed by the tread, the riser and the bottom rail must reject a 6" sphere. This is the detail most often missed on a site-built deck stair, because the guard starts above the first tread and the gap grows toward the post.
A bottom rail set close to the tread, a short intermediate picket, or a manufactured panel with a shaped bottom all solve it. Check the as-built condition after the treads are fastened.
Graspable rail and post spacing
The handrail has to be graspable, not just present. Use a profile and size that a hand can close around, and keep the rail continuous where a person is expected to hold it. Post spacing is a structural question: follow the connector and rail manufacturer tables for the load and the rail material.
How to lay it out
- Set the nosing line. Mark the stair nosing at the top and bottom of the flight and string a line between them.
- Set the handrail. Hold the handrail between 34" and 38" above the nosing line along the whole flight.
- Lay out the guard. Lay out balusters on the level projection, then project the marks onto the sloped rail.
- Check the openings. Test the guard openings with a 4 3/8" sphere and the bottom triangle with a 6" sphere.
- Verify the guard height. Confirm the guard reaches at least 34" above the walking surface along the open side of the stair.
Frequently asked questions
How high should a stair handrail be?
The IRC 2021 range is 34" to 38", measured vertically from the stair nosing to the top of the handrail (R311.7.8.1).
What sphere size applies to a stair guard?
The open-side exception for stairs uses a 4 3/8" sphere (R312.1.3 Exception 2). Level guards use a 4" sphere.
What is the 6-inch triangle rule?
The triangular opening between a stair tread, the riser and the bottom rail must reject a 6" sphere (R312.1.3 Exception 1).
Do I need a guard and a handrail on the same stair?
They serve different functions and may both apply. The handrail provides grip along the pitch; the guard keeps people from falling off the open side. One assembly can satisfy both when the dimensions allow.
Does the tread thickness change the handrail height?
No. The measurement is taken from the nosing line, so a thicker tread moves the whole nosing line rather than shrinking the rail height.
Calculators for this guide
Updated