Stair Calculator
Find how many risers and treads a straight stair needs from its total rise, with total run, pitch, 2R + T comfort and IRC or OSHA riser and tread checks.
Stair Calculator
Background.
Ask how many steps a stair needs and the answer hangs on one measurement: the vertical distance from the finished floor at the bottom to the finished floor at the top. Divide that rise into equal risers and everything else follows from it — how far the flight reaches into the room, how steep it feels underfoot, and whether an inspector signs it off.
The division has a catch, because risers come in whole numbers. Take a deck 108 inches above the patio. Thirteen risers would each be 8.31 inches tall, over the 7.75-inch maximum of the International Residential Code; fourteen bring each one down to 7.714 inches and pass. That one extra step also brings one more tread, so the flight grows by a full tread depth. Most stair layout errors are of this kind: a fractional riser count rounded the wrong way, or a rise measured to the subfloor when tile or decking will later add height at one end.
The calculator works the problem the way a framer does. It finds the fewest risers that keep every riser at or under the maximum you set, moves up to the riser count closest to your preferred height if that needs more, and then reports the actual riser, the number of treads, the total run in inches and feet, the pitch angle and the 2R + T comfort figure. Choose the residential code (the 2021 IRC) or the workplace option named after OSHA 29 CFR 1910.25, and plain-language lines say whether the riser and the tread pass that standard's limits, whether the pitch is within the OSHA range, and whether the rise fits one IRC flight.
Those lines are the entire code check. Headroom, stair width, landings, handrails, guards and nosing projection are all IRC requirements, and none of them is tested here; the 151-inch limit on a single flight is flagged under the residential setting, but it is only a flag, and the calculator still lays the rise out as one flight. The geometry assumes a straight flight of uniform steps between two level surfaces; winders, spiral stairs and flights broken by an intermediate landing need another tool, or a separate run for each flight.
What is stair calculator?
A straight stair is a row of identical right triangles. Each riser is the vertical leg, each tread the horizontal one, and together they build one large triangle with the total rise on one side and the total run on the other. The IRC fixes how each leg is measured. Riser height is taken vertically between the leading edges of adjacent treads (R311.7.5.1). Tread depth is taken horizontally between the foremost projections, the nosings, of adjacent treads (R311.7.5.2), so it is the distance your foot advances from one step to the next, not the depth of the board you buy. A tread board with a 1-inch nosing overhang on a 10½-inch run is 11½ inches deep.
There is one fewer tread than riser, because the upper floor is the last surface you step onto. Pitch is the angle of the line through the nosings, the same at every step when the steps are uniform. Uniformity is part of the definition rather than a refinement: the IRC allows no more than 3/8 inch between the tallest and shortest riser in a flight, and the same between the deepest and shallowest tread, because a foot that has learned a stair's rhythm over a few steps stops checking each one.
How to use this calculator.
- Measure Total rise from the finished surface at the bottom to the finished surface at the top, in inches. If flooring, tile, decking or a concrete topping is still to go on at either end, allow for its thickness now; hardwood laid on the upper floor later adds its full thickness to the top riser alone.
- Enter a Target riser height, the step you would like, and a Maximum allowed riser height. Use 7.75 for a house or deck stair under the IRC; the workplace check accepts any riser up to 9.5 inches, so the same figure works there.
- Enter Tread depth as the nosing-to-nosing run of one step, not the depth of the tread board. Ten inches is the IRC minimum, and every extra inch is added once per tread to the length of the flight.
- Choose the standard: Residential (2021 IRC), Workplace (OSHA 29 CFR 1910.25), or No code check when you only want the geometry, for instance for garden steps that are not part of a building, porch or deck and so fall outside the IRC stair rules.
- Read the riser count and actual riser height, then compare the total run with the floor space you have, leaving room for a landing at the bottom. If a check fails, its line names the number and the limit it broke, and a rise over 151 inches under the residential setting is flagged as too tall for one flight; if the run is too long, a shallower tread or a taller target riser shortens it.
The formula.
Write H for the total rise, Rmax for the maximum riser, Rt for the target riser and T for the tread depth. The fewest risers that keep every step within the maximum is ⌈H ÷ Rmax⌉: H divided by the maximum and rounded up to the next whole number. Rounding up is what guarantees the actual riser can never exceed Rmax. The calculator also finds the riser count nearest your target, H ÷ Rt rounded to the closest whole number, and uses whichever of the two counts is larger. A target can therefore add risers to make a gentler stair, but it can never take one away.
With the riser count N settled, the rest is direct arithmetic. The actual riser is H ÷ N. Treads number N − 1. Total run is (N − 1) × T, shown in inches and in feet (inches ÷ 12). The pitch is arctan((H ÷ N) ÷ T), converted from radians to degrees, and the comfort figure is 2 × (H ÷ N) + T. Because N is a whole number, the outputs move in jumps: a few more inches of rise, or a quarter inch off the maximum riser, can add a whole step and a whole tread depth of run.
The code lines compare those results with fixed limits. Under the residential setting the riser must be no more than 7.75 inches and the tread at least 10 inches, the limits in IRC R311.7.5.1 and R311.7.5.2. Under the workplace setting, which follows 29 CFR 1910.25(c) for standard stairs, the riser must be no more than 9.5 inches, the tread at least 9.5 inches, and the pitch between 30 and 50 degrees; there is no minimum riser. Pitch is checked only under the workplace setting. The residential setting adds a note when the total rise is over 151 inches, the IRC limit for one flight. At the residential limits, a 7.75-inch riser on a 10-inch tread, it is arctan(0.775) = 37.78 degrees, the steepest a stair can be and still pass both IRC lines; the regulation's 9.5-inch riser on a 9.5-inch tread comes to exactly 45 degrees.
A worked example.
Take the default deck stair: 108 inches of total rise, a 7.5-inch target riser, a 7.75-inch maximum and 10.5-inch treads, checked against the residential code. The limit comes first: 108 ÷ 7.75 = 13.9355, which rounds up to 14 risers. The target gives 108 ÷ 7.5 = 14.4, and the nearest whole number is also 14, so the two counts agree and the stair has 14 risers. Each riser is 108 ÷ 14 = 7.714 inches. With the deck surface as the top step there are 14 − 1 = 13 treads, and the run is 13 × 10.5 = 136.5 inches, or 136.5 ÷ 12 = 11.375 feet. The pitch is arctan(7.714 ÷ 10.5) = 36.30 degrees, and the comfort figure is 2 × 7.714 + 10.5 = 25.93 inches. Both lines pass: 7.714 inches is under the 7.75-inch maximum and 10.5 inches is over the 10-inch minimum. The riser passes by 0.036 inch, a little more than 1/32 inch and under a millimetre. The limit applies to every riser as built, so a stringer layout that drifts by a sixteenth of an inch on one cut can put that step over 7.75.
Frequently asked questions.
Why didn't my target riser height change the number of steps?
How does the OSHA setting differ from the residential setting?
Does the tread depth I enter include the nosing?
How long does the floor opening above a basement stair need to be?
What if my total rise is more than 151 inches?
How much floor space does the whole stair take up?
What does the comfort value 2R + T tell me?
Do commercial buildings use the same riser and tread limits?
What happens if the finished flooring goes down after the stair is built?
Does a short flight of steps need a handrail?
References& sources.
- [1]Occupational Safety and Health Administration (2024). "29 CFR 1910.25: Stairways." U.S. Department of Labor.
- [2]International Code Council (2021). "2021 International Residential Code, Section R311.7 Stairways." ICC.
- [3]National Institute of Standards and Technology (2026). "NIST Handbook 133, Appendix E: General Tables of Units of Measurement." U.S. Department of Commerce.
- [4]National Institute of Standards and Technology (2008). "Guide for the Use of the International System of Units (SI), NIST Special Publication 811." U.S. Department of Commerce.
- [5]Bureau International des Poids et Mesures (2019). "The International System of Units (SI Brochure), 9th edition." BIPM.
How this page was produced
- Published by
- Quanta Calculator
- Overseen by
- Daniel, Quanta Calculator Researcher
- Primary sources
- 5 cited below
- Method
- R = max( ⌈ H ⁄ Rmax ⌉ , round( H ⁄ Rt ) )
- Published
- Last verified
Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 1560 calculators remain free
- No billing is enabled