Home, DIY & Auto

Stair Calculator

Enter the total rise from finished floor to finished floor. The calculator finds the number of risers, the exact riser height, the total run, stringer length and angle, and checks the result against common residential code limits.

Free, runs in your browserUpdated October 2026Checks IRC and Ontario Building Code limits
Units
in
Finished floor to finished floor.
in
in
Number of risers
–
Riser height–
Treads–
Total run–
Stringer length–
Stair angle–
2 × riser + tread–
Code check

Always confirm with your local building department. Codes also set headroom, handrail, guard and nosing rules.

Stair calculator diagram: a 108 in total rise gives 14 risers of 7.71 in and a 169 in stringer.
How the Stair Calculator works: Risers, treads and stringer length from one measurement, with a code check.

How to Use the Stair Calculator

How to use the stair calculator: pick units and building code, enter total rise and tread run, then read risers and stringer.
Numbered steps on the Stair Calculator. Follow them in order.
  1. Choose inches or millimeters.
  2. Pick the code to check against: IRC or Ontario Building Code private stairs.
  3. Enter the total rise from finished floor to finished floor.
  4. Set the maximum riser height and the tread run you want.
  5. Read the number of risers, riser height, stringer length, angle and the code check.

Measure the total rise, the vertical distance from the top of the lower finished floor to the top of the upper floor. Include flooring not yet installed, because it changes the first or last step.

Choose inches or millimeters, then pick the IRC or the Ontario Building Code to check against. The maximum riser height and a minimum tread run load automatically, and you can still change either value yourself.

The calculator picks the fewest risers that stay under your maximum and divides the rise evenly between them. It shows the treads, total run, stringer length, stair angle, a side view and a code check.

Stair Formulas

The number of risers is the total rise divided by the maximum riser height, rounded up. The actual riser height is the total rise divided by that number, so every step comes out exactly equal.

risers = round up (total rise ÷ maximum riser height)
riser height = total rise ÷ risers
treads = risers − 1
total run = treads × tread run
stringer length = √(total rise² + total run²)
angle = arctan(riser height ÷ tread run)

There is one fewer tread than risers because the upper floor acts as the final step. The total run is the number of treads times the tread run you entered, measured from the first nosing.

The stringer length uses the Pythagorean theorem, the square root of the rise squared plus the run squared. The stair angle is the arctangent of the riser height divided by the tread run, in degrees.

Worked Stair Example

A basement stair has a total rise of 108 inches (9 feet). With the IRC maximum riser of 7 3/4 in, 108 divided by 7.75 is 13.94, which rounds up to 14 risers in total.

Each riser is 108 divided by 14, or 7.71 in, just over 7 11/16 in. There are 13 treads, so with a 10 in run the total run is 130 in (10 ft 10 in).

The stringer is the square root of 108 squared plus 130 squared, 169.0 in, at 37.6 degrees. In metric, a 2,700 mm rise needs 14 risers of 192.9 mm and a 4,275 mm stringer line.

Second Example: A Gentler Stair

Now take a 96 in rise with a 10.5 in tread run. The calculator needs 13 risers of 7.38 in each and 12 treads, for a total run of 126 in along the floor below.

The stringer line becomes 158.4 in and the angle drops to 35.1 degrees. That deeper tread and shorter riser give a stair that feels noticeably easier to climb, especially when carrying laundry or heavy boxes.

Try changing the tread run to 9 in and the code check turns red, because the IRC requires at least 10 in. The side view drawing also updates instantly, showing how steep the stair becomes.

Residential Stair Code Limits

The IRC, used across most US states, limits riser height to 7 3/4 in and requires a tread run of at least 10 in. The full rules appear in the IRC chapter on building planning.

For house stairs, the Ontario Building Code allows a rise of 125 to 200 mm and a run of 255 to 355 mm. The minimum run rose to 255 mm for permits sought after 2021.

Other provinces follow the National Building Code of Canada or their own provincial version, and cities can add local rules. The IRC also limits risers in one flight to within 3/8 in of each other.

CodeRiser heightTread run
IRC (US), section R311.7.57 3/4 in maximum10 in minimum
Ontario Building Code, private stairs125 to 200 mm255 to 355 mm

How to Design Comfortable Stairs

A long-standing rule of thumb, written as 2R + T, says two risers plus one tread should equal about 24 to 25 in, or roughly 610 to 635 mm. The calculator flags whether you meet it.

Stairs steeper than about 40 degrees feel like a ladder, while very shallow stairs waste floor space. The steepest stair the IRC allows, 7 3/4 in over 10 in, works out to about 37.8 degrees.

If your design fails the code check, add one riser to lower each step, or lengthen the tread run if you have room. Every riser in a flight must stay the same height for safety.

Headroom, Width, Handrails and Landings

Codes regulate more than steps. Under the IRC, headroom must be at least 6 ft 8 in above the nosing line, and the stair width must be at least 36 in above the handrail height.

A handrail is needed on stairs with four or more risers, usually 34 to 38 in above the nosing. A guard is needed where the open side drops more than 30 in to the floor.

Landings are required at the top and bottom of most stairs, and nosing projection rules apply to solid risers. Winders and curved stairs follow separate rules that this calculator does not cover in full detail.

Cutting Stair Stringers

Most stringers are cut from 2x12 lumber, and a typical stair uses at least two, with a third in the middle for wider stairs. Buy stock longer than the calculated length to allow for cuts.

The bottom of the stringer needs a level cut and a plumb cut. Because the tread sits on top, the bottom riser is cut shorter by the tread thickness so every finished step stays equal.

Mark the rise and run with a framing square, then check the first stringer against the real opening before cutting the others. Small errors repeat on every step, so accurate layout saves material and time.

Deck Stairs and Exterior Steps

Deck stairs follow the same geometry, so the calculator works for exterior steps too. Measure the total rise from the deck surface down to the finished landing pad, not to the uneven soil or grass.

Outdoor stairs need solid footings or a concrete pad at the bottom, and guards and handrails follow the same height rules as indoor stairs. Treated lumber and proper fasteners help resist rot and corrosion outdoors.

This is a planning tool, not an approval. Local rules on permits, footings and guards vary, so confirm your design with your local building department before you cut stringers or pour any concrete for footings.

Frequently asked questions

How many steps do I need for a 9 foot rise?

A 108 in rise with a 7 3/4 in maximum riser needs 14 risers of 7.71 in each and 13 treads. With a 10 in run, the total run is 130 in and the stringer is 169.0 in.

What is the maximum stair riser height in Ontario?

For private stairs in a house, the Ontario Building Code allows a rise of 125 to 200 mm and a run of 255 to 355 mm. Always confirm with your local building department before building.

What is the maximum riser height under the IRC?

The International Residential Code limits risers to 7 3/4 in and requires a tread depth of at least 10 in. Risers within one flight may not differ by more than 3/8 in.

How do I calculate stringer length?

Use the Pythagorean theorem: the square root of the total rise squared plus the total run squared. Buy lumber a little longer than the result to allow for the top and bottom cuts.

Why is there one less tread than risers?

The top riser leads directly onto the upper floor, which serves as the last step. So a stair with 14 risers has 13 treads, and the total run counts only those treads.

What is the best angle for stairs?

The steepest stair the IRC allows, with 7 3/4 in risers and 10 in treads, is about 37.8 degrees. Stairs steeper than about 40 degrees feel like a ladder, while very shallow stairs waste floor space.