Stair Calculator

Enter your total rise (floor to floor, in inches) and the calculator finds the number of risers, the exact height of each, the total run, and the stringer length — then checks the layout against the IRC residential stair code.

Put this calculator on your website — free

Copy one snippet and give your visitors a working Stair Calculator.

How the stair math works

Stairs have one non-negotiable constraint: every riser must be identical, and you can't have a fraction of a step. So the calculation runs backwards from what you'd expect. Divide the total rise by your target riser height (7.5 inches is the sweet spot for most homes), round to the nearest whole number — that's your riser count — then divide the rise evenly across them to get the actual riser height. It's almost never exactly 7.5, and that's fine; what matters is that it's consistent and under the code maximum.

A flight always has one fewer tread than risers, because the top landing serves as the final step. Total run is treads × tread depth, and the stringer — the diagonal 2×12 the steps are cut into — is the hypotenuse of the rise-run triangle.

The formulas

risers = round(rise ÷ target)  ·  riser height = rise ÷ risers  ·  run = (risers − 1) × tread  ·  stringer = √(rise² + run²)

Rise is the total floor-to-floor height in inches (measure it — don't trust the plans), target is your preferred riser height, and tread is the horizontal depth of each step. All results are in inches.

Worked example

A basement stair with a 106-inch total rise, using the default 7.5-inch target riser and 10.5-inch treads: 106 ÷ 7.5 = 14.13, which rounds to 14 risers. Actual riser height is 106 ÷ 14 = 7.57 in — under the 7.75-inch IRC maximum. That gives 13 treads and a total run of 13 × 10.5 = 136.5 in (11.38 ft). The stringer is √(106² + 136.5²) = 172.82 in, so you'd cut from 16-foot 2×12 stock. Comfort check: 2 × 7.57 + 10.5 = 25.64 — right in the natural-stride zone.

The 2R + T rule, and the code limits that actually matter

Carpenters have used the same comfort formula for three centuries: twice the riser plus the tread should come to about 24-25 inches, the length of a comfortable human stride on a slope. Shorter and the stair feels cramped; longer and you're stretching. The IRC residential limits (R311.7.5) are the hard boundaries: risers no taller than 7¾ inches, treads no shallower than 10 inches, and no more than ⅜ inch of variation between the tallest and shortest riser in the flight — your legs memorize step one and a single odd riser is how people fall. Two more numbers worth knowing before you cut: minimum headroom is 6′8″ measured plumb from the tread nosing line, which is what usually forces a stair to be relocated rather than resized; and remember to subtract finish-floor thickness at top and bottom before laying out the stringer, or your first and last risers will bust the ⅜-inch rule on day one.

Frequently asked questions

How many stairs do I need for 8 feet of height?

Eight feet is 96 inches of total rise. Dividing by a 7.5-inch target riser gives 12.8, which rounds to 13 risers at exactly 7.38 inches each — and 13 risers means 12 treads, for a total run of 126 inches with standard 10.5-inch treads. Always divide your true measured rise, not the nominal ceiling height, because floor framing and finish flooring change the real number.

What is the maximum stair riser height by code?

The IRC (residential code, section R311.7.5) allows a maximum riser of 7¾ inches and requires a minimum tread depth of 10 inches, with no more than ⅜ inch of variation between the tallest and shortest riser in a flight. Commercial stairs under the IBC are stricter: 7-inch max riser, 11-inch min tread. Local amendments exist, so confirm with your building department before cutting stringers.

What is the most comfortable riser height for stairs?

Most people find a 7 to 7.5-inch riser paired with a 10.5 to 11-inch tread the most natural. The classic check is the 2R + T rule: twice the riser plus the tread should land around 24-25 inches, which matches an average adult stride. Stairs that pass code can still feel awkward if that sum drifts far from 25.

How do I figure out the length of a stair stringer?

The stringer is the hypotenuse of the stair triangle: square the total rise, square the total run, add them, and take the square root. A 106-inch rise with a 136.5-inch run needs about 173 inches — just over 14 feet — so you'd buy 16-foot 2×12s to leave material for the plumb and level cuts at each end.

Why do all stair risers have to be the same height?

Your legs memorize the first step and repeat it automatically, so a single odd riser is a genuine trip hazard — which is why the IRC caps riser variation at ⅜ inch across the flight. The classic mistake is forgetting finish flooring: if the top or bottom landing gains ¾ inch of hardwood after the stringers are cut, that first or last riser is now out of spec.

Related calculators