How do I lay out a staircase to code?
Enter the floor-to-floor height and tread depth to get step count, riser height, angle and stringer length, code-checked in 3D.
Result
- Riser height
- Tread depth
- Rise per flight
- Comfort (2R + T rule of thumb)
- 4 or more risers: a handrail is required on at least one side (IRC R311.7.8 / R318.7.8).
- Treads under 11 in need a ¾–1¼ in nosing (IRC R311.7.5.3 / R318.7.5.3).
- Keep at least 6 ft 8 in of headroom over every tread (IRC R311.7.2 / R318.7.2).
Loading 3D viewer…
How is this calculated?
Using the tool
Enter your floor-to-floor height and a tread depth. You get the step count, exact riser height, angle, and stringer length — checked against residential code, and built in 3D.
The math
The step count is your total rise divided by an ideal ~7 in riser, rounded to a whole number — unless that would make a riser taller than the 7¾ in code maximum; then it takes the fewest risers that fit (16 in of rise → 3 risers, not 2). The exact riser height is then total rise ÷ step count, so every step is identical (code allows ⅜ in variation at most). Treads = risers − 1, because the top floor is the last tread.
Total run = treads × tread depth. The stringer (carriage) length is the diagonal: √(rise² + run²). The angle is arctan(rise ÷ run) — a comfortable stair lands around 30–37°.