Measuring your deck stair before you calculate
Outdoor measurements move around more than indoor ones — grade shifts with the seasons and decking thickness adds up. Get these four right first.
Find your total rise
Hold a straight board level from the top of the finished decking out over the edge, then measure straight down to the finished grade below. Use the actual ground level, not the sub-grade before topsoil or mulch goes down.
Note your available run
Measure the horizontal space you actually have before hitting a patio, walkway, fence line or property boundary. This tells the calculator whether your ideal stair will physically fit.
Check the yard slope at the base
Most yards aren't perfectly flat where a stair lands. Estimate the slope as a percentage — a level line held out from the bottom of your rise, with the drop measured a few feet out, gives you a rough grade percentage to enter.
Decide open or closed risers
Open risers (no riser board) are common on decks for drainage and a lighter look. Closed risers block wind-driven rain and debris. Pick one — it changes which code check applies to your stair below.
The four formulas behind every result
Nothing on this page is a black box. Here's exactly what runs when you change a number.
Step Count
Total rise divided by your target riser height, rounded to the nearest whole step — you can't build a fractional stair.
Actual Riser Height
The rounding above means your real riser is rarely the exact target. This is the number you cut every riser to, uniformly.
Tread Depth (2R+T rule)
A standard comfort formula: twice the riser plus the tread should land near 24–25 inches. Floored at the 10" IRC minimum.
Stair Angle & Stringer
Angle from the riser-to-tread ratio; stringer length from the Pythagorean triangle formed by total rise and total run.
Walking through a real 40" deck rise
Same four formulas, filled in step by step, for a deck that sits 40" above grade — the default this calculator loads with, chosen because it's just tall enough to trip more than one check at once.
Step count
40" total rise, targeting a 7.5" riser: 40 ÷ 7.5 = 5.33, which rounds to 5 steps. You can't cut a fractional step, so the calculator always rounds to the nearest whole number here.
Actual riser height
Re-divide the total rise by that whole step count: 40 ÷ 5 = 8.0" per riser. That's over the 7.75" IRC maximum — the riser chip fails. This is the single most common surprise on a deck stair: the total rise rarely divides evenly, and rounding down to 5 steps instead of up to 6 is what pushes it over.
Tread depth — and the cascade
Using the 2R+T rule on that 8.0" riser: 25 − (2 × 8.0) = 9", which is already below the 10" IRC minimum, so it floors at exactly 10". The oversized riser from step 2 directly caused the tread to hit the code floor — one failed check feeding the next.
Angle, and why it fails too
4 treads at 10" gives a total run of 40". The angle works out to atan(8.0 ÷ 10) ≈ 38.7° — steeper than the 30–37° comfort range, a direct knock-on from the floored tread. Stringer length is √(40² + 40²) ≈ 56.6".
The fix: switch to 6 steps instead of 5. At 40 ÷ 6 = 6.67" per riser, you're back under the 7.75" max, the 2R+T tread comes out to 25 − 13.33 = 11.67" (comfortably over minimum), and the angle drops to a much gentler ≈29.8°. One extra step turns three failing checks into three passing ones — this is exactly why the compliance strip below is worth reading past the headline numbers, not just glancing at.
Comfort formulas compared
Code sets the outer limits. These three rules of thumb decide whether a code-legal stair also feels good to climb — indoors or out.
| Rule | Formula | Target | What it optimizes for |
|---|---|---|---|
| 7-11 Rule | R = 7", T = 11" | R+T ≈ 18" | Simple carpenter's rule of thumb, slightly conservative on tread depth. |
| 2R + T Rule | 2R + T = 24–25" | ≈ 24.5" | The industry-standard comfort formula; used as this page's Auto default. |
| Blondel's Formula | 2R + T = 63–65 cm | ≈ 24–25.6" | The 19th-century architectural origin of the 2R+T rule, in metric. |
Want all three run against the same inputs side by side? Use the Stair Comfort Formula Calculator.
IRC residential stair & guard code, quick reference
This calculator checks your result against the limits below. The bottom three rows are the ones that trip up deck stairs specifically, since indoor stairs rarely reach a height where they apply.
| Element | Residential (IRC) | Notes |
|---|---|---|
| Max riser height | 7.75" | Same limit indoors and out. |
| Min tread depth | 10" | Same limit indoors and out. |
| Riser variance across a flight | 3/8" | Every riser in the run must stay within this of the others. |
| Max rise per flight before a landing | 147" (12'-3") | Rare on decks, but tall walk-out or sloped-lot stairs can hit it. |
| Min landing depth (direction of travel) | 36" | At the top and bottom of the flight. |
| Guardrail required when open side is | > 30" above grade | Measured at any point within 36" horizontally of the open edge. |
| Open-riser gap limit above 30" rise | 4" sphere | Below 30" above grade, open risers are generally unrestricted. |
Reference only — always confirm against your local jurisdiction's adopted code before building. Some municipalities set a lower guardrail trigger than 30", and coastal or high-wind jurisdictions often add fastening requirements this table doesn't cover.
Ground slope, guardrails & open risers
A deck stair can nail every riser and tread number and still fail inspection — or just work badly — on the three things this section covers, none of which an indoor rise-and-run calculator needs to think about.
Grade drop over the run
A rough estimate of how much the ground falls (or rises) across the stair's horizontal footprint. Use it to plan how deep to excavate, or how thick to pour, the landing pad at the base — not as a substitute for on-site story-pole measurements, since real yards are rarely a uniform slope.
When a guardrail is required
IRC R312.1.1 requires a guard on the open sides of a stair once the walking surface is more than 30" above grade at any point within 36" horizontally of the edge. This is exactly why a 40" deck stair needs a guard down its full open side, even though the bottom step is only inches off the ground — the trigger is based on the highest point within reach, not the average.
Open riser gap limit
Once any part of an open-riser stair rises more than 30" above grade, the gap between treads can't allow a 4"-diameter sphere to pass. A typical 7–8" riser opening fails this outright — the usual fix is closing in the risers on the lower portion of a tall flight, or switching to closed risers for the whole run.
Footings & ground-contact lumber
Stringer posts and landing footings generally need to reach below the local frost line, which varies by climate zone — a few inches in the Gulf Coast, 4+ feet in northern climates. Any framing member within roughly 6" of grade, or embedded in concrete, needs lumber rated for ground contact, not just above-grade treatment. [VERIFY: minimum clearance distinguishing above-grade treated lumber from ground-contact-rated lumber in your jurisdiction.] Check footing sizing with the Stair Footing Size Calculator.
These are planning-stage estimates, not a stamped structural design. A wide stair, a steep slope, or a tall flight may need an engineer's sign-off regardless of what this calculator shows.
Common mistakes when planning deck stairs
Most deck stair inspection failures trace back to one of these five, not to bad carpentry.
Measuring to the framing, not the decking surface
Total rise has to start from the top of the finished decking boards, not the joist. A 1"–1.5" decking thickness at the top, and whatever the landing pad adds at the bottom, both shift the number.
Ignoring the slope at the base
A stringer cut for a perfectly flat landing will sit unevenly — or leave the bottom riser oversized or undersized — on a sloped yard. Plan for a level, compacted landing pad before cutting stringers.
Choosing open risers on a tall stair without checking the gap rule
Above 30" of rise, an open-riser gap has to pass a 4" sphere. Most standard risers don't — this is the single most common code conflict specific to deck stairs.
Skipping the guardrail check on a "short" deck
40" feels low, but it's well past the 30" IRC trigger. Confirm your local threshold before assuming a deck under waist height is guard-free.
Using interior-grade lumber or the wrong treatment rating
Stringers and posts need lumber rated for outdoor exposure, and anything near or in the ground needs ground-contact-rated treatment — not just standard above-grade treated lumber.
When to use a deck stair calculator
Deck stair planning shows up any time a deck, porch or elevated platform needs a way down to grade.
New Deck Builds
Laying out stringers before cutting lumber for a brand-new deck.
Replacing Rotted Deck Stairs
Rebuilding an existing stringer set to current code, not the original's.
Walk-Out Basement Decks
Elevated decks off a walk-out level, often tall enough to trigger the guardrail check.
Pool Deck Access
Stairs from a raised deck down to a pool patio, where slope and landing space are tight.
Sloped-Yard Lots
Decks on grade that drops away quickly, where the ground-slope check matters most.
Permits & Inspection Prep
Confirming riser, tread, guard and open-riser numbers before a plan check.