Stairs Calculator

How do you build a stair to code? The 2021 IRC R311.7 sets the basics every flight in America has to meet: maximum riser 7-3/4 inches, minimum tread 10 inches with nosing or 11 inches without, variation no more than 3/8 inch between any two within a flight, minimum width 36 inches, minimum headroom 80 inches, and maximum 151-inch vertical rise between landings. Spiral stairs follow R311.7.10.1 (26-inch min width, 7-1/2 inch tread at the walkline, 9-1/2 inch max riser); winder stairs follow R311.7.5.2.1 (10-inch tread at the 12-inch walkline). The 2024 IRC moves the same rules to R318.7. This calculator enforces all of it as a traffic-light pass/warn/fail check before you cut a single stringer.

Six configurations cover the residential universe: straight (single flight), L-shape (90 degree quarter-turn with landing), U-shape (180 degree switchback), winder (3+ pie-shaped treads replacing the landing), spiral (helical around a center pole), and curved (every tread a winder along an arc). All six share the same three-equation core: number of risers = round(total rise / desired riser); tread count = risers - 1; stringer length = sqrt(rise squared + run squared). Configuration-specific geometry layers on top — the math stays consistent.

Built on 2021 IRC R311.7 (and 2024 IRC R318.7), AWC DCA 6 stringer span limits (cut/notched 6 ft for SPF, 7 ft for Southern Pine; solid/housed 13-ft-3 SPF, 16-ft-6 Southern Pine), Pennsylvania UCC 34 Pa. Code §403.21 (8-1/4 inch riser, 9 inch tread amendment), Rhode Island residential code, IBC §1011 commercial mode, ADA §504/§505 accessible egress mode, and Blondel-formula comfort checks. Free, no signup.

View material estimation guides →

Stairs Calculator

