Stair Railing Calculator
Stair handrail + guardrail sizing across 6 materials (PT pine, cedar, composite, aluminum, steel, cable). Pythagorean sloped length × auto-both-sides for stairs over 44″ wide (IRC R311.7.8.2). Handrail height check (R311.7.8.1, 34-38″). Optional guardrail (R312.1, required if walking surface > 30″ off grade).
Inputs
IRC R311.7.8 + R312 compliance
Handrail 34″ — IRC compliant
IRC R311.7.8.1Within IRC R311.7.8.1 range. Measure vertically from tread nose at every step.
8 lf handrail × $12/lf = $96
2026-Q1 retailSloped length 7.82 ft × 1 side. pt pine pricing.
8 lf guardrail × $28/lf = $224
IRC R312.1Full balustrade system (top rail + balusters + posts) follows handrail path. Required if walking surface > 30″ off grade per IRC R312.1.
IRC R311.7.8.1 handrail height 34-38″. R311.7.8.2 both sides if stair >44″. R312.1 guardrail required if >30″ off grade. Pair with Railing Cost + Cable Railing + Baluster Spacing Calculators.
How to use
How to use the stair railing calculator in 5 steps.
- 1
Enter stair run + rise
Total run in ft (horizontal stair length). Total rise in inches (grade to deck top). These feed Pythagoras for sloped length.
- 2
Set stair width
If > 44″ (3.67 ft), IRC R311.7.8.2 REQUIRES handrails on BOTH sides — the calculator forces both-sides automatically. Below 44″, one-side is allowed (toggle the both-sides option for design preference).
- 3
Pick handrail height
IRC R311.7.8.1: 34-38″ measured vertically from tread nose. 36″ is most common. 34″ for shorter users. 38″ for taller. Above 38″ = code violation.
- 4
Pick material
PT pine ($12/LF). Cedar ($18). Composite ($26 — matches deck). Aluminum ($38 — modern). Steel ($32 — industrial). Cable ($48 — minimalist, premium).
- 5
Include guardrail if needed
IRC R312.1 — guardrail (full balustrade) required if stair walking surface is >30″ off grade. The calculator adds guardrail cost ($28-95/LF depending on material) on top of handrail cost.
How we calculate
How DeckMath calculates this — IRC 2021 sources.
The Stair Railing Calculator sizes handrails + guardrails for stairs per IRC R311.7.8 + R312. Pythagorean sloped length × handrail count (1 or 2 sides per IRC R311.7.8.2 — both sides if stair >44″ wide). 6 materials (PT pine, cedar, composite, aluminum, steel, cable) × handrail-only vs handrail+guardrail. Auto-enforces IRC handrail height 34-38″ + handrail-both-sides threshold. Guardrail required separately if stair walking surface >30″ off grade (R312.1).
IRC references
- IRC R311.7.8.1 — Handrail height 34-38″
- IRC R311.7.8.2 — Both sides if stair > 44″ wide
- IRC R312.1 — Guardrail at > 30″ off grade
- IRC R311.7.8.3 — Grip dimensions Type I or II
Verify against the published source: 2021 International Residential Code (ICC).
IRC 2021 R311.7.8 + R312. Material pricing 2026-Q1 big-box retail.
Same Pythagorean math as stringer length. For 80″ run × 49″ rise: √(6400 + 2401) = 93.8″ = 7.82 ft sloped length per handrail.
1 side or 2 sides. For 7.82 ft × 2 sides = 15.6 ft total — round to 16 ft for ordering.
PT pine: 16 × $12 = $192. Aluminum: 16 × $38 = $608. Cable: 16 × $48 = $768 for handrail only.
Full balustrade follows the same path as handrail. Cost: PT pine $28/LF, aluminum $78/LF, cable $95/LF. Required if stair walking surface > 30″ off grade.
Save your plan
Don’t lose this estimate.
Your inputs are preserved in the URL — email it to yourself or copy the link so you can compare with contractor bids later. No account needed.
Get matched
Want 2–3 free quotes for this exact deck?
We'll send your plan to vetted local builders. Free, no obligation.
People also ask
Stair railing questions, answered.
IRC R311.7.8.2 — only if stair is WIDER than 44″. Below 44″ (which covers most residential 36-42″ stairs): one-side handrail is fine + code-compliant. Above 44″ (rare for residential): BOTH sides required. The calculator forces both-sides automatically when stair width exceeds 44″.
34-38″ measured vertically from the tread nose (R311.7.8.1). 36″ is most common — comfortable for adults. 34″ for shorter users or kid-friendly stairs. 38″ is the max — anything higher violates code. The handrail must be continuous along the stair flight (no breaks).
Yes. Handrail = the gripping rail people hold (single horizontal rail, 34-38″ height). Guardrail = the full balustrade system (top rail + balusters + posts, 36-42″ height typically). On stairs over 30″ off grade, you typically need BOTH (R312.1 + R311.7.8). The Calculator separates the two cost lines.
Wildly varies by material. For a 5-step stair (80″ run, 49″ rise, ~8 ft sloped length): PT pine handrail + guardrail = ~$320 ($40/LF combined). Cedar = $480. Composite (Trex matching) = $620. Aluminum = $930. Cable = $1,140. Cable is most expensive but gives unobstructed view.
IRC R312.1 — required if the stair walking surface is more than 30″ above grade. Even one step might require it if that step is above 30″ off ground (rare but possible on hillside decks). Below 30″ off grade: handrail only is fine. Above 30″: full guardrail required to prevent falls off the side.
Match the deck railing material. Trex deck = Trex handrail + Transcend balusters. Composite deck = matching composite. Cedar deck = cedar railing. Mismatched materials look DIY. Premium upgrade: cable rail anywhere because it gives unobstructed view — best aesthetic, highest cost ($48-95/LF).
Yes — cable rail works on stairs but requires specific stair-rated brackets that allow the cable to angle along the stair slope. Premium choice — ~$48/LF handrail + $95/LF full cable railing system. The Cable Railing Calculator has stair-specific math (cable spacing tightens to ≤4″ at stair triangle per R311.7.8.2.2). For unobstructed views from stairs, nothing beats cable.
Yes. Deck guardrail = 36″ minimum (R312.2). Stair handrail = 34-38″ (R311.7.8.1). The two MUST transition smoothly where stairs meet deck — typically the deck guardrail steps down from 36″ to 38″ at the stair top, then the 34-38″ handrail follows the stair flight. Most installers run the handrail at 36″ from tread nose for consistency with deck height.
Two paths: (1) Newel posts at the bottom + top of stair — handrail runs between them. (2) Wall-mounted brackets (Simpson StairTek or similar) — handrail attaches to adjacent wall. Most residential decks use newel posts. The handrail must support 200 lb in any direction per IRC R311.7.8.4 — translates to 8-10 brackets/posts for a typical stair flight.
Embed this calculator
One line. Any site. Free.
Drop the snippet into your contractor site, blog, or marketing page. Theme matches the parent site automatically.
<!-- Stair Railing Calculator — free embed by DeckMath --> <a href="https://deckmath.com/calculators/stair-railing-calculator" data-deckmath-calc="stair-railing-calculator" data-theme="auto">Free Stair Railing Calculator by DeckMath</a> <script src="https://embed.deckmath.com/v1.js" async></script>
Plan the whole project, not just one number
The Deck Project Planner turns your dimensions into a complete material list, cost, 3D preview, and a PDF you can take to the lumber yard — all in one place.
Related