Fail a railing inspection and you’ll rip out and reinstall the whole run, so getting the numbers right the first time matters. The stair railing height code in the US, set by the International Residential Code (IRC), requires handrails to sit between 34 and 38 inches above the stair nosing, a range with zero tolerance on either side. That four-inch window trips up more DIY carpenters than any other measurement in a stair build. Get it wrong by half an inch and an inspector can red-tag the job, forcing you to relocate every bracket.
Part of our Stairs & Stair Flooring guide — explore the full guide →
- Handrail Height: The 34 to 38 Inch Rule
- Guardrail Height Is Different: 36 Inches Minimum
- When Is a Railing Even Required?
- Baluster and Opening Spacing: The 4-Inch Sphere
- Graspability: The Detail Inspectors Actually Check
- Handrail Continuity and Returns
- Mounting Height for Wall-Mounted Handrails
- Common Code Violations Inspectors Flag
- Check Your Local Code Before You Build
Handrail Height: The 34 to 38 Inch Rule
Handrails, the graspable rail you slide your hand along on stairs, must measure 34 to 38 inches high. That height is measured vertically from the top of the finished stair tread nosing, the front edge of each step, up to the top of the rail.
The reason for that specific range is ergonomics. It puts the rail at a comfortable, catchable height for the average adult descending stairs. Measure from the nosing, not the middle or back of the tread, or your numbers will read high and you’ll mount the rail too low.
Guardrail Height Is Different: 36 Inches Minimum
Homeowners constantly confuse handrails with guardrails. A guardrail is the barrier that keeps you from falling off an open edge, like a landing, balcony, or the open side of a staircase.
Guardrails must be at least 36 inches high, measured from the floor or landing surface. On the stairs themselves, where the guard runs alongside, the top of the guard can serve double duty as the handrail if it falls within that 34-to-38-inch window. On flat landings and balconies, though, the full 36-inch minimum guard height applies with no upper limit.
- Handrail on stairs: 34 to 38 inches from tread nosing
- Guardrail on open stair sides: minimum 34 inches (can double as handrail)
- Guardrail on landings and balconies: minimum 36 inches
When Is a Railing Even Required?
Under the IRC, a handrail is required on at least one side of any staircase with four or more risers. A guardrail is required on any open-sided walking surface, including stairs and landings, that sits more than 30 inches above the floor or grade below.
That 30-inch trigger catches a lot of decks and interior landings. If your platform is higher than 30 inches, you need a compliant guard even if it’s just a step or two up.
Baluster and Opening Spacing: The 4-Inch Sphere
Height is only half the code. The gaps between balusters (the vertical spindles) matter just as much because they’re a child-safety issue. The rule is simple: a 4-inch sphere must not be able to pass through any opening in the guard.
That means balusters need to be spaced so no gap exceeds 4 inches. On the triangular opening formed at the bottom of a stair guard by the tread, riser, and bottom rail, the limit loosens slightly to a 6-inch sphere. Space your balusters at roughly 4 inches on center with standard 1.5-inch spindles and you’ll clear the requirement.
Graspability: The Detail Inspectors Actually Check
A handrail has to be something you can actually grip and hold if you slip. The IRC defines graspable shapes, and a flat 2×4 laid on edge does not qualify.
- Type I (round): 1.25 to 2 inches in diameter, or an equivalent graspable perimeter.
- Type II (larger profiles): allowed if they have a finger recess and meet specific dimensional rules.
The rail also needs at least 1.5 inches of clearance between the rail and the wall so your fingers can wrap around it. Mount a rail too tight to the wall and you’ll fail even if the height is perfect.
Handrail Continuity and Returns
Handrails must be continuous for the full length of the stair flight, from the top riser to the bottom riser. Where they end, the ends must return to the wall or terminate in a newel post rather than sticking out.
That return requirement exists because an open rail end can catch a sleeve, a purse strap, or a backpack and pull someone down the stairs. A simple 90-degree return fitting back to the wall satisfies it and costs a few dollars.
Mounting Height for Wall-Mounted Handrails
When a handrail attaches to a wall with brackets, the mounting math trips people up. The bracket screws into a stud, but the code height refers to the top of the rail, not the bracket. Measure up 34 to 38 inches from the tread nosing, mark that line, then position the bracket so the rail’s top edge lands on it.
Space brackets no more than 4 feet apart so the rail doesn’t flex when someone leans on it, and always hit a stud or solid blocking. A rail screwed into drywall alone will pull out under real weight, which defeats the entire safety purpose. Use a stud finder, and add blocking behind the drywall during framing if you’re building new.
Common Code Violations Inspectors Flag
Certain mistakes come up again and again on failed inspections. Knowing them ahead of time saves a rebuild.
- Rail height outside 34 to 38 inches because it was measured from the wrong point
- Baluster gaps over 4 inches from uneven spacing
- A flat 2×4 rail that isn’t graspable
- Handrail ends that don’t return to the wall or a post
- Guards under 36 inches on landings and balconies
- Loose posts not anchored to framing
Run through this list before you call for inspection. Most of these are quick fixes if caught early but expensive reworks once the rest of the stair is finished.
Check Your Local Code Before You Build
The IRC is the baseline, but your city or county can amend it, and some jurisdictions still enforce older code cycles. Commercial buildings fall under the stricter IBC and ADA rules, which differ from residential.
Before you buy lumber, call your local building department or check their website for the adopted code year and any local amendments. Pull a permit if your project requires one, because unpermitted stair work can haunt you at resale when an inspection flags it. A ten-minute phone call now saves a failed inspection and a costly rebuild later. Measure from the nosing, keep the rail between 34 and 38 inches, hold gaps under 4 inches, and make sure you can actually grab the rail, and you’ll pass.