How a stair is laid out
Every stair starts from one fixed number: the total rise, the height from the finished lower floor to the finished upper floor. That height is divided into equal risers. Divide the rise by the tallest riser you are willing to use and round up; that is the number of risers, and the actual riser height is the rise divided by that whole number.
A straight flight has one tread fewer than it has risers, because the upper floor acts as the last step. Multiply the treads by the tread depth to get the total run — the floor space the stair covers from the face of the bottom riser to the edge of the upper floor.
If the run does not fit, the only way to shorten it is fewer, taller risers or shallower treads, and both are limited by code. Enter the space you have under optional limits and the calculator will show what fits and whether it still passes.
For the sloping length of a stringer by itself, the Pythagorean theorem calculator works too; for pouring solid concrete steps, use the concrete calculator.
Stair formulas
N = ⌈H ÷ Rmax⌉
R = H ÷ N
Run = (N − 1) × T
θ = atan(R ÷ T) · L = √(H² + Run²)
- H
- total rise, finished floor to finished floor
- Rmax
- the tallest riser you want (at most 7¾ in under the IRC)
- ⌈ ⌉
- round up to the next whole number
- T
- tread depth, measured nosing to nosing
- L
- the diagonal from the foot of the first riser to the top of the flight
The stringer is usually cut from a longer board: add enough for the level cut at the floor and the plumb cut against the upper framing. Because the tread boards sit on top of the stringer, the bottom step on the stringer is cut shorter by one tread thickness; otherwise the first step would be taller than the rest.
Worked example
A basement stair with 9 ft (108 in) from floor to floor, risers no taller than 7½ in, 10 in treads with a 1 in nosing and 1 in thick tread boards:
- Risers: 108 ÷ 7.5 = 14.4, rounded up to 15
- Riser height: 108 ÷ 15 = 7.2 in (7 3/16 in on the tape)
- Treads: 15 − 1 = 14
- Total run: 14 × 10 = 140 in (11 ft 8 in)
- Angle: atan(7.2 ÷ 10) = 35.8°
- Stringer diagonal: √(108² + 140²) = 176.8 in, about 14 ft 8 13/16 in
- Bottom stringer riser: 7.2 − 1 = 6.2 in (6 3/16 in)
It passes every IRC rule checked. In metric, a 2,700 mm rise with 180 mm risers and 260 mm treads gives 15 risers of exactly 180 mm, a 3,640 mm run, a 34.7° angle and a 4,532 mm stringer diagonal.
If only 10 ft (120 in) of floor is available, just 12 treads fit, so the same rise needs 13 risers of 8.31 in — over the 7¾ in limit. The fix is a longer run, a landing with a turn, or a different location.
The IRC stair rules
Most US states and cities base their house code on the International Residential Code. In the 2021 edition the stair rules are in section R311.7; the 2024 edition moved them to R318.7. The main dimensions:
- Risers at most 7¾ in, measured between the leading edges of adjacent treads (R311.7.5.1).
- Treads at least 10 in deep, measured between the foremost projections of adjacent treads (R311.7.5.2).
- Uniformity: within a flight, the tallest riser may exceed the shortest by at most ⅜ in, and the same applies to tread depths.
- Nosing between ¾ in and 1¼ in, not required where treads are at least 11 in deep (R311.7.5.3).
- Headroom at least 6 ft 8 in, measured vertically from the sloped line along the nosings (R311.7.2).
- Width at least 36 in clear above the handrail; below it, 31½ in with a handrail on one side or 27 in with handrails on both (R311.7.1).
- Vertical rise of one flight at most 12 ft 7 in between floors or landings (R311.7.3).
- Handrail on at least one side of a flight with four or more risers, 34 in to 38 in above the nosings (R311.7.8).
Carpets, rugs and runners are not counted in these dimensions. Spiral stairs and winders have their own rules.
Local codes differ
Codes are adopted by each state or city, often with amendments and sometimes an older edition. Outside the US the rules are different altogether. Check with your building department before you build; a permit inspection is what decides.
What this calculator does not cover
- Straight flights only — no landings, winders, spiral stairs or L- and U-shaped layouts.
- The headroom check uses the value you enter; it cannot see beams or the floor opening above. The sketch shows where the 6 ft 8 in line sits so you can compare it with your ceiling.
- No lumber sizing, stringer spans, guard rules or material prices.
- Commercial buildings follow the International Building Code, which has stricter riser and tread limits than the IRC.
Frequently asked questions
How many steps do I need for a 9 foot ceiling?
Measure finished floor to finished floor, not the ceiling. A 9 ft (108 in) rise needs at least 14 risers to stay under the 7¾ in IRC maximum (108 ÷ 14 = 7.71 in); with a 7½ in target it is 15 risers of 7.2 in and 14 treads.
What is the maximum riser height and minimum tread depth?
Under the 2021 International Residential Code, risers may be at most 7¾ inches and treads at least 10 inches deep, measured nosing to nosing. Your local code may differ, so confirm it with the building department.
Why is there one less tread than riser?
On a straight stair between two floors, the upper floor itself is the top step. You climb one riser more than the number of treads you stand on, so the treads equal the risers minus one.
How long should the stringer board be?
At least the diagonal from the foot of the first riser to the top of the flight, the square root of rise squared plus run squared. Buy a board longer than that so there is material for the level cut at the floor and the plumb cut at the top.
What is a good stair angle?
Residential stairs built to the IRC limits are at most about 37.8 degrees steep (a 7¾ in riser over a 10 in tread). Shorter risers and deeper treads give a gentler, easier stair but need more floor space.
Sources
Last reviewed September 19, 2026