Stair Calculator
Every Step Has to Be the Same Height, or Someone Trips
Building codes don't just cap how tall a single riser can be — they require every riser in a run to be within a fraction of an inch of the others, because the body learns a stair's rhythm after two or three steps and stops watching its feet. A staircase can't simply divide total rise by a target riser height and round; it has to land on a whole number of equal steps.
The Formula
Actual Riser Height = Total Rise ÷ Steps
Total Run = Steps × Tread Depth
Stringer Length = √(Total Rise² + Total Run²)
The calculator starts from a target riser height — 7.5 in by default for imperial (175 mm for metric), close to the comfortable residential standard — and rounds the total rise divided by that target to the nearest whole number of steps. It then works backward to find the actual riser height each step will have, which is always a little different from the target since it has to divide the total rise evenly. Total run and stringer length (the diagonal board the treads attach to) follow from the Pythagorean theorem.
Where This Calculation Matters
- Deck and porch stairs — outdoor stairs built from a fixed total rise need the riser height solved precisely so every step matches, unlike interior stairs where the rough opening is sometimes still adjustable.
- Stringer cutting — the stringer length tells a carpenter what length of lumber to buy before laying out the step cuts, and undersizing it means a stringer that doesn't reach the ground.
- Code compliance — most residential codes cap riser height around 7.75 in and set minimum tread depth, so checking the calculated actual riser height against your local code is a necessary step, not an optional one.
Worked Example
A staircase with 108 in (9 ft) of total rise and a 10 in tread depth, using the default 7.5 in target riser:
| Step | Calculation | Result |
|---|---|---|
| Number of steps | round(108 ÷ 7.5) | 14 |
| Actual riser height | 108 ÷ 14 | 7.71 in |
| Total run | 14 × 10 | 140 in |
| Stringer length | √(108² + 140²) | 176.82 in (14.73 ft) |
How to Use This Calculator
- Select Imperial (in) or Metric (mm) units.
- Enter the Total Rise / Height — the full vertical distance the stairs need to climb.
- Optionally enter a Target Riser Height — defaults to 7.5 in (175 mm).
- Enter the Tread Depth / Run for each step.
- Select Calculate to see the number of steps, actual riser height, and stringer length.
Related Calculations
Framing a deck the stairs will attach to? The Deck Material Calculator covers decking boards and joists, and the Lumber Calculator helps price the stringer and tread stock.