Stair Calculator
Calculate stair dimensions, stringer length, and IRC code compliance from floor-to-floor height.
Reviewed & updated for 2026 · How we calculate
How stair design works
Stair design balances three competing goals: comfort, safety, and space efficiency. Get any one wrong and the stairs feel awkward, become hazardous, or eat too much floor area. The math drives everything.
Start with the total rise, the exact vertical distance from finished floor to finished floor (or finished deck to ground level, including any deck thickness). Measure with a long level and tape, NOT by tape-measuring up a wall. A 96" measurement that's off by even 1/4" can throw off your riser heights.
The calculator divides total rise by your target riser height, rounds to a whole number of risers, then recalculates the exact riser height. Every riser must be identical within 3/8" by code, a single odd riser is a major trip hazard. The number of treads is always one less than the number of risers, because the upper floor itself counts as the final "step."
Stair design rules of thumb
- 2R + T = 24–25": A 200-year-old French rule. Twice the riser plus the tread should equal 24–25 inches for natural stride. 7" riser + 11" tread = 25", perfect.
- R + T = 17–18": Modern American rule. 7" + 11" = 18", comfortable.
- R × T ≈ 75: Architect's quick check. 7 × 11 = 77, within range.
- Headroom 6'8" min: Required clearance above any step. Critical in basement stairs where ducts/beams cut headroom.
- Nosing 0.75"–1.25": The tread overhang past the riser. Adds toe room without making the run too long.
Worked example: 9-foot ceiling deck-to-ground
You're building a deck 9 feet (108") above grade. Target 7" riser, 11" tread:
- Divide 108 ÷ 7 = 15.43 → round to 15 risers
- Actual riser = 108 ÷ 15 = 7.2" (under 7.75" code max, OK)
- Treads = 15 − 1 = 14 treads
- Total run = 14 × 11 = 154" = 12 ft 10"
- Stringer length = √(108² + 154²) = √(11,664 + 23,716) = 188" = 15 ft 8" (order 2×12 × 16' stringers)
- Angle = arctan(108 ÷ 154) = 35.1° (steeper than ideal 30–32° but within code)
Common stair-building mistakes
- Inconsistent risers: Top step turning out shorter because you forgot to account for the upper floor's finished surface or decking thickness. The single biggest trip-hazard mistake.
- Wrong stringer length: Buying 12' lumber for a stair that needs 14'+. Always compute the diagonal BEFORE buying lumber.
- Skipping the permit: Most jurisdictions require permits for any deck stair over 30" total rise. Permit cost ($100–$500) is far cheaper than tearing out failed work.
- Forgetting landings: Stairs over 12 feet total rise require a landing at the midpoint by code. Plan dimensions accordingly.
- No handrails: Required on any stair with 4+ risers. Must be 34"–38" high, graspable (1.25"–2" diameter), and continuous along the full length.
FAQs
How do I calculate stairs?
Three steps: (1) Measure total rise (floor-to-floor or deck-to-ground in inches). (2) Divide by typical riser height (7") to get number of risers, round to whole number. (3) Adjusted riser = total rise / number of risers. Treads = risers − 1 (top floor is the last 'step'). Total run = treads × tread depth.
What's the building code for stairs?
IRC 2024 (International Residential Code): Max riser height 7.75". Min tread depth 10". Max variation between any two risers or treads: 3/8". Min headroom 6'8". Min handrail height 34". Stairs over 30" total drop require handrails.
What's a comfortable stair angle?
Most comfortable: 30-35° (typical residential stairs). Steeper than 40° feels difficult. Less than 25° is shallow (rare). Formula: riser + tread = 17-18" for ergonomic comfort. Common: 7" riser + 11" tread = 18" total.
How long should the stringer be?
Stringer length = √(total rise² + total run²), Pythagorean theorem. For 9' rise (108") with 144" run: stringer = √(108² + 144²) = √(11,664 + 20,736) = √32,400 = 180" = 15 ft. Add 2-3 ft extra for cutting/error margin. Use 2x12 lumber for stringers.
How many stairs for an 8-foot ceiling?
8' floor-to-floor = 96". At 7" risers: 96 / 7 = 13.7 → 14 risers. Adjusted riser = 96 / 14 = 6.86" (slightly under 7"). Treads = 14 − 1 = 13 treads at typical 10-11" = 130-143" total run.