Stair Railing Height: What Code Requires for Handrails and Guards
Short answer: for a typical single-family home, stair railing height means a handrail between 34 and 38 inches, measured straight up from the sloped line along the tread nosings. A guard on the open side of a stair must be at least 34 inches on that same measurement, and a guard around a deck or landing more than 30 inches above the ground must be at least 36 inches high. Those are model-code numbers. Your local building department decides what applies to your house.
A railing built to the right height on paper can still fail an inspection, because someone measured from the wrong spot. The number matters, but where you hold the tape matters just as much. This guide covers both, with a worked example for a 36 inch deck.
If you are still working out the stairs themselves, run your total rise through the CalcForBuild stair calculator first. It gives you the riser count, the actual riser height and the run, and those numbers set where every railing post lands.
What is the standard stair railing height?
Two different parts get called “the railing,” and each has its own height rule.
| Part | What it does | Typical residential height |
|---|---|---|
| Handrail | The part you grab while climbing | 34 to 38 in above the tread nosings |
| Guard on the open side of a stair | Stops a fall off the side of the stair | At least 34 in above the tread nosings |
| Guard on a deck, porch or landing | Stops a fall off the edge | At least 36 in above the walking surface |
One county inspection handout based on the 2018 International Residential Code lists these same three numbers: handrails from 34 to 38 inches, stair guards at least 34 inches, and guards at least 36 inches where a porch, balcony or raised floor sits more than 30 inches above the ground (Knox County stairs handout).
Many stair railings do both jobs at once. A top rail set between 34 and 38 inches can serve as the handrail and as the guard top, which is why 36 inches shows up so often on residential stairs.
What is the handrail height on stairs?
Handrail height is the vertical distance from the sloped line that touches the front edge (the nosing) of each tread up to the top of the rail. Measure it straight up, plumb, not square to the slope of the stringer.
Three other handrail rules come up at inspection:
- When you need one. Once a flight reaches four risers, a handrail becomes a requirement, and one side is the minimum.
- How it feels in the hand. A round rail should be about 1 1/4 to 2 inches across, and a rail beside a wall needs 1 1/2 inches of clearance behind it.
- Shape matters. A flat 2x6 cap on a deck rail is comfortable for a drink and a poor handrail, because a hand cannot wrap around it. If your top rail is wide, plan a separate, smaller handrail profile.
What does the stair handrail height code say?
The model residential code sets a 34 inch minimum and a 38 inch maximum for stair handrails, measured vertically from the nosing line. Counties and cities adopt their own edition of that code, and many add amendments, so confirm the numbers with your local building department before you cut a single post.
Some things people assume are not part of the number itself:
- The height is measured from the nosings, not from the tread surface behind them and not from the ground.
- The range applies along the whole flight, so check it at more than one tread.
- A rail that reads 34 inches at one tread and 37 at another is out of line with the stair, even if both readings fall inside the range.
Commercial and multifamily buildings follow a different code and may require taller guards. This article is about one- and two-family homes. If you are working on anything else, call the building department first.
How high should a deck railing be?
Deck railing height is a guard question. Where the walking surface is more than 30 inches above the ground below, the handout above calls for a guard at least 36 inches high. Under 30 inches, that rule does not require a guard, though plenty of owners add one anyway.
A few practical points:
- Measure from the finished surface. If you plan to lay composite or wood decking over the frame, measure from the top of the decking, not the joists.
- Mind the gaps. Openings in a guard must not let a 4 inch sphere pass. The handout allows an exception for the triangle formed by the riser, tread and bottom rail on a stair, which may be sized to stop a 6 inch sphere instead.
- Plan for the load. The same handout says guards and handrails must resist a 200 pound point load. A rail that wobbles when you lean on it has a problem no matter what its height is. The posts and their connection to the frame do the work. Our guide on how to attach a stair stringer to a deck makes the same point for stringers: the connection is the structure.
Where do you measure stair railing height from?
Hold the tape against the front edge of a tread and run it straight up to the top of the rail. Repeat that at several treads along the flight.
Do the measuring after the treads are on. Decking boards add an inch or so to every nosing, and a post cut to the framing height will come up short once the treads go down.
What does a worked example look like?
Take a deck surface 36 inches above the ground, with a 10 inch tread depth and a 7 3/4 inch riser limit.
- Riser count: 36 / 7.75 = 4.65, round up to 5 risers
- Actual riser height: 36 / 5 = 7.2 inches
- Treads: 5 risers - 1 = 4 treads, with the deck acting as the top step
- Walking surface height of each step above ground: 7.2, 14.4, 21.6, 28.8 inches, then the deck at 36 inches
This deck is above 30 inches, so the deck edge needs a guard at least 36 inches high. The stairs have five risers, so they need a handrail. Set the handrail top at 36 inches above the nosings. That sits in the middle of the 34 to 38 inch window and leaves 2 inches either way for tread thickness and small errors.
Height of the rail top above the ground at each tread nosing:
| Position | Nosing height above ground | Rail top at 36 in above nosing |
|---|---|---|
| Tread 1 | 7.2 in | 43.2 in |
| Tread 2 | 14.4 in | 50.4 in |
| Tread 3 | 21.6 in | 57.6 in |
| Tread 4 | 28.8 in | 64.8 in |
| Deck edge | 36.0 in | 72.0 in |
These are our own calculations, using a 36 inch rail height. If your treads sit above the stringer tops, add the tread thickness to the nosing heights. If you choose a different rail height inside the range, add the same difference to the right-hand column.
What mistakes fail the railing inspection?
- Measuring from the tread surface instead of the nosing. The rail comes out an inch or two off.
- Setting a rail at 33 inches because it looked fine. The minimum is a minimum.
- A top rail too fat to grip. Good looking, and not a handrail.
- Gaps wider than 4 inches. Check the bottom of the stair guard too, where the triangle opens up.
- Posts fastened only through the decking. Anchor them to the framing, not to the surface boards.
- Skipping the local code check. An older or amended edition may use different numbers.
Quick reference
Handrail: 34 to 38 inches above the tread nosings, on stairs with four or more risers. Open-side stair guard: at least 34 inches. Deck guard: at least 36 inches where the surface is more than 30 inches above the ground. Openings: stop a 4 inch sphere. Confirm everything with your local building department, and use the stair calculator to get your rise and run right first.
FAQ
What is the standard stair railing height? For a typical home, the handrail top sits 34 to 38 inches above the tread nosings, measured vertically. A stair guard on an open side must be at least 34 inches on the same measurement.
What is the stair handrail height code? The model residential code gives a 34 inch minimum and a 38 inch maximum, measured vertically from the line along the tread nosings. Your jurisdiction may adopt a different edition or add amendments, so check locally.
How high should a deck railing be? At least 36 inches where the deck surface is more than 30 inches above the ground. Measure from the finished walking surface, and keep openings small enough to stop a 4 inch sphere.
Do stairs with three steps need a handrail? The model-code threshold is four or more risers, so three risers falls below it. Some jurisdictions are stricter, and a rail on a short flight is a cheap safety upgrade, so ask your building department.
Can the same rail be both the handrail and the guard? Often, yes. A top rail between 34 and 38 inches above the nosings can do both on a stair, as long as a hand can grip it and the openings below it meet the sphere limits.
Do I need a permit to add a railing? It depends on where you live. Many places treat a railing as part of a deck or stair permit. Call your building department before you start.
Last reviewed November 2, 2026.
Sources are linked inline where a figure needs one. Railing heights, opening limits and handrail requirements vary by jurisdiction and code edition. Figures here come from the linked county handout and from our own calculations, and they are planning information, not engineering advice.