Stair Calculator
Calculate the number of steps, rise, run, and stringer length for any staircase — checked against IRC code minimums.
Enter the total floor-to-floor rise and this calculator works out the optimal number of steps, exact rise and run, stair angle, and stringer length — then checks every result against IRC code minimums automatically. A visual diagram updates as you calculate, and a 10% cutting margin is included by default for lumber ordering.
| Requirement | Imperial | Metric |
|---|---|---|
| Riser height | Min 4 in, max 7¾ in | Min 102 mm, max 197 mm |
| Tread depth (run) | Min 10 in, no max | Min 254 mm, no max |
| Stair width | Min 36 in (residential) | Min 914 mm |
| Headroom | Min 6 ft 8 in (80 in) | Min 2,032 mm |
| Handrail height | 34–38 in above nosing | 864–965 mm above nosing |
| Comfort formula (2R+T) | 24–25 in ideal | 610–635 mm ideal |
Based on the International Residential Code (IRC) Section R311.7. Local amendments vary — always confirm with your building department before finalizing a design.
How stair rise and run are calculated
Every staircase starts from one fixed number: the total rise — the exact vertical distance from one finished floor to the next. Everything else (step count, rise per step, tread depth, stringer length) is derived from that single measurement plus a target comfort range. Get the total rise measurement wrong and every downstream number is wrong too, so it's worth measuring twice with a level and a tape measure rather than estimating from a floor plan.
The calculation starts by dividing the total rise by an ideal riser height of 7 inches (178 mm) — a widely used starting point that tends to land close to the comfort formula once combined with a standard tread depth. That result is rounded to a whole number of steps, since you can’t build a fractional step. The exact rise per step is then the total rise divided by that step count, which is almost never exactly 7 inches — it’s whatever value divides the total rise evenly across a whole number of steps.
Worked example — 120 in (10 ft) total rise:
- Ideal step count: round(120 ÷ 7) = round(17.1) = 17 steps
- Actual rise per step: 120 ÷ 17 = 7.06 in per step
- With an 11 in tread depth: total horizontal run = 11 × 17 = 187 in (15.6 ft)
- Stringer length: √(120² + 187²) = √(14,400 + 34,969) = √49,369 ≈ 222 in (18.5 ft)
In metric, a 3.05 m (3,050 mm) total rise at a 178 mm ideal riser gives round(3050 ÷ 178) = 17 steps — the same result, since 7 inches and 178 mm are the same physical measurement. Actual rise per step: 3050 ÷ 17 = 179.4 mm. With a 279 mm (11 in) tread: total run = 279 × 17 = 4,743 mm (4.74 m), and stringer length = √(3050² + 4743²) ≈ 5,639 mm (5.64 m).
IRC code requirements for stairs
The International Residential Code (IRC), used as the base code for residential construction in most US jurisdictions, sets firm limits on stair dimensions in Section R311.7. These aren’t just best practices — they’re legal minimums that inspectors check before signing off on a project.
| Requirement | Imperial | Metric |
|---|---|---|
| Riser height (rise) | 4 in min, 7¾ in max | 102 mm min, 197 mm max |
| Riser variation between steps | ⅜ in max | 9.5 mm max |
| Tread depth (run) | 10 in min, no max | 254 mm min, no max |
| Nosing projection | ¾–1¼ in beyond riser | 19–32 mm |
| Stair width | 36 in min (residential) | 914 mm min |
| Headroom | 6 ft 8 in (80 in) min | 2,032 mm min |
| Handrail height | 34–38 in above nosing | 864–965 mm above nosing |
The riser-variation rule is one of the most commonly violated — and most commonly inspected — requirements. Because the calculator divides the total rise evenly across a whole number of steps, every step comes out to the same exact height by construction, which automatically satisfies this rule as long as the stringers are cut accurately. Uneven step heights, even when each individual step is within the 4–7¾ inch range, are a common cause of trips and a frequent inspection failure.
Commercial stairs fall under the International Building Code (IBC) rather than the IRC and generally require a 44-inch minimum width along with different handrail and guard requirements — always confirm which code applies before designing a staircase for anything other than a single-family residence.
The stair comfort formula
Meeting code minimums doesn’t automatically produce a comfortable staircase — code sets the outer boundary of what’s legal, not what feels natural to walk on. The most widely used comfort guideline is the “2R+T” formula, which combines twice the riser height with the tread depth:
A 7-inch rise with an 11-inch run gives 2(7) + 11 = 25 — right at the ideal upper bound. A 7.5-inch rise with a 10-inch run gives 2(7.5) + 10 = 25 as well, showing that several different rise/run combinations can hit the same comfort value. Values between 23 and 26 inches are generally considered acceptable, even if not perfectly ideal; values further outside that range tend to feel either cramped (too steep) or awkwardly long-strided (too shallow) regardless of whether they meet the bare code minimum.
Steeper stairs (shorter run, taller rise) save horizontal floor space, which is often the deciding factor in additions and remodels where floor area is at a premium. Shallower, more gradual stairs are more comfortable for daily use, safer for children and elderly users, and generally preferred in new construction where space allows.
Calculating stringer length and count
The stringer is the diagonal structural member — typically a piece of 2×12 lumber, LVL, or LSL — that the treads and risers attach to. Its length is the hypotenuse of a right triangle formed by the total rise and total horizontal run:
This is a direct application of the Pythagorean theorem: the total rise is one leg of the triangle, the total horizontal run is the other leg, and the stringer itself is the hypotenuse connecting the bottom of the stairs to the top. Because a cut stringer loses material to the notches cut for each tread and riser, always buy the next standard lumber length above your calculated stringer length — never the exact calculated figure.
How many stringers? Two stringers (one on each side) are adequate for stairs up to about 36 inches wide. Wider stairs need a center stringer to prevent tread bounce and long-term sag — three stringers cover most residential stairs from 36 to 48 inches wide, and one additional stringer is added for roughly every 16 inches of width beyond that. Composite or hollow stair systems sometimes specify their own stringer spacing regardless of these general residential guidelines — always check the manufacturer’s span table for engineered products.
Stringer material. 2×12 dimensional lumber is the standard choice because it leaves enough remaining depth (after the triangular notches are cut for each step) to maintain adequate structural strength — building code typically requires at least 3.5 inches of remaining stringer depth below the deepest notch. 2×10 stringers are sometimes used for shorter runs but leave less margin after notching. LVL or LSL beams are stronger and straighter than dimensional lumber, resist warping over long spans, and are a common upgrade for longer or more heavily loaded staircases, at a higher material cost.
Treads and risers are typically separate material purchases from the stringers themselves. Closed-riser staircases need both a tread board and a riser board per step, while open-riser designs (common on some deck and basement stairs) skip the riser board entirely, which reduces material cost and labor but is restricted or prohibited in some jurisdictions for stairs serving a required exit path, since open risers can be a fall hazard for young children and a tripping concern generally. Always confirm whether your local code permits open risers for the specific location before choosing that design.
Waste allowance and lumber ordering
Cutting a stair stringer removes a significant amount of material as triangular waste at every step notch — often more waste, proportionally, than a simple straight cut. On top of that, stringer patterns need to be laid out precisely, and a single measuring error can ruin an entire board.
| Project complexity | Recommended cutting margin |
|---|---|
| Simple straight run, no landing | 5% |
| Standard residential staircase | 10% |
| Winders, landings, or complex layout | 15% |
10% is a reasonable default cutting margin for most residential straight-run stairs, and is what the calculator applies by default. This margin is added to the calculated stringer length before rounding up to the nearest available stock length (lumber is typically sold in 2-foot increments — 8, 10, 12, 14, 16, 18, and 20 foot boards), giving a practical buying length rather than an exact-to-the-inch figure that doesn’t correspond to anything a lumberyard actually stocks.
Complex layouts — stairs with a mid-run landing, winders (pie-shaped treads used to turn a corner), or non-standard angles — benefit from the higher 15% margin, both because layout mistakes are more likely and because the stringer pattern itself is harder to lay out accurately on the first attempt.
Real-world applications
A typical basement staircase, descending about 8–9 feet (96–108 inches) from the main floor, usually works out to 13–15 steps at a 7–7.5 inch rise with an 10–11 inch run — landing close to the ideal comfort formula. Stringer length for a run this size typically comes to 14–16 feet, meaning a 16 or 18 foot board purchase after the cutting margin is applied.
A full-height exterior staircase, for a raised deck or a walkout basement entry, often spans 9–10 feet of total rise. These stairs face additional considerations beyond the IRC’s interior stair provisions — exterior stringers need to be pressure-treated or naturally rot-resistant lumber, and deck stairs specifically fall under supplemental deck code provisions (in the US, commonly referencing the DCA 6 prescriptive deck construction guide alongside the IRC) covering ledger attachment, footing depth for the stair landing, and guard requirements at the top platform.
A short interior staircase, such as three or four steps between a sunken living room and an adjoining hallway, still needs to meet the same per-step rise and run limits as a full staircase — code doesn’t relax these requirements just because the total rise is small, though a 4-step (or fewer) staircase sometimes has different handrail requirements depending on local amendments.
Attic or loft access stairs are a notable exception worth flagging: many jurisdictions classify stairs serving only a non-habitable attic or storage loft under a separate, less restrictive code provision than stairs serving a habitable room, allowing steeper rise and narrower run than the standard IRC minimums covered in this article. This distinction depends entirely on how the space above is classified — a loft with a bedroom or home office generally must meet full standard stair requirements, while a true storage-only attic may not. Confirm the intended use and classification of the upper space with your local building department before assuming relaxed stair rules apply.
When to consult a professional or pull a permit
This calculator estimates dimensions and lumber quantities for planning purposes and checks them against standard IRC minimums — it is not a substitute for a stamped structural drawing, a building permit, or a final inspection. Involve a licensed professional or your local building department before proceeding in these situations:
- Any new or replacement staircase in most jurisdictions — a building permit is typically required for permanent staircases, and the finished stairs must pass inspection against your local code before occupancy
- Winders, curved, or spiral staircases — these have their own dimensional rules (winders are measured at a specific walk line, not at the narrow or wide edge) that a straight-run calculator like this one doesn’t cover
- Exterior or deck staircases — additional footing, ledger attachment, and guard requirements apply beyond the interior stair provisions covered here
- Commercial or multi-family occupancies — these generally fall under the IBC rather than the IRC, with different width, handrail, and guard requirements
- Any staircase serving as required egress from a bedroom, basement, or other space where a code-compliant exit path is mandatory
For a straightforward, single-flight interior residential staircase within standard IRC limits, the numbers above are a reliable starting point for material planning — just confirm your final layout against your local building department’s current code adoption and any local amendments before cutting lumber or pulling a permit.
Common mistakes to avoid
- Measuring total rise from subfloor instead of finished floor. Flooring, underlayment, and finish materials on both levels change the effective total rise by anywhere from half an inch to over an inch — measure between the two finished floor surfaces, not the framing.
- Ignoring the riser-variation limit. Even if every individual step falls within the 4–7¾ inch range, steps that vary from each other by more than ⅜ inch fail inspection and create a genuine trip hazard. Dividing the total rise evenly (as the calculator does) prevents this automatically.
- Skipping the cutting margin. Ordering the bare calculated stringer length with no allowance risks a shortfall the moment a cut goes slightly wrong, or the layout needs a small adjustment mid-build.
- Confusing nosing with tread depth. The tread depth (run) used in code minimums is measured as the horizontal distance covered by each step, which includes any nosing overhang beyond the riser below — using only the flat part of the tread board understates the effective run.
- Using 2×10 where 2×12 is needed. After cutting the triangular notches for treads and risers, a 2×10 stringer can leave less than the code-minimum remaining depth on steeper stairs — always verify remaining stringer depth after notching, not just the nominal lumber size.
- Assuming interior stair rules apply outdoors. Deck and exterior stairs have supplemental requirements (footing depth, ledger attachment, treated lumber) beyond the interior rise/run/width limits covered by this calculator.
- Forgetting headroom at the top and bottom of the run. A staircase can meet every rise, run, and width requirement and still fail inspection if there isn’t at least 80 inches of clear headroom measured vertically above the nosing line — a common conflict in remodels with existing low ceilings or ductwork.