Calculate This Build · Stairs
Module · Build

Stair
Stringer

Number of steps, riser height, tread depth, total run, and stringer length for any deck, porch, or loft height. With IRC code checks built in.

See the math behind this calculator
IRC max riser
7¾″

IRC min tread
10″

Comfortable range
7″ riser · 11″ tread
Total rise (deck height)
Step parameters
Stringer config -
Number of risers-
Actual riser height-
Number of treads-
Total run-
Stringer length-
Stair angle-
▸ Cut layout - measure from corner
Step Height from base Run from base

The math

Stair design is a series of compromises. Total rise is fixed by your deck height. From there, you pick a target riser height, round to the nearest whole number of risers, and recalculate to get equal steps.

num_risers = round(total_rise ÷ target_riser)
actual_riser = total_rise ÷ num_risers
num_treads = num_risers − 1
total_run = num_treads × tread_depth

Number of treads is always one less than risers - the top step lands on the deck itself. The total run is just treads times tread depth.

Frequently asked

Why do my steps need to be exactly equal?

Code requires variation under ⅜″ for safety. People's brains form a pattern after one step - if the second is even slightly different, they trip. This is the leading cause of stair injuries. Build to the calculated actual riser, not the target.

What stringer stock do I need?

For stairs under 8 risers, 2×12 stringers are standard. Over 8 risers, structural engineering gets into play - you may need engineered LVL or doubled-up 2×12s. The stringer length output here tells you minimum stock length.

How do I lay out the stringer?

Use a framing square. Mark the riser height on the tongue and tread depth on the body. Walk it down the stringer, marking each step. Or use stair gauges (small brass clamps) to lock the square at the right positions and step-mark the whole stringer in one pass.

Show the working

Total rise is the fixed input and everything else follows from it. Riser height is never chosen directly — it falls out of how many risers you divide the rise into. If any of it looks wrong, it might be - tell us what we got wrong.

Number of risers risers = round(total rise ÷ target riser height) minimum 2
Actual riser height actual riser = total rise ÷ risers
Treads and total run treads = risers − 1 total run = treads × tread depth
Stringer length stringer = √(total rise² + total run²)
Angle of the flight degrees = atan2(total rise, total run) × 180 ÷ π
Comfort check riser + tread should fall between 17 and 18.5 inches

Constants used

  • risers − 1 — there is always one fewer tread than riser, because the top surface is the landing
  • 17 to 18.5 inches — the conventional comfort range for riser plus tread

Because the riser count is rounded to a whole number, your actual riser height will rarely equal the target you typed. That is correct behaviour — every riser in a flight must be equal, and building codes limit how much the tallest and shortest may differ.

The sources

Stair geometry is one of the few things on this site governed by an actual legal code rather than a convention, so the limits here are code limits and not preferences.

The IRC limits this page enforces max riser = 7.75 in min tread = 10 in max variation within a flight = 0.375 in
  1. City of Boise. IRC Section R311.7.5 - Stair Treads and Risers, code handout. The governing numbers. A 7 3/4 inch maximum riser, 10 inch minimum tread, and the 3/8 inch maximum variation between the tallest and shortest riser in a flight.
  2. Town of Essex, Connecticut. Residential Stairways and Ramps, IRC handout. A second municipal restatement of the same section, which is what makes it a cross-check that these are the code figures rather than one jurisdiction's amendment.

Two warnings the code carries that a calculator cannot. Your jurisdiction may amend the IRC and some do, so check locally before cutting. And the 3/8 inch uniformity rule is the one that fails inspections most often, because it is about the flight as built rather than the arithmetic as designed.