How to use the stair calculator
This stair calculator starts from the one measurement every stair is built around: the total rise, the height from the finished floor at the bottom to the finished floor at the top. It opens with a worked example already filled in, a rise of 8' 9" with 10 inch treads, so you can see real numbers before you type anything. Change a value and every result updates as you type.
- Pick the code. Homes (2024 IRC) checks against the International Residential Code, which covers one- and two-family houses and townhouses. Commercial (2024 IBC) uses the stricter International Building Code limits. Your town may have adopted an older edition or changed some rules, so treat the check as a guide and confirm with your building department.
- Enter the total rise. Measure from finished floor to finished floor, including the flooring on both levels. Type feet and inches the way you would write them (
8' 9",8 ft 9 in, or105for inches), or switch the units to Metric and type millimeters. - Set the tread depth and nosing. The tread depth here is the unit run, measured from one nosing to the next. The nosing is how far each tread overhangs the riser below it.
- Let it pick the risers, or set them. By default the calculator uses the fewest risers that keep each one at or under the code maximum. Lower the maximum for gentler steps, or choose Set a number to try a specific count. The Riser options tab lists several counts side by side.
- Check headroom and add a landing if you need one. Enter the depth of the floor above and the length of the stairwell opening to see the headroom, or turn on Add a landing to split the stair into two flights, straight or turning.
- Lay out the stringer. The Stringer layout tab gives the first-riser cut, the framing-square settings, the wood left after notching and the shortest board that fits. Copy the results, download a CSV or print them.
The same tool works as a stair stringer calculator, a stair rise and run calculator and a stair riser calculator, for basement stairs, stairs between floors and deck or porch steps.
How to calculate stairs
Every stair calculation comes down to dividing one height into equal steps. Work in inches, then use these formulas:
risers = total rise ÷ max riser height, rounded up
riser = total rise ÷ risers
treads = risers − 1
total run = treads × tread depth
stringer = √(total rise² + total run²)
stair angle = arctan(riser ÷ tread depth)
- Measure the total rise. Measure from the finished floor at the bottom to the finished floor at the top, including both floor coverings.
- Find the number of risers. Divide the total rise by the highest riser your code allows and round up to the next whole number.
- Work out the riser height. Divide the total rise by the number of risers so every riser comes out the same.
- Count the treads. There is one tread fewer than risers, because the floor at the top acts as the last step.
- Work out the total run. Multiply the number of treads by the tread depth, measured nosing to nosing.
- Find the stringer length. Treat the total rise and total run as the two sides of a right triangle; the stringer runs along the long side.
Worked example: an 8' 9" rise with 10 inch treads
- Total rise: 8' 9", which is 105 inches.
- Risers: 105 ÷ 7¾ rounds up to 14.
- Riser height: 105 ÷ 14 = 7 1/2", well under the IRC's 7¾ inch maximum (Section R318.7.5.1).
- Treads: 14 − 1 = 13.
- Total run: 13 × 10 = 130 inches, or 10' 10".
- Stringer: √(105² + 130²) = 13' 11 1/8", at an angle of 36.87°.
Those are the calculator's default values. If you are building on a deck instead of between floors, the Deck Calculator works out the joists, boards and footings, and this page covers the steps down to the ground.
Riser height: how many steps do you need?
The riser is the vertical height of one step, measured from the top of one tread to the top of the next. The IRC caps it at 7¾ inches (196 mm) (Section R318.7.5.1), and requires that "the greatest riser height within any flight of stairs shall not exceed the smallest by more than 3/8 inch". That uniformity rule is why the calculator divides the rise into identical risers instead of using a round number and leaving a short step at the top or bottom.
Round the count up, not to the nearest whole number: rounding down would make each riser taller than the maximum. For a home stair with 10 inch treads at the 7¾ inch maximum, common floor-to-floor heights work out like this:
| Total rise | Risers | Riser height | Treads | Total run | Angle |
|---|---|---|---|---|---|
| 7' 0" | 11 | 7 5/8" | 10 | 8' 4" | 37.37° |
| 8' 0" | 13 | 7 3/8" | 12 | 10' 0" | 36.44° |
| 8' 9" | 14 | 7 1/2" | 13 | 10' 10" | 36.87° |
| 9' 0" | 14 | 7 11/16" | 13 | 10' 10" | 37.65° |
| 9' 6" | 15 | 7 5/8" | 14 | 11' 8" | 37.23° |
| 10' 0" | 16 | 7 1/2" | 15 | 12' 6" | 36.87° |
| 10' 6" | 17 | 7 7/16" | 16 | 13' 4" | 36.54° |
| 11' 0" | 18 | 7 5/16" | 17 | 14' 2" | 36.25° |
A ceiling height is not the same as the total rise. The rise from one floor to the next also includes the depth of the floor framing, the subfloor and both floor coverings, so measure it on site or take it from the plans. A rise of 9' 0" divides into 14 risers of 7 11/16" to the nearest sixteenth. Rounding like that is fine for reading a number, but marking 14 risers at the rounded height adds up: lay out the heights from the floor with the tool's layout marks (a story pole) instead.
Tread depth, nosing and total run
The tread depth that matters for the code is the unit run, measured horizontally from the front edge of one tread to the front edge of the next. The IRC sets a minimum of 10 inches (254 mm) (Section R318.7.5.2), with the same 3/8 inch limit on variation within a flight. Carpet doesn't count: dimensions "shall be exclusive of carpets, rugs or runners".
The nosing is the front edge of a tread that overhangs the riser below. With solid risers and treads shallower than 11 inches, the IRC requires "a nosing projection not less than 3/4 inch (19 mm) and not more than 1¼ inches (32 mm)" (Section R318.7.5.3). The nosing adds to the tread board but not to the run: a 10 inch unit run with a 1 inch nosing needs 11" deep tread boards, and the stair still advances 10 inches per step.
The total run is the horizontal length of the stair, from the face of the bottom riser to the face of the top riser: the number of treads times the tread depth. There is one tread fewer than there are risers, because you step from the last tread straight onto the upper floor. Leave room beyond the run for the bottom nosing and for the landing or floor space at each end.
Stair stringer length and layout
The stringers are the sloped boards that carry the treads. Most calculators give the stringer length as the diagonal of the total rise and total run, and so does this one: for the default stair that is 13' 11 1/8". The Stringer layout tab goes a step further and works out the cut stringer itself.
- Framing square settings. Clamp stair gauges at the riser height on the tongue (7 1/2") and the tread depth on the body (10 inches), then step the square up the board, marking one riser and one tread at a time.
- The first riser is cut shorter. When the bottom floor is already finished, every tread adds its own thickness on top of the stringer, so the stringer is dropped by one tread thickness: with 1 inch treads the bottom riser on the stringer is 6 1/2", and every finished riser still comes out at 7 1/2". If the floor covering at the bottom goes in later, or differs from the top, adjust by the difference.
- Throat. Each notch removes a triangle from the board. Measured square to the slope, the notches here are 6" deep, so a 2×12 board, 11 1/4" wide, keeps 5 1/4" of solid wood below them.
- Layout length. From the bottom of the first riser to the plumb cut at the top, the notched stringer is 13' 5 7/8" long, so the shortest board that fits is 14 feet. Allow extra for trimming and for the way the top is attached.
What the tool will not tell you is how big the stringers must be, how far they can span or how many you need. That depends on the lumber species and grade, the stair width, the loads and how the stringers are supported. The IRC has no prescriptive table for stair stringers, so ask your building department or an engineer before you cut. The Board Foot Calculator prices the lumber once you know the sizes.
Stair angle
The angle of a stair is the arctangent of the riser height divided by the tread depth. The default stair climbs at 36.87°. The code doesn't set an angle directly, but the riser and tread limits do (Sections R318.7.5.1 and R318.7.5.2, and IBC 1011.5.2): the steepest stair the IRC allows, with 7¾ inch risers and 10 inch treads, climbs at 37.78°. Under the IBC's 7 inch risers and 11 inch treads it is 32.47°.
Lower risers or deeper treads make a gentler stair that takes more floor space. The same rise and run math sets a roof's slope, and the Roof Pitch Calculator converts it to pitch and rafter lengths.
Headroom and the stairwell opening
The IRC requires headroom of "not less than 6 feet 8 inches (2032 mm) measured vertically from the sloped line adjoining the tread nosing or from the floor surface of the landing or platform" (Section R318.7.2). On a stair between floors, the tightest spot is usually under the edge of the floor above, at the lower end of the stairwell opening.
The calculator measures that spot. Enter the depth of the upper floor, from its finished surface down to the ceiling below, and the length of the opening measured back from the top riser. With a 10 1/2" deep floor and a 10' 6" opening, the default stair has 6' 11 1/4" of headroom at the edge. The tool also solves the other way: to keep 6 feet 8 inches, the opening must be at least 10' 1 11/16" long.
A shorter opening means less headroom. If the opening can't grow, steeper steps (within the limits) shorten the stair and move its lower end back under the opening; a landing or a turn changes the geometry altogether.
Landings: when a stair needs one
The IRC requires "a floor or landing at the top and bottom of each flight of stairs", at least as wide as the stair, and for a straight run at least 36 inches (914 mm) deep in the direction of travel (Section R318.7.6). A single flight may not rise more than 12 feet 7 inches (3835 mm) between floor levels or landings (Section R318.7.3); under the IBC the limit is 12 feet (3658 mm). Taller stairs need an intermediate landing.
Turn on Add a landing and choose the riser it follows. Splitting the default stair after the 7th riser gives two flights that each rise 4' 4 1/2" and run 5' 0", with stringers 6' 7 3/4" long on the diagonal. Laid out straight with a 36 inch landing, the whole stair runs 13' 0". For an L or U turn the calculator reports the two flights separately and checks that the landing is at least as deep as the stair is wide.
Stair code requirements
Most US jurisdictions build on the International Code Council's model codes: the International Residential Code (IRC) for houses and the International Building Code (IBC) for most other buildings. The 2024 IRC moved its stair rules: what earlier editions numbered R311.7 is now R318.7, handrails moved to R320 and guards to R321. These are the limits the calculator checks, quoted from the 2024 editions:
| Rule | 2024 IRC | 2024 IBC |
|---|---|---|
| Riser height | 7¾ in. (196 mm) max, R318.7.5.1 | 4 in. (102 mm) min, 7 in. (178 mm) max, 1011.5.2 |
| Tread depth | 10 in. (254 mm) min, R318.7.5.2 | 11 in. (279 mm) min, 1011.5.2 |
| Variation in a flight | 3/8 in. (9.5 mm) max | 3/8 in. (9.5 mm) max, 1011.5.4 |
| Nosing projection | 3/4 to 1¼ in. (19 to 32 mm); not required with treads of 11 in. (279 mm) or more, R318.7.5.3 | 1¼ in. (32 mm) max, 1011.5.5.1 |
| Width | 36 in. (914 mm) min clear, R318.7.1 | 44 in. (1118 mm) min; 36 in. (914 mm) for an occupant load under 50, 1011.2 |
| Headroom | 6 ft 8 in. (2032 mm) min, R318.7.2 | 80 in. (2032 mm) min, 1011.3 |
| Rise of one flight | 12 ft 7 in. (3835 mm) max, R318.7.3 | 12 ft (3658 mm) max, 1011.8 |
| Landing depth | 36 in. (914 mm) min for a straight run, R318.7.6 | the stair width or 48 in. (1219 mm), whichever is less, 1011.6 |
| Handrails | at least one side of flights with four or more risers; 34 to 38 in. (864 to 965 mm) high, R318.7.8, R320.2 | both sides, with exceptions; 34 to 38 in. (864 to 965 mm) high, 1011.11, 1014.2 |
| Guards | where an open side is more than 30 in. (762 mm) above the floor or grade below; 34 in. (864 mm) high on the open sides of stairs, R321.1 | 42 in. (1067 mm) high, 1015.3 |
The IRC applies to stairways "where required by this code or provided", with exceptions for stairways not within or serving a building, porch or deck, and for stairs to nonhabitable attics and crawl spaces. Guard openings may not pass a 4 inch sphere (4⅜ inches on the open side of stairs) (Section R321.1.3). Spiral stairs, winders, alternating tread devices and ship's ladders have their own rules, which this calculator does not cover. The IBC also sets accessibility and occupancy rules that depend on the building, so its check here covers only the general stair limits.
Local codes and amendments govern; check with your building department. Towns adopt code editions on their own schedule and often amend them, and a permit inspection is what decides whether a stair passes. The full text of both codes is free to read on the ICC's site (2024 IRC, Chapter 3) and 2024 IBC, Chapter 10.
Comfortable stairs: rules of thumb
A stair can meet the code and still feel steep or choppy. Two old rules of thumb relate the riser to the tread so the step matches a normal stride. Neither is a code requirement. Both are quoted in Guidelines for Stair Safety, a 1979 report the National Bureau of Standards (now NIST) prepared for the Consumer Product Safety Commission:
- 2 risers + 1 tread. The report quotes an ergonomics text: "a good formula for stair dimensions is the following: 2r + t = 63 cm (24.8 in.)". The default stair gives 2 × 7 1/2" + 10" = 25", close to that figure.
- Riser + tread. It also quotes an older rule that "the sum of the height of a riser and the length of a run should not be less than 17, or more than 18 in." The default stair gives 17 1/2".
- The report's own guideline flags riser and tread dimensions "outside the limits of 4 to 7 in. and 11 to 14 in. respectively", which is closer to the IBC's limits than to the IRC's.
The Riser options tab shows, for each riser count, the tread depth that would make 2R + T come out at 24.8 inches, so you can trade floor space for an easier climb.
Deck and porch stairs
The IRC's stair rules apply to stairs that serve a deck or porch, so the same riser, tread, nosing, width and handrail limits apply outdoors. Measure the total rise from the deck surface to the ground or pad where the bottom step will land, and level that spot first, because a sloping yard changes the rise. A deck 2' 6" above a level pad, with treads of 10 1/4" (two deck boards with a gap), takes 4 risers of 7 1/2" and 3 treads, a run of 2' 6 3/4". With four risers, the IRC requires a handrail on at least one side.
Outdoors a few more rules come into play. Guards are required where an open side is more than 30 inches above the ground (Section R321.1.1), exterior stairs must be "positively anchored to the primary structure to resist both vertical and lateral forces or shall be designed to be self-supporting" (Section R318.5), and a landing is required at the bottom. Footings, posts, stringer size and fastening depend on your soil, loads and local rules: check them with your building department before you build. The Deck Calculator covers the deck itself.
Metric stairs
Switch the units to Metric and enter millimeters, or type a unit (cm, m) after any number. Lengths show in whole millimeters, and code limits show the code's own metric figures, such as 196 mm for the IRC's maximum riser (Section R318.7.5.1). The default stair in metric is a rise of 2,667 mm: 14 risers of 191 mm, treads of 254 mm, a total run of 3,302 mm and a stringer diagonal of 4,245 mm. The checks always compare against the codes' inch values, so a result never fails because of rounding to whole millimeters. Outside the United States, use your own national or local building rules; the IRC and IBC limits here may not apply.
How we calculate
Every figure on this page and in the tool comes from the same code, and the examples above are checked against it automatically. These are the rules it follows:
- Units. Everything is kept in inches. One inch is exactly 25.4 millimeters, as listed by NIST; metric input is converted on entry.
- Risers. Automatic: the total rise divided by the maximum riser, rounded up to a whole number. Riser height = total rise ÷ risers, so all risers are equal.
- Run and angle. Treads = risers − 1; total run = treads × tread depth; with a straight landing, the landing depth replaces one tread. Angle = arctan(riser ÷ tread).
- Stringer. Diagonal = √(rise² + run²). On the board: tooth depth = riser × tread ÷ √(riser² + tread²); throat = board width − tooth depth; first riser = riser − tread thickness; layout length = (risers − 1) × √(riser² + tread²) − tread thickness × riser ÷ √(riser² + tread²). Stock boards run from 8 to 24 feet in 2 foot steps (1.8 to 6.0 m in metric).
- Headroom. Measured straight up from the nosing line, at the edge of the floor above (the opening length back from the top riser), to the ceiling under that floor.
- Full precision, rounded for display. Results are kept unrounded and shown to the nearest 1/16 inch by default (or 1/8, 1/32 or decimal), whole millimeters in metric, and angles to two decimals.
Your measurements stay on your device
Every calculation on this page runs as JavaScript in your own browser tab. There is no server doing the math.
- Nothing is uploaded. The tool has no code that sends data anywhere, and the page's Content-Security-Policy only allows connections back to this site. Open your browser's developer tools, choose the Network tab and change a few numbers: no request appears.
- It keeps working offline. Once the page has loaded, you can disconnect and keep calculating.
- No account, no cookies. The tool remembers your last measurements, units and tab in your browser's local storage, on your device only.
Frequently asked questions
How do I calculate how many stairs I need?
Measure the total rise from finished floor to finished floor in inches, divide it by the maximum riser height and round up. Under the IRC the maximum is 7¾ inches, so a rise of 105 inches needs 14 risers of 7 1/2", and there is one tread fewer than risers: 13 treads.
How many steps do I need for a 9 foot rise?
A 9 foot rise is 108 inches. At the IRC maximum of 7¾ inches per riser that rounds up to 14 risers of 7 11/16" and 13 treads. With 10 inch treads the stair runs 10' 10". Measure your own rise, though: floor framing and floor coverings usually make it more than the ceiling height.
What is the maximum riser height and minimum tread depth?
In homes built to the 2024 IRC, risers may be at most 7¾ inches (196 mm) and treads at least 10 inches (254 mm), with no more than 3/8 inch of variation within a flight. Under the 2024 IBC the limits are 4 to 7 inches for risers and 11 inches minimum for treads. Local codes and amendments govern; check with your building department.
How do I calculate stair stringer length?
Square the total rise and the total run, add them and take the square root. For a rise of 105 inches and a run of 130 inches the diagonal is 13' 11 1/8". The notched stringer itself, from the bottom of the first riser to the top plumb cut, is 13' 5 7/8" with 1 inch treads, so a 14 foot board fits.
Why is the first riser on a stringer cut shorter?
Because the treads sit on top of the stringer. Every tread adds its thickness to the step below it, but nothing is added under the bottom of the stringer, so the stringer is dropped by one tread thickness. With 7 1/2" risers and 1 inch treads, the first riser on the stringer is 6 1/2".
What angle should stairs be?
The code limits the riser and tread rather than the angle. The steepest stair the IRC allows climbs at 37.78°, and one built to the IBC's limits at 32.47°. A stair-safety report from the National Bureau of Standards quotes the lowest energy use at a slope between 25° and 30°.
How much headroom do stairs need?
The IRC requires at least 6 feet 8 inches (2032 mm), measured straight up from the sloped line along the tread nosings, or from the floor of a landing. The IBC requires 80 inches. The calculator checks it under the edge of the floor above and tells you how long the stairwell opening must be.
How wide do stairs have to be?
Under the IRC, at least 36 inches (914 mm) of clear width above the handrail, and at least 31½ inches at and below a handrail on one side or 27 inches with handrails on both sides. The IBC requires 44 inches, or 36 inches where the occupant load is under 50.
When does a stair need a landing?
Every flight needs a floor or landing at its top and bottom, and under the IRC a single flight may not rise more than 12 feet 7 inches between floors or landings (12 feet under the IBC). A landing on a straight IRC stair must be at least 36 inches deep and as wide as the stair.
What is the 2R + T stair rule?
It is a comfort rule of thumb, not a code requirement: twice the riser plus the tread should come to about 25 inches. A 1979 National Bureau of Standards report quotes it as 2r + t = 63 cm (24.8 in.). Risers of 7 1/2" with 10 inch treads give 25".
Do deck stairs have to meet the stair code?
Yes. The IRC's stair section applies to stairways that serve a building, porch or deck, so deck steps follow the same riser, tread, nosing and handrail rules, and guards are required where an open side is more than 30 inches above the ground. Exterior stairs must also be anchored to the structure or be self-supporting. Ask your building department what it requires for footings and stringers.
Is this stair calculator free?
Yes. There is no sign-up, no account and no limit on use, including for builders and carpenters. Everything runs on your device, so your measurements are never sent anywhere.
Sources
- International Code Council, 2024 International Residential Code, Chapter 3: Building Planning (Sections R318.5, R318.7 stairways, R320 handrails, R321 guards).
- International Code Council, 2024 International Building Code, Chapter 10: Means of Egress (Sections 1011 stairways, 1014 handrails, 1015 guards).
- Archea J., Collins B. L., Stahl F. I., Guidelines for Stair Safety, NBS Building Science Series 120, National Bureau of Standards, 1979 (Guideline 2.1.1, riser and tread dimensions).
- NIST Special Publication 811, Guide for the Use of the International System of Units, Appendix B.8 (inch to millimeter).
This is an educational tool, not engineering, building-code or construction advice. Local codes and amendments govern: check your design with your building department, get the permits it requires, and have stringer sizes, spans and connections confirmed by your building department or an engineer before you build.