Stair Calculator
Turn a total rise into an exact riser height, tread count, total run, stringer length and stair angle — then check the result against the IRC limits and the 2×12 you are about to cut.
Figures are for planning. Stair geometry is enforced locally and amendments to the IRC are common, so confirm rise, run, headroom and handrail requirements with your building department before you cut.
How to calculate stair rise and run
Every stair starts from one measurement: the total rise, taken from the finished floor at the bottom to the finished floor at the top. Not the subfloor — if tile is going down later, it belongs in the number now, because a stair cut to the subfloor ends up with a short top step once the finish goes on.
Divide that rise by a comfortable riser height and round to a whole number of risers, then divide the rise back by that count. The result is the exact riser height, and it almost never lands on a round figure — which is precisely why the calculator reports it in sixteenths, the way a framing square is actually read.
risers = round(total rise ÷ 7.5) · riser height = total rise ÷ risers · treads = risers − 1
The tread count is one less than the riser count because the top tread is the floor you are stepping onto. Total run is treads × tread depth, and the stringer is the diagonal across the whole flight: stringer = √(total rise² + total run²)
What the code actually requires
Stair geometry is one of the most-cited items in residential inspection, and the two numbers that matter are short. Under the International Residential Code, a riser may be no more than 7¾ inches (R311.7.5.1) and a tread no less than 10 inches (R311.7.5.2). Headroom is a minimum of 6 ft 8 in measured vertically from the tread nosing (R311.7.2).
The limit people fail is the consistency rule rather than the maximum: within one flight, the tallest and shortest riser may differ by no more than ⅜ inch. That is the whole reason the riser height gets divided out rather than guessed at, and the reason the bottom riser is cut short by one tread thickness.
| Dimension | IRC (residential) | IBC (commercial) |
|---|---|---|
| Maximum riser height | 7¾ in | 7 in |
| Minimum tread depth | 10 in | 11 in |
| Maximum variation within a flight | ⅜ in | ⅜ in |
| Minimum headroom | 6 ft 8 in | 6 ft 8 in |
Local amendments are common and they override these figures, so the calculator flags a result as Check rather than Fail — it is telling you where to look, not ruling on your jurisdiction.
Cutting the stringer
Stringers are cut from 2×12 stock, which is 11¼ inches wide, and the question that decides whether the board works is how much of it survives the notching. The remaining depth behind the cuts is called the throat, and it needs to be at least 5 inches or the stringer loses its strength:
throat = board width − (riser × tread) ÷ √(riser² + tread²)
With a 7½ inch riser and a 10½ inch tread on a 2×12, that leaves about 5⅛ inches — passing, but not by much. Deepen the tread to 11½ inches and the throat drops below the minimum, which is the point at which builders move to 2×14 stock or a cut-and-bolted stringer. The calculator runs this check on every result, because it is the constraint that most stair calculators leave out entirely.
For board length, take the stringer diagonal and add roughly a foot for the square cuts at each end, then round up to the next stock length — 8, 10, 12, 14, 16 or 20 ft. A five-step flight comes to about 4 ft 8 in of diagonal and still takes an 8 ft board, because that is the shortest 2×12 sold.
Planning the rest of the build
Pouring concrete steps instead of framing them? The concrete calculator has a stairs mode that accounts for each step sitting on the ones below it. For the roof pitch on a covered stairway see the rafter calculator, and for the landing slab underneath, the gravel calculator covers the base. More in the home and construction hub.
Frequently asked questions
How do I calculate my stairs?
Start with the total rise — floor surface to floor surface, not floor to subfloor. Divide it by a target riser height of about 7.5 inches and round to a whole number: that is your riser count. Then divide the total rise by that count to get the exact riser height, which almost never lands on a round number. The tread count is one less than the riser count, because the top tread is the finished floor. Total run is treads × tread depth, and the stringer is the diagonal: the square root of rise² plus run².
What is the 27 rule for stairs?
It is an ergonomic check, not a code rule: 2 × riser + tread should land between 24 and 27 inches. The idea is that a stair should match an adult stride — a tall riser needs a shallow tread and vice versa. A 7 inch riser with an 11 inch tread gives 2(7) + 11 = 25 inches, comfortably inside the range. You will also see a simpler version, the 17–18 rule, which just adds one riser to one tread. The calculator shows the 2 × riser + tread figure for every result.
What is the 7-11 rule for stairs?
A 7 inch maximum riser with an 11 inch minimum tread. Those are the commercial figures from the IBC, and they are more generous than the residential IRC minimums of 7¾ inch riser and 10 inch tread. Many builders use 7-11 in houses anyway because the shallower, deeper step is noticeably easier to walk — the trade-off is that it eats more floor space, since every extra inch of tread adds an inch to the total run.
How long is a 2x12 for a 5 step stringer?
An 8 foot board, with room to spare. Five risers at 7½ inches is 37½ inches of rise, and four treads at 10½ inches is 42 inches of run, so the diagonal is √(37.5² + 42²) = 56.3 inches — about 4 ft 8 in. You still buy an 8 ft 2×12 because that is the shortest stock length, and the extra gives you the square cuts at top and bottom. Watch the throat as well: after notching, at least 5 inches of board must remain behind the cuts.
Why is the bottom riser cut shorter?
Because the treads add their own thickness to every step except the bottom one. If you cut all risers identically, the finished bottom step ends up one tread thickness taller than the rest — and a step that is even ⅜ inch out of line is both a code violation and the classic trip point. The fix is to cut the bottom riser short by exactly one tread thickness. With 1 inch treads and a 7½ inch riser, the bottom cut is 6½ inches. The calculator does this subtraction for you.