How to Install a Stair Handrail
Measure, lay out, and mount a code-height stair handrail — including the grip height window and the top and bottom extensions inspectors check first.
Get the height window right first
A graspable handrail must sit between 34″ and 38″ above the line connecting the tread nosings under residential code (IRC R311.7.8). That measurement is taken vertically from the leading edge of each tread, not from the floor, so the rail runs parallel to the stair pitch. Pick one height inside that window — most installers use 36″ — and hold it for the entire run. If your stairs serve a commercial or public building, IBC narrows the window to 34″–38″ as well but adds the extension rules below, and ADA enforces them strictly, so check which code governs before you commit to a height.
Grip matters too. A round handrail must be 1¼″ to 2″ in diameter so an adult hand can close around it; oversized newel-style rails need a graspable profile or a separate rail. A non-circular handrail has its own perimeter limits — roughly 4″ to 6¼″ around with a maximum cross-section, so a chunky decorative cap can fail even if it looks grabbable. There must also be at least 1½″ of clearance between the rail and the wall so knuckles do not scrape. Confirm the exact height, grip, and clearance limits for your jurisdiction with the handrail length calculator, which checks IRC, IBC, ADA, UK and 80-plus codes for you.
Why the rail is longer than the stairs
The handrail does not stop at the top and bottom risers. Code requires extensions so a hand stays supported through the transition: under IBC/ADA the rail must extend one tread depth (about 12″) horizontally past the top riser, and one tread depth plus the going past the bottom riser. Residential IRC is more lenient but extensions are still best practice and often required on the bottom. The reasoning is ergonomic — a climber needs something to hold a half-step before and after the flight, exactly where a fall is most likely on the transition between sloped and level walking.
So your total rail length is the sloped grip length over the flight plus those end extensions. For the canonical example flight — 15 treads at 11″ — the sloped run alone is roughly 16′-9″ along the pitch; the calculator adds the code extensions on top. Buy a little long and trim to fit rather than ordering exactly the calculated figure, because a rail that comes up short forces an ugly splice in the middle of the run. Get that number before you buy stock so you are not back at the store mid-install.
Tools and materials
- Handrail stock rated for the run, plus mounting brackets (one near each end and roughly every 4′ between).
- A stud finder, and #10 or larger wood screws long enough to bite at least 1½″ into solid framing.
- A level, a chalk line, a tape measure, a drill/driver, and painter’s tape to mark bracket centers.
Step 1 — Snap the rail line
Measure your chosen grip height up from two nosings — one near the bottom, one near the top — and mark the wall. Use the same nosing-relative measurement at both ends so the line you snap runs perfectly parallel to the stair pitch; measuring from the floor instead will tilt the rail because the floor and the nosing line are not parallel.
Account for the bracket geometry: if a bracket drops the rail 2½″ below its mounting point, set your wall marks that much higher so the finished grip lands inside the 34″–38″ window. Snap a chalk line between the two marks; that line is the reference for the top of every bracket, and getting it right here is what keeps the whole rail at a legal, consistent height.
Step 2 — Find solid backing
Brackets must hit framing, never just drywall. Run the stud finder along the chalk line and mark every stud. Where a bracket needs to land between studs, you either shift it to the nearest stud (brackets can sit anywhere along the run as long as spacing rules are met) or add solid blocking behind the drywall before you close the wall — much easier during construction than after.
Plan a bracket within a few inches of each end of the rail and no more than about 4′ apart in between, so the rail cannot flex under a real grab. A long residential flight typically needs three to five brackets.
Step 3 — Mount the brackets and hang the rail
- Hold each bracket with its top edge on the chalk line, level it, and mark the screw holes.
- Drill pilot holes into the studs or blocking and drive the screws — snug, not stripped.
- Set the rail into the brackets, confirm the grip height at several points, then fasten the rail to the brackets.
- Cut and fit the top and bottom extensions, returning the ends to the wall or a newel so nothing snags a sleeve or a pocket.
Returns, ends, and the guard that goes with it
The ends of the rail must be returned — curved or angled back to the wall or terminated into a newel post — so nothing protrudes to catch a sleeve, a backpack strap, or a falling hand. An open-ended rail sticking out into a hallway is both a snag hazard and a common inspection failure. Plan the return fitting when you buy the rail, since pre-made return pieces have to match the rail profile.
On an open stair the handrail is only half the system: a guard with infill is required wherever the walking surface is more than 30″ above the floor below, and that infill must pass the 4″ sphere rule. Lay out those balusters with the baluster spacing calculator so the rail you just installed sits on a guard that also passes. Where the guard doubles as the handrail, the same member has to satisfy both the guard height and the graspable-rail grip rules at once.
Step 4 — Verify before you call it done
Put real weight on the rail at the middle of each span — it should not move. A handrail has to resist a concentrated load at any point, so a rail that flexes under a firm pull will not pass and, worse, will not hold someone who actually slips. If it moves, add a bracket or hit solid framing, do not just retighten a screw in drywall.
Re-check the grip height off the nosings at the top, middle, and bottom; a rail that drifts out of the 34″–38″ window at one end is a fail even if the rest is perfect. Confirm both extensions are present, that the ends are returned, and that the wall clearance is at least 1½″ the whole way. If any number is uncertain, run your flight through the handrail length calculator again. It returns the sloped length, the required extensions, the mounting height, and the grip-diameter check together, so you can reconcile what you built against what your code wants. Budget the rail, brackets, and fittings alongside the rest of the job with the stairs cost calculator.
Run your numbers
Handrail Length Calculator Get the handrail length for your stairs — the sloped grip run plus the code-required top and bottom extensions — with mounting height and grip diameter checked against your building code.Related stair calculators
Written by the Stairs Calc editorial team. Methodology and code references: see our methodology.
Built and maintained by builders, drafters and engineers who plan stairs for a living — every code limit is transcribed from the published standard and cited to its exact section.
Last reviewed 2026-06-20 against IRC 2021/2024
Stairs Calc gives accurate geometry and checks it against published building-code limits, but results are estimates for planning. Codes are adopted and amended locally and change over time. Always confirm dimensions against your local adopted code and a licensed professional before you build.