Code-compliant residential stair geometry, materials & stringer engineering — pulled from 2021 IRC R311.7 (riser ≤ 7-3/4", tread ≥ 10" with nosing, max rise 151" per flight) and AWC DCA 6 stringer-span limits. Six configurations: straight, L, U, winder, spiral, curved.

Stair geometry

Total rise is finished floor to finished floor — IRC excludes carpet and runners from tolerances

7" rise / 11" run is the universally-cited gold standard (2R + T = 25, R + T = 18). Calculator picks a riser count where the actual riser ≤ jurisdiction max.

Pricing stringer/tread lumber by the board foot? Calculate it

Not sure how total rise becomes equal steps? See the rise & run diagram

Code & jurisdiction

Drives the riser/tread/width/rise limits — IRC default for most US

What riser, tread & nosing are legal and comfortable? See the limits diagram

Materials

Tread, riser, stringer species, and stringer construction style

Per AWC DCA 6 (2018 reprint): cut/notched stringers max 6'-0" unsupported run (7'-0" Southern Pine); solid (housed) stringers max 13'-3" (16'-6" SYP). Cut stringers must keep ≥ 5" throat.

How is a cut stringer laid out, and what is the throat? See the stringer diagram

Guard & handrail

IRC R312 guard at > 30" above grade; R311.7.8 handrail at ≥ 4 risers

How a set of stairs goes together

Stairs hinge on a few ideas that trip up first-time builders: how total rise decides the number of equal steps, what riser and tread are both code-legal and comfortable to climb, and how a notched stringer is laid out so it won't shear. These engineering-style diagrams walk through each one — use the “see the diagram” links beside the inputs above to jump to the figure you need.

The rise-run anatomy is why total floor-to-floor rise sets the whole stair. The riser count is the rise divided by a maximum riser height rounded up, treads are one fewer, and run is treads times depth — and every riser must come out equal. That is why the calculator starts from total rise, not a guessed step count.

Total rise (floor to floor) sets everything: risers = ⌈rise ÷ 7¾″⌉, treads = risers − 1, run = treads × tread depth. A 9-ft floor → 15 risers @ 7.2″, 14 treads, 154″ run — and every riser must be equal.Source: 2021 IRC R311.7 (stair geometry)See the Stair anatomy →(opens in a new tab)

The code-and-comfort diagram is why the calculator holds riser and tread within a narrow window. Code caps the riser and floors the tread, and the comfort rules tie rise and run together, so a step that meets one can fail the other. Risers also have to match within a small tolerance, which is why the calculator distributes them evenly.

Code sets the limits — riser ≤ 7¾″, tread ≥ 10″ (11″ with no nosing), nosing ¾–1¼″ — and Blondel’s rule sets comfort: 2R+T = 24–25″ and R+T = 17–18″. A 7″/11″ step hits both. Risers must also vary by ≤ 3⁄8″.Source: 2021 IRC R311.7; Blondel stride formula (1675)See the What makes a stair step legal and comfortable diagram →(opens in a new tab)

The stringer-layout diagram is why the estimate is more than boards and treads. The stringer is laid out with a framing square, keeps a minimum throat so it cannot shear at a notch, and its bottom riser is dropped by one tread thickness so all risers stay equal. That bottom-riser drop is the detail that keeps the finished steps uniform.

Lay out a cut stringer with a framing square (rise on one leg, run on the other), keep the throat ≥ 5″ so it can’t shear at the notch corner, plumb-cut the top to the header, and drop the bottom riser by one tread thickness so all risers stay equal.Source: AWC DCA 6 (cut-stringer span + 5″ throat); 2021 IRC R311.7See the How a cut stair stringer is laid out diagram →(opens in a new tab)

The guard-and-handrail diagram is why a finished stair is more than its steps. A graspable handrail runs 34–38 inches above the nosings, a guard at least 36 inches protects the open side and any landing, and no gap in the railing may let a 4-inch ball pass (4⅜ inches on the open stair, 6 inches in the triangle at the tread, riser, and bottom rail). These are the details an inspector measures after the stringers pass.

Handrail 34–38″ above the nosings; guard ≥36″ at landings and open sides. Infill blocks a 4″ ball — 4⅜″ on the open stair itself, 6″ in the tread-riser-rail triangle. — IRC R311.7.8 & R312Source: IRC R311.7.8 (handrail height/grip), R312.1 (guard height & sphere rules)See the Stair handrail and guard rules diagram →(opens in a new tab)

Share this calculator with your customers

Run a contractor site, supply store, or blog? Drop this free stairs calculator straight onto your own page so your visitors can estimate materials without leaving. No signup, works on any website — just copy and paste.

📚

Want to Learn More?

Residential stair guide — IRC R311.7 / 2024 R318.7 limits, three master equations, AWC DCA 6 stringer spans, six layouts, and 10 inspection fails.

Read the Stairs Building Guide

Plan disposal before you start

Smaller jobs still produce more debris than a few trash bags can hold. Check what's allowed in a dumpster and which disposal option fits the scope.

See disposal options →

Related Calculators

Explore Framing & Structure: calculators, diagrams & guidesEvery calculator, cross-section diagram, and guide for this trade in one place.

How to Use This Calculator

  1. Enter total rise in inches — measured finished floor to finished floor (IRC explicitly excludes carpet and runners from the dimensional tolerance).
  2. Pick a configuration: straight (cheapest, simplest), L-shape (90° quarter-turn with landing), U-shape (180° switchback), winder (pie treads on a 90° turn — saves length), spiral (helical, R311.7.10.1 separate rule set), or curved (continuous arc — custom glulam stringers).
  3. Set stair width in inches (default 36" — IRC residential minimum). Spiral mode unlocks an outer-diameter input (60" minimum for code-compliant primary egress).
  4. Enter desired riser and tread targets — the calculator picks the riser count where the actual riser ≤ jurisdiction max and adjusts the tread depth accordingly. 7" rise / 11" run is the universally-cited gold standard.
  5. Pick the code package: 2021 IRC (default — most US), 2024 IRC R318.7 (renumbered), Pennsylvania UCC §403.21 (8-1/4" / 9" amendment), Rhode Island, Rapid City SD (8" max), IBC §1011 commercial, or ADA §504 accessible.
  6. Pick tread material (red oak, white oak, pine, poplar, PT 2x12 for exterior, or composite stair tread), riser material (primed pine, MDF, oak, or open risers for utility), and stringer style (cut/notched vs solid/housed) plus species (SPF/DF-L, Southern Pine, or LVL).
  7. Toggle handrail (required where ≥4 risers) and guard (required on open side > 30" above grade). Pick baluster type — 1-1/2" square, 3/4" round, or 1/2" iron — and the calculator computes count from the 4" sphere rule.
  8. For winder stairs, set the number of pie treads (2–5, typically 3). For curved stairs, set the inside radius and sweep angle.
  9. Click Calculate: see riser count and height, tread count and depth, total run with footprint, stair angle and Blondel comfort check, stringer count by flight with span limits, handrail and guard linear feet, balusters, newels, and a code-compliance traffic-light flag panel.

How the Three Master Equations Drive Every Configuration

Every stair shape on the calculator reduces to the same three formulas. Number of risers: round up the total rise divided by the maximum allowed riser, then optionally refine to your desired riser if the result is still code-compliant. Riser height: total rise divided by riser count — this is your exact step-up dimension. Stringer length: the Pythagorean hypotenuse of total rise and total run. Layout pitch d = sqrt(R squared + T squared) is the diagonal increment along the stringer between successive step layouts. Configuration-specific geometry only modifies the run side: an L-shape splits the run between two flights with a landing in between; a winder replaces a landing with 3-5 pie treads; a spiral unwinds the run as 12 treads per 360-degree turn at the walkline; a curved stair stretches the run along a single concentric arc. The riser side stays the same in every case, which is why the riser-uniformity rule (3/8-inch tolerance per flight) applies identically across all six configurations.

Frequently Asked Questions

How many risers do I need for my staircase?

Riser count = round-up of total rise (in inches) divided by your maximum riser height. The 2021 IRC R311.7.5.1 caps the maximum riser at 7-3/4 inches, so a typical 9-foot floor-to-floor (108 inches) needs at least ⌈108 / 7.75⌉ = 14 risers at 7.71 inches each. With a 7-inch comfort target, round(108/7) = 15 risers at 7.20 inches — both are code-compliant; 15 risers gives a more comfortable stair (Blondel 25.20). Pennsylvania UCC §403.21 and Rhode Island allow up to 8-1/4 inches, IBC commercial and ADA cap at 7 inches, and spiral stairs allow up to 9-1/2 inches per R311.7.10.1. The rise-run anatomy diagram shows how total rise sets the step count.

What's the maximum stair stringer length without intermediate support?

Per AWC DCA 6 (the residential deck and stair prescriptive guide): notched (cut) 2x12 stringers are limited to 6'-0" unsupported run for SPF / Douglas Fir-Larch / Hem-Fir, or 7'-0" for Southern Pine. Solid (housed/closed) 2x12 stringers — where treads sit in dado grooves rather than on triangular notches — span much further: 13'-3" SPF / DFL / HF, or 16'-6" Southern Pine. Cut stringers must keep ≥ 5" of throat after notching. Beyond these limits, add an intermediate post or landing, or use LVL / engineered design.

What's the difference between IRC and Pennsylvania stair rules?

Pennsylvania's UCC §403.21 (34 Pa. Code) explicitly amends the IRC for occupancies in Use Group R-3 (one and two-family dwellings) and within dwelling units in R-2 (multi-family): maximum riser 8-1/4 inches (vs IRC 7-3/4"), minimum tread 9 inches (vs IRC 10"), maximum vertical rise 147 inches between landings (vs IRC 151"). This is why Philadelphia, Pittsburgh, and the rest of the state can keep older townhouse stairs in spec on retrofit. Rhode Island has the same 8-1/4" / 9" allowance. The PA amendment does NOT apply to common-area stairs in R-2 multi-family — those follow IBC §1011 (7" / 11").

How do I calculate stair stringer length?

Stringer length is the Pythagorean hypotenuse of the rise/run right triangle: L = √(Total_rise² + Total_run²). For 108" total rise and 154" total run (15 risers, 14 treads at 11"), L = √(11664 + 23716) = √35380 = 188" = 15'-8". Round up to the next even foot of stock — order 16-ft 2x12. The diagonal layout pitch d = √(R² + T²) is the increment along the stringer between successive step layouts; for 7.20" / 11", d = 13.16". The stringer layout diagram shows the framing-square steps and throat depth.

Why is 7" rise and 11" tread the gold standard?

François Blondel's 1675 stride formula (still the universally-cited comfort target) says 2R + T should be 24" to 25" for a comfortable stair, and R + T should be 17" to 18". A 7" rise with an 11" tread hits both: 2 × 7 + 11 = 25, 7 + 11 = 18. The resulting stair angle is 32.5° — squarely in the comfortable 30°–37° range. 7-3/4" rise with 10" tread (the IRC-max steep edge) gives 2R + T = 25.5 and a 37.7° angle — barely in range and noticeably steep. The calculator surfaces all three values (Blondel, stride, angle) and warns when any is outside its comfort band. The code and comfort diagram shows the riser and tread limits and the Blondel rule.

Do I need a handrail on my stairs?

Per IRC R311.7.8, handrails are required on at least one side of any stairway with 4 or more risers. Height must be 34"–38" measured vertically above the leading edge of the treads. Type I grip is 1-1/4"–2" outside diameter (or perimeter 4"–6-1/4" with cross-section ≤ 2-1/4"); Type II grip is perimeter > 6-1/4" with a finger recess. Wall clearance is at least 1-1/2". Handrails must run continuously the full length of the flight with ends returned to a wall, newel post, or safety terminal. ADA §505 (commercial) requires handrails on BOTH sides with 12" extensions at the top and one tread + 12" at the bottom. The guard and handrail diagram shows the 34–38″ handrail height above the nosings.

What's the IRC sphere rule for stair guards?

IRC R312.1.3 — different sphere sizes apply to different parts of the stair guard: 4" sphere general (landings, floors), 4-3/8" sphere on the stair side of stair guard openings (slightly relaxed because of the angled geometry), and 6" sphere at the triangular opening formed by tread, riser, and bottom rail intersection. Top-rail load is 200 lb concentrated at any point — the 2021 IRC relaxed the 'any direction' requirement to outward and downward only. Infill load is 50 lb on 1 sq ft, and need NOT act simultaneously with the top-rail load. The guard and handrail diagram shows how the 4-inch ball gap rule works.

How wide does a code-compliant spiral stair need to be?

IRC R311.7.10.1 sets spiral-specific rules: minimum 26" clear width below the handrail, walkline radius ≤ 24-1/2" from the center pole, tread depth ≥ 7-1/2" measured at 12" from the narrow edge, all treads identical, maximum riser 9-1/2", minimum headroom 78" (6'-6"). The smallest outer diameter that satisfies the 26" clear-width + handrail combo is roughly 5'-0" (60"); 5'-6" (66") is more comfortable. Many off-the-shelf 'decorative' spirals at 48"–55" outer diameter do NOT meet code for primary egress — read the manufacturer datasheet for explicit R311.7.10.1 compliance before buying. Salter, Iron Shop, and Goddard sell code-compliant kits starting around $3,000.