A code-compliant stair railing needs three things: a graspable handrail between 34 and 38 inches above the tread nosing, guard infill that blocks a 4-inch sphere, and posts anchored to resist a 200-pound point load. Everything past that baseline — material, profile, finish — is a design decision, not a code requirement.
What building codes actually require for stair railings
Codes separate two components that homeowners often lump together. A handrail is the graspable rail you hold while climbing or descending; a guard is the full barrier that stops someone from falling off the open side of a stair or landing. Under IRC R311.7.8.1 (2021 edition), handrail height is measured vertically from the sloped line connecting the tread nosings and must fall between 34 and 38 inches — no more, no less. Guards are a separate rule: IRC R312.1.1 requires a guard wherever a stair or landing sits more than 30 inches above the floor or grade below, and R312.1.2 sets residential guard height at a minimum of 34 inches (up to 38 inches where the guard doubles as the handrail). Commercial projects under the IBC push that minimum to 42 inches.
Infill spacing follows the 4-inch sphere rule under IRC R312.1.3: no opening in a guard — between balusters, under the bottom rail, or at a cable run — can let a 4-inch diameter sphere pass through. Two exceptions soften this on stairs: the triangular gap formed by the riser, tread, and bottom rail can allow a 6-inch sphere, and the opening on the stair-side of a guard can allow 4 3/8 inches. Before you settle on a style, run your rise, guard height, and post spacing through the Stair Railing Calculator — it flags whether your planned dimensions clear the sphere test before you buy materials.
Worked example: a stair with a 108-inch total rise and 14 risers averages 7.71 inches per riser. The handrail is set at 36 inches (914 mm) — a figure that satisfies the IRC, the IBC, and the ADA simultaneously, so it’s the default choice on mixed-use projects where one flight might later need accessible compliance. Baluster gaps are held to a 3.5-inch clear opening, which leaves margin below the 4-inch limit to absorb manufacturing tolerance and wood movement.
Comparing railing materials: cost, durability, and best use
Material choice affects cost, maintenance, and how much structural work the posts need to do. The table below uses US pricing per linear foot installed; UK and Australian buyers should expect roughly comparable relative differences between materials, even though absolute costs vary by region.
| Material | Cost range (installed, per linear ft) | Durability / lifespan | Best use case |
| Wood (pine, oak) | $50–$150 | 15–25 years indoors; needs refinishing every 5–7 years | Traditional interiors, budget-conscious remodels |
| Wrought iron / steel | $100–$250 | 30+ years; galvanized steel resists rust outdoors | Traditional-to-transitional homes, exterior stairs |
| Cable railing | $150–$300 | 20–25 years; stainless cable resists corrosion | Modern homes, view-preserving deck and porch rails |
| Glass panel | $200–$400 | 25+ years; tempered glass rarely degrades but can chip | Contemporary interiors, floating stair designs |
Cable and glass systems cost more per foot largely because of hardware — tensioners, standoffs, and structural posts capable of resisting the load without relying on the infill, since neither cable nor glass contributes meaningfully to lateral strength on its own.
Common mistakes
Flat cap rails that fail the grip test. IRC R311.7.8.3 requires a graspable profile — a circular rail 1.25 to 2 inches in diameter, or an approved Type II shape. A wide, flat-topped cap rail looks finished but fails inspection because a hand can’t close around it. The fix is a smaller graspable rail mounted under or alongside the decorative cap.
Rounding baluster spacing up to exactly 4 inches. Contractors often space balusters at what they measure as “4 inches” center-to-center, forgetting that the code measures the clear opening, not the center distance. Once baluster width is subtracted, a 4-inch center spacing can leave a legal-looking gap that still fails the sphere test. Target a 3.5-inch clear opening to build in tolerance.
Cable tension loosening after installation. Stainless cable railing stretches slightly under load and temperature change; if it isn’t re-tensioned, the gap between cables can widen past 4 inches within a year or two. Specify turnbuckles at every run and schedule a re-tension check at the one-year mark.
Applying residential guard height to a commercial job. A 36-inch guard is legal on a house under the IRC but fails an IBC inspection on a commercial or multi-family project, where 42 inches is the floor. Confirm which code governs before finalizing post height, since retrofitting taller posts after installation usually means replacing the whole assembly.
Related calculators you might need
Once you know your target guard height and material, baluster layout is the next thing to lock down — the Baluster Spacing Calculator takes your run length and post spacing and returns a compliant gap. If you’re still deciding where the handrail itself sits, the Handrail Height Calculator checks your rise-and-run against the 34–38 inch window. Wood and iron railings both terminate at a newel post, and the Newel Post Calculator sizes the post to the guard height and expected load. For guard height specifically on commercial or mixed-use flights, run the numbers through the Guardrail Height Calculator. And before you commit to a material, the Stair Railing Cost Calculator gives a project-level estimate across the options above.
Frequently asked questions
How high should a stair railing be?
The graspable handrail sits 34 to 38 inches above the tread nosing under the IRC, IBC, and ADA alike, which is why 36 inches is the most common spec — it clears all three at once. That’s separate from guard height: a residential guard needs to be at least 34 inches, and a commercial guard at least 42 inches, measured vertically from the walking surface.
What is the maximum gap between stair balusters?
The opening can’t allow a 4-inch diameter sphere to pass through, per IRC R312.1.3. In practice, most builders target a 3.5-inch clear gap between balusters to leave margin for tolerance. Two exceptions apply on stairs: the triangular gap at the riser/tread/bottom-rail can allow 6 inches, and the stair-side opening can allow 4 3/8 inches.
Do I need a handrail on both sides of my stairs?
Residential code (IRC) requires a handrail on at least one side of any stairway with four or more risers, and doesn’t mandate both sides. Commercial stairs under the IBC generally require handrails on both sides, and ADA-accessible routes always need both. Check your Stair Railing Calculator inputs against the code that governs your project before finalizing the layout.
Can I use cable railing on an interior staircase?
Yes, as long as the horizontal cable spacing still meets the 4-inch sphere rule and the posts are rated to resist the lateral load without relying on the cables for strength. Horizontal cable is banned in some jurisdictions on stairs specifically because a horizontal run can act as a ladder for young children — vertical cable or a different infill avoids that objection entirely.
What’s the cheapest code-compliant railing material?
Wood is generally the least expensive option, running $50 to $150 per linear foot installed depending on species and profile complexity. It also requires the most ongoing maintenance — expect to refinish every 5 to 7 years indoors, sooner outdoors — so the lower upfront cost trades against long-term upkeep compared with metal or composite alternatives.

Leave a Reply