How stair layout math works
Laying out a stair stringer starts with one number: the total rise — the exact vertical distance from the lower level to the upper level, measured plumb (straight up and down, not along a slope). Everything else in the layout follows from that measurement.
Number of risers = round(Total rise ÷ Target riser height)
You pick a comfortable target riser height — commonly around 7.5 in — and divide the total rise by it. That almost never comes out to a whole number, so you round to the nearest whole riser count. Then you divide the total rise by that whole number of risers to get the actual riser height everyone will step on.
This rounding step matters because a staircase can only have one riser height, not a mix of close-enough heights. If risers varied even slightly step to step, someone walking the stairs by feel (which most of us do after the first two or three steps) would catch a foot on the odd one out. That's why building code doesn't just cap the maximum riser — it also limits how much risers can differ from each other within one flight, typically to 3/8 in. Because this calculator divides the total rise evenly across a whole number of risers, every riser it gives you comes out identical by construction.
Treads work differently. The number of treads is always one less than the number of risers, because the top step is the deck or floor itself — you don't build a tread for the landing you're already standing on. Multiply the tread count by your tread run (the depth of each step) to get the total horizontal run of the staircase, and then the stringer length — the actual board length you need to cut — comes from the Pythagorean theorem, since the stringer is the hypotenuse of the total rise and total run.
Worked example: a 55 in total rise
Say you're building deck stairs with a 55 in total rise (deck surface to ground) and a 7.5 in target riser height, with a 10.5 in tread run.
55 ÷ 7.5 = 7.33, which rounds to 7 risers. Divide the 55 in rise by 7 risers and each one works out to 55 ÷ 7 ≈ 7.86 in— but that's above the common 7¾ in (7.75 in) code maximum, so this layout would fail inspection as-is.
The fix is to add one more riser: 55 ÷ 8 = 6.875 in per riser, comfortably under the limit. With 8 risers you get 7 treads, so total run is 7 × 10.5 = 73.5 in, and the stringer length is √(55² + 73.5²) ≈ 91.8 in, or about 7 ft 8 in. The calculator above catches this automatically — enter a 55 in rise and 7.5 in target riser, and it will flag the 7-riser layout as over the limit and show you the 8-riser fix.
The 2R + T ≈ 25 comfort rule
Beyond code minimums, stair builders often lean on a simple rule of thumb for comfort: double the riser height, add the tread run, and aim for the result to land somewhere around 24 to 25.
2 × Riser + Tread run ≈ 25
A 7.2 in riser with a 10.5 in tread run gives 2 × 7.2 + 10.5 = 24.9, right in the comfortable range. The idea is that taller risers should pair with shorter treads and vice versa, since your stride naturally shortens going up a steep stair and lengthens on a shallow one. It's a design guideline, not a code requirement, but it's a useful gut check once your riser and tread numbers pass the hard limits.
Marking a stringer with a framing square
Once you know your riser height and tread run, you can mark the cut lines directly on a 2x12 with a framing square and a pair of stair gauges (small clamps that lock onto the square at your exact measurements). Set one gauge to the riser height on the square's tongue and the other to the tread run on the body, then lay the square against the top edge of the board so both gauges sit flush against it. Trace along the outside edge of the square to mark one riser cut and one tread cut, then slide the square down to the point where those lines end and repeat for the next step — working your way down the board until you've marked every riser and tread. Cut along the lines with a circular saw, finishing the inside corners with a handsaw so you don't overcut into the part of the board that needs to stay uncut for strength.
Code limits at a glance
These are common US residential code (IRC) figures used as general guidance — always confirm the exact numbers with your local building department before cutting any lumber.
| Item | Common limit |
|---|---|
| Maximum riser height | 7¾ in (7.75 in) |
| Minimum tread run (depth) | 10 in |
| Max riser variation within a flight | 3/8 in |
| Minimum stringer material | 2x12, ~5 in uncut throat |