How the stair calculator works
Every straight staircase starts with one measurement: the total rise, the height from the finished floor at the bottom to the finished floor at the top. Measure it where the stairs will stand, and use finished surfaces, because carpet, tile or a new subfloor changes the height of the first or last step. The calculator divides the rise into equal risers that are no taller than the height you allow, and rounds the number of risers up so none of them is too tall.
A stair that runs from floor to floor has one tread fewer than it has risers, because the upper floor is the last step. Example: a rise of 108 in with risers of at most 7 1/2 in needs 108 ÷ 7.5 = 14.4, rounded up to 15 risers of 7 3/16 in (7.2 in exactly). With treads of 10 1/2 in, the 14 treads make a total run of 12 ft 3 in, the stringer is about 15 ft 2 7/16 in long, and the stair climbs at 34.4°. If you allow the full 7 3/4 in, the same rise needs only 14 risers.
Two ways to set the step size are built in. "Choose the tread" uses the tread depth you enter, so the stair gets as long as it needs to be. "Fit into a run" works the other way around: enter the floor space you have, and the calculator spreads the treads evenly across it, then tells you if they come out shorter than the code allows. You can also type a number of risers to try one more or one fewer step.
Code limits for residential stairs
The International Residential Code (IRC) is a model building code for homes, published by the International Code Council. A model code only applies where a state or city adopts it, often with its own changes or in a different edition, so the rules for your house are the ones your building department enforces. These are the stair limits in section R311.7 of the 2021 IRC, which the calculator checks:
| Rule | 2021 IRC limit | Section |
|---|---|---|
| Riser height | at most 7 3/4 in (196 mm) | R311.7.5.1 |
| Tread depth | at least 10 in (254 mm) | R311.7.5.2 |
| Difference within a flight | 3/8 in (9.5 mm) between the largest and smallest riser, and the same for treads | R311.7.5.1, R311.7.5.2 |
| Nosing projection | 3/4 to 1 1/4 in (19 to 32 mm), not required when treads are 11 in (279 mm) or deeper | R311.7.5.3 |
| Headroom | at least 6 ft 8 in (2032 mm) | R311.7.2 |
| Width | at least 36 in (914 mm) clear above the handrail | R311.7.1 |
| Rise of one flight | at most 12 ft 7 in (3835 mm) between floors or landings | R311.7.3 |
| Handrail | on at least one side from 4 risers, 34 to 38 in high | R311.7.8 |
The code measures the riser height vertically between the leading edges of neighboring treads, and the tread depth horizontally between the front edges of neighboring treads. Carpets, rugs and runners do not count. That is why the calculator works with the tread depth from nosing to nosing: the board you buy for each tread is that depth plus the nosing overhang. The table below shows how many risers common rises need at the 7 3/4 in limit, and the shortest total run with 10 in treads.
| Total rise | Risers | Riser height | Shortest run |
|---|---|---|---|
| 36 in | 5 | 7 3/16 in | 3 ft 4 in |
| 48 in | 7 | 6 7/8 in | 5 ft |
| 72 in | 10 | 7 3/16 in | 7 ft 6 in |
| 96 in | 13 | 7 3/8 in | 10 ft |
| 102 in | 14 | 7 5/16 in | 10 ft 10 in |
| 108 in | 14 | 7 11/16 in | 10 ft 10 in |
| 114 in | 15 | 7 5/8 in | 11 ft 8 in |
| 120 in | 16 | 7 1/2 in | 12 ft 6 in |
Laying out and cutting the stringer
The stringer is the sloped board that carries the treads, usually a 2×12 cut into a sawtooth. Each tooth has a plumb cut for the riser and a level cut for the tread. Lay the cuts out with a framing square set to the riser height on one arm and the tread depth on the other, and step it along the board.
The first step needs one change. Each tread sits on top of its level cut and adds its own thickness, so if the bottom plumb cut had the full riser height, the first step would come out one tread thickness too tall and the last one too short by the same amount. Trim the bottom of the stringer so its first riser is the riser height minus the tread thickness. With a 1 in tread and 7 3/16 in risers, the first plumb cut is 6 3/16 in, and every step is 7 3/16 in once the treads are on. If the floor at the bottom will get a thicker finish than the floor at the top, include that difference too.
The cut list gives every cut as a height above the floor and a distance from the front of the stringer. Each value is rounded on its own from the exact number, so the small rounding to 1/16 in never adds up along the stairs, which helps keep the steps within the 3/8 in the code allows. The calculator also shows how much wood is left under the cuts, measured square to the bottom edge of the board. A 2×12 is 11 1/4 in wide and a 2×10 is 9 1/4 in under the softwood lumber standard. For the board length, add some extra to the stringer length for the end cuts. Construction lumber commonly comes in 2 ft steps, so the lumber calculator helps price the stringers, treads and risers.
Headroom and the floor opening
The code measures headroom straight up from the sloped line that touches the tread nosings. In a basement or a two-story house, the tight spot is usually the edge of the opening in the floor above. If the opening ends a horizontal distance L from the top riser, its edge sits above a point of the nosing line that is L × riser ÷ tread lower than the upper floor. Subtract the thickness of the floor structure and you have the headroom.
In the example, with a floor 10 in thick, the opening has to reach 10 ft 11 1/4 in back from the top riser. A steeper stair needs a shorter opening, a shallower one a longer opening. For a roof or ceiling slope above the stairs, the roof pitch calculator turns rise and run into an angle the same way.
How to use the stair calculator
- 1Pick US inches or metric millimeters and enter the total rise from finished floor to finished floor.
- 2Choose the tread depth, or switch to "Fit into a run" and enter the floor space you have. Set the tallest riser you want.
- 3Enter the tread thickness and nosing, and the floor thickness and opening length above if you want the headroom checked.
- 4Read the steps, the stringer length, the drawing and the code check, then copy the cut list or a link for the job site.
Frequently asked questions
How do I calculate the number of stairs?
Divide the total rise, measured from finished floor to finished floor, by the tallest riser you want and round up. That gives the number of risers, and the riser height is the rise divided by that number. A rise of 108 in at a limit of 7 3/4 in needs 108 ÷ 7.75 = 13.9, so 14 risers of 7 11/16 in. A straight stair from floor to floor has one tread fewer than risers, because the upper floor is the last step.
What is the maximum riser height and minimum tread depth?
The 2021 International Residential Code, section R311.7.5, allows risers of at most 7 3/4 in (196 mm) and treads of at least 10 in (254 mm). Within one flight, the tallest riser may not exceed the shortest by more than 3/8 in, and the same applies to treads. Your local code may differ, so check with your building department.
How long does a stair stringer need to be?
The stringer runs along the diagonal of the total rise and the total run, so its length is the square root of rise squared plus run squared. A stair with a rise of 108 in and 14 treads of 10 1/2 in has a run of 147 in, and the stringer is about 182 7/16 in, a little over 15 ft. Buy a longer board, because the end cuts need some extra wood.
Why is the first riser on the stringer shorter?
Every tread sits on top of a cut in the stringer and adds its thickness. If the bottom cut had the full riser height, the first step would end up one tread thickness too tall. So the first riser cut is the riser height minus the tread thickness, and all the steps above it come out equal once the treads are on.
How much headroom do stairs need?
The 2021 IRC asks for at least 6 ft 8 in (2032 mm), measured straight up from the sloped line along the tread nosings, or from the landing floor. In the calculator, enter the thickness of the floor above and the length of the opening to check it, or read the shortest opening that still gives 6 ft 8 in.
How wide do stairs have to be?
Section R311.7.1 of the 2021 IRC asks for at least 36 in of clear width above the handrail. At and below the handrail, at least 31 1/2 in is required with a handrail on one side and 27 in with handrails on both sides. Spiral stairs have their own rules.
Do deck stairs follow the same rules?
Section R311.7 applies to stairways the code requires or that are built anyway. Its exceptions name stairways that do not serve a building, porch or deck, and stairways to nonhabitable attics or crawl spaces. Stairs that serve a deck are not on that list, but deck rules and adopted codes vary, so ask your building department.