Stair Calculator: Steps, Rise, Run & Stringer Length
Measure from finished floor to finished floor, pick a comfortable riser height, and this free stair calculator works out how many steps you need, the exact riser height, the total run in feet and inches, and the stringer length to cut.
Formulas verified against standard stair-building references. Calculator logic tested with verified worked examples. Last reviewed: October 2026. Our methodology
How the stair math works
Every straight staircase is a right triangle: the total rise is the vertical side, the total run is the horizontal side, and the stringer is the hypotenuse. Six formulas turn your three inputs into a full cut plan.
- Number of steps: round(total rise ÷ desired riser), minimum 2. Steps have to be whole and equal, so the calculator rounds to the nearest whole step count.
- Actual riser height: total rise ÷ steps. Because of the rounding above, this is almost never exactly the riser height you typed — but it is always the same on every step.
- Number of treads: steps − 1. The top "tread" is the upper floor or landing itself, so you always build one fewer tread than there are risers.
- Total run: tread depth × (steps − 1) — the horizontal footprint the staircase will occupy on the floor.
- Stringer length: √(total rise² + total run²) — the hypotenuse of the stair triangle, and the length to lay out on your stringer board.
- Stair angle: arctan(total rise ÷ total run) × (180 ÷ π), shown in degrees. Most comfortable home stairs sit between 30° and 37°.
Sources: 2021 International Residential Code (IRC) Section R311.7 — Stairways; The Spruce — stair code requirements; calculator.net — stair calculator reference.
Worked example
Take a total rise of 36 inches, a desired riser height of 7.5 inches, and a tread depth of 10 inches.
- Steps: 36 ÷ 7.5 = 4.8, which rounds to 5 steps.
- Actual riser: 36 ÷ 5 = 7.20 inches on every step.
- Treads: 5 − 1 = 4 treads. Total run: 4 × 10 = 40 inches (3 ft 4 in).
- Stringer: √(36² + 40²) = √2896 = 53.81 inches (4 ft 5.81 in).
- Stair angle: arctan(36 ÷ 40) ≈ 42.0° — a touch steep, but fine for a short flight.
Code check: the 7.20 in riser is under the 7.75 in residential maximum, and the 10 in tread meets the minimum. Comfort check: 7.2 + 10 = 17.2 in, inside the classic 17–18 in range.
How to use the stair calculator
Three measurements in, one cut plan out. The most important one is the total rise — get that right and everything downstream follows.
Step by step
- Measure the total rise. Hook your tape on the finished lower floor and measure straight up to the finished upper floor. Include flooring thickness at both ends — a tile floor that goes in later changes every riser.
- Enter your desired riser height. The default is 7.5 in, a comfortable residential target. The calculator will round to whole, equal steps, so think of this as a preference, not a promise.
- Enter the tread depth. The default is 10 in, the code minimum with nosing. Measure nosing to nosing — the nosing overhang beyond the riser does not count toward the run.
- Press Calculate. Read your step count, actual riser, total run, stringer length and stair angle underneath.
- Check the notes. The calculator flags risers outside the 4–7.75 in comfort-and-code band and tells you when rise plus run drifts outside the classic comfort range.
Stair anatomy: rise, run, riser, tread and stringer
Builders use precise words for stair parts, and mixing them up is the fastest way to miscut a stringer. The total rise is the full vertical climb. Each riser is one vertical step face — your foot lifts exactly one riser per step. Each tread is the flat part you stand on, and its depth is also called the unit run. The total run is the whole horizontal footprint. The stringer is the notched board running diagonally underneath that carries the treads, and its length is the hypotenuse of the rise-and-run triangle.
| Part | What it is | How it is measured |
|---|---|---|
| Total rise | The full vertical climb, finished floor to finished floor | Measured straight up with a level |
| Riser | The vertical face of one step | The height your foot lifts per step |
| Tread (unit run) | The flat part you step on | Measured horizontally, nosing to nosing |
| Total run | The full horizontal footprint of the stairs | Tread depth × (steps − 1) |
| Stringer | The notched diagonal board the treads sit on | √(total rise² + total run²) |
| Nosing | The tread edge that overhangs the riser below | 3/4–1 1/4 in projection; does not count toward the run |
Two facts surprise first-time stair builders. First, there is always one fewer tread than risers, because the upper floor does the job of the top tread. Second, the stringer is pure Pythagoras — it is simply the hypotenuse of the right triangle your rise and run describe.
Stair code limits and the comfort rules
Code-compliant and comfortable are not the same thing, and a good staircase is both. In the US, the International Residential Code (IRC) Section R311.7 sets the geometric envelope for residential stairs:
| Rule | Residential limit | Code section |
|---|---|---|
| Maximum riser height | 7 3/4 in | R311.7.5.1 |
| Minimum tread depth (with nosing) | 10 in | R311.7.5.2 |
| Riser and tread variation in one flight | 3/8 in max | R311.7.5.1 / R311.7.5.2 |
| Minimum stair width | 36 in | R311.7.1 |
| Minimum headroom | 6 ft 8 in | R311.7.2 |
The 3/8 in variation rule is the one most DIY stairs fail: every riser in a flight must be nearly identical, because your feet climb on rhythm and one tall step trips people. Always confirm the edition your local building department has adopted — The Spruce has a plain-English rundown of the IRC stair requirements if you want the full picture before you cut.
The comfort rules
Code keeps stairs legal; the old carpenter rules keep them pleasant. The 7-11 rule says riser + tread should total 17–18 in — a 7 in riser with an 11 in tread is the classic pairing. The older 2R + T rule says twice the riser plus the tread should land near 24–25 in. Both describe the same idea: a taller step wants a shallower tread, and a short step wants a deeper one.
This stair calculator checks both for you. If your riser plus tread falls outside 17–18 in, it says so under the results — and if you want to see exactly how steep your design is, run the rise and run through our slope calculator to get the pitch angle.
Cutting stringers without the common mistakes
Most miscut stringers trace back to one of five mistakes. Avoid them and the calculator's numbers will land on the wood exactly.
- Measuring to the subfloor. Measure finished floor to finished floor. A 3/4 in hardwood floor added later shifts every riser by 3/4 in — the bottom one grows, the top one shrinks.
- Unequal risers. Mark every riser from the same layout, and check the 3/8 in variation rule with a tape before you cut. Your feet expect rhythm; give it to them.
- Forgetting the bottom riser sits on the floor. The first riser includes the tread thickness of the tread you stand on, and the top riser meets the upper floor. Account for tread thickness at both ends of the layout.
- Counting nosing as run. Nosing overhangs the riser for toe room, but it adds nothing to the run. The run is nosing to nosing — this is also why the unit run input defaults to 10 in.
- Skipping the dry fit. Cut one stringer, test-fit it, and use it as the pattern for the rest. Stringers usually come in pairs or triples on 2×12 stock, and one bad layout multiplied is an expensive lesson.
When you lay out the stringer, double-check every number against the calculator's breakdown before the saw touches wood. If your tape measure and your lumber list are in different units, convert first with our length converter. For a deeper walkthrough of code-compliant stair framing, this stairs building guide covers IRC limits and stringer span tables in detail.
Frequently asked questions
How do you calculate how many steps a staircase needs?
Divide the total rise by your desired riser height and round to the nearest whole number, with a minimum of 2 steps. Then divide the total rise by that step count to get the exact, equal riser height for every step.
What is the ideal riser height?
About 7 inches feels best to most people, and residential building code caps riser height at 7 3/4 inches. Below about 4 inches each step starts to feel like a ramp and eats up a lot of floor space for the run.
What is the 7-11 rule for stairs?
The 7-11 rule says riser height plus tread depth should total 17 to 18 inches for a comfortable staircase — a 7 inch riser with an 11 inch tread is the classic pairing. The older 2R + T rule says twice the riser plus the tread should land near 24 to 25 inches.
How do you calculate stringer length?
Stringer length is the hypotenuse of the stair triangle: the square root of (total rise squared + total run squared). For a 36 inch rise and 40 inch run, that is the square root of 2896, about 53.81 inches, or 4 ft 5.81 in.
Why does my staircase have one fewer tread than risers?
The top tread is the upper floor or landing itself — you step off the last riser directly onto it. So you only build treads for the steps in between, which is always one fewer than the number of risers.
Can I use this stair calculator for deck stairs?
Yes — the geometry is identical for deck stairs. Use pressure-treated lumber rated for ground contact, keep risers at or under 7 3/4 inches with treads at least 10 inches deep, and check your local building code before you build.
My actual riser came out over the code maximum — what now?
Add one more step: more steps mean shorter risers. For example, a 42 inch rise with a 7.5 inch desired riser gives 6 steps at exactly 7.0 inches each. Alternatively, start with a lower desired riser height and let the calculator re-round.
Related calculators
Slope Calculator
Find the slope of a line from two points. Get the slope, y-intercept, line equation, angle and distance.
Use calculatorLength Converter
Convert mm, cm, m, km, inches, feet, yards and miles in one step.
Use calculatorVolume Converter
Convert volume units instantly: liters, gallons, cups, milliliters, pints and more.
Use calculator