Introduction
Every number a Deck Stair Calculator produces comes from a short chain of formulas: riser count rounding, exact riser height, tread count, total run, stringer length, and the comfort checks that keep stairs feeling natural. This guide derives each formula from first principles, shows why each step exists, and works the numbers in both imperial and metric units so you can verify the math by hand.
You don’t need advanced math — just division, rounding, and one square root. The key insight is that stair layout is a rounding problem: real stairs can’t have 5.14 steps, so you round to a whole number and let every downstream formula absorb the difference. For a high-level overview first, see our complete guide to deck stair estimating.
Formula 1: Number of Risers (The Rounding Step)
Risers = round(total rise ÷ target riser height). The target riser is your comfort preference — most builders aim for 7 to 7-1/2 inches (178–190 mm). Because steps must be whole, you round to the nearest integer.
Why rounding is correct: suppose a 36-inch (914 mm) rise with a 7-inch (178 mm) target gives 5.14 risers. Rounding down to 5 makes each riser slightly taller (7.2 in / 182.9 mm); rounding up to 6 makes each shorter (6.0 in / 152.4 mm). Both are legal (under 7.75 in / 196.9 mm), but 5 risers needs less run and lumber, and 7.2 inches is closer to the comfortable target. The general rule: round to the nearest whole number, then let the next formula compute the exact height.
Edge case: if the division lands exactly on .5 — say 45.5 inches ÷ 7 = 6.5 — round to whichever whole number keeps the exact riser closer to your comfort target.
Formula 2: Exact Riser Height
Exact riser = total rise ÷ number of risers. This is the formula that absorbs the rounding. Using 5 risers for the 36-inch rise: 36 ÷ 5 = 7.2 inches (182.9 mm) per riser, exact to the fraction.
The critical requirement: every riser must be this exact height, within about 3/8 inch (9.5 mm) of its neighbors per code. Uneven risers — especially a top or bottom step that differs because of a measurement error — are the single most common stair defect and a genuine trip hazard. This is why you measure total rise from finished surfaces, as our estimating guide explains, and why the common mistakes guide leads with the top/bottom step error.
Formula 3: Number of Treads and Total Run
Treads = risers − 1, because the deck surface serves as the top tread. Total run = treads × tread depth. With 5 risers and 11-inch (279 mm) treads: 4 × 11 in = 44 inches (1,118 mm).
Tread depth is a design choice bounded by code: minimum 10 inches (254 mm), with 10–11 inches (254–279 mm) typical for decks. Deeper treads add run — each extra inch of tread depth adds one inch per tread to the total run — so tread depth is also a footprint decision, not just a comfort one.
Formula 4: Stringer Length (Pythagoras)
Stringer length = √(rise² + run²). The stringer is the hypotenuse of a right triangle whose legs are the total rise and the total run. For our example: √(36² + 44²) = √(1,296 + 1,936) = √3,232 ≈ 56.9 inches (1,445 mm).
Two subtleties. First, this is the length along the stringer’s top edge between the cut lines; the board you buy must be longer to allow for the plumb cut at the top and the level cut at the bottom — typically 12–24 inches (300–600 mm) of extra length. Second, in metric: √(914² + 1,118²) = √(835,396 + 1,249,924) = √2,085,320 ≈ 1,444 mm, which converts to 56.9 inches — agreeing with the imperial result. Always buy the next standard lumber length up: here, 10-foot (3 m) 2x12s.
Formula 5: Headroom
Headroom = vertical clearance above the stair nosing line. Code requires at least 6 ft 8 in (2,032 mm) of headroom measured vertically from the sloped nosing line. For open deck stairs this is rarely an issue, but it matters when stairs pass under an upper deck or a beam: measure from the nosing line (the imaginary slope connecting tread nosings) straight up to the obstruction, and check the lowest point. If clearance falls short, move the stair or raise the obstruction. Our code compliance guide covers headroom and the other IRC requirements.
Formula 6: The Comfort Checks
Two traditional rules validate the riser/tread pairing:
- R + T = 17–18 in (432–457 mm): the sum of one riser and one tread should match a natural stride. Our example: 7.2 + 11 = 18.2 in (462 mm) — just inside the comfortable range.
- 2R + T = 24–25 in (610–635 mm): the stricter French-derived rule. Our example: 2 × 7.2 + 11 = 25.4 in (645 mm) — acceptable.
Target 7 to 7-1/2 inch risers (178–190 mm) with 10–11 inch treads (254–279 mm). Keep riser + tread in the 17–18 inch (432–457 mm) comfort band, stay under the 7.75-inch (196.9 mm) code maximum riser, and never go below the 10-inch (254 mm) minimum tread. When a legal result still feels steep, add a riser and re-check.
Fully Worked Numbers: Both Unit Systems
A second example with a taller deck — 48 inches (1,219 mm) of rise — computed independently in each system:
| Step | Imperial | Metric |
|---|---|---|
| Total rise | 48 in | 1,219 mm |
| Target riser | 7 in | 180 mm |
| Risers | 7 (48 ÷ 7 = 6.86 → 7) | 7 (1,219 ÷ 180 = 6.77 → 7) |
| Exact riser | 6.857 in | 174.1 mm |
| Tread depth | 11 in | 280 mm |
| Treads | 6 | 6 |
| Total run | 66 in | 1,680 mm |
| Stringer length | 81.6 in | 2,076 mm |
| R + T comfort | 17.86 in | 454 mm |
| 2R + T comfort | 24.71 in | 628 mm |
Cross-checks: 6.857 in × 25.4 = 174.2 mm ✓. Small cross-system differences reflect independent rounding (11 in → 280 mm tread). Both comfort checks land inside their bands, and the 6.86-inch exact riser is comfortably under the 7.75-inch (196.9 mm) maximum.
Why the Order of Operations Matters
The formulas form a chain: rise → risers → exact riser → treads → run → stringer length → comfort check. Work them in order and verify each step — choosing a tread depth before knowing the tread count, for example, breaks the chain. The pro tips guide shows how these numbers transfer onto actual 2×12 stringers with a framing square.
Related Guides
- Complete Guide to Deck Stair Estimating — the flagship overview with a first worked example.
- Deck Stair Estimating Guide — measuring total rise and building the takeoff sequence.
- Deck Stair Code Compliance — the IRC limits these formulas must satisfy.
- Deck Stair Case Study — the formulas applied to a full hypothetical project.
- Deck Stair FAQ — quick answers to the most common formula questions.
Frequently Asked Questions
Why do I round the riser count instead of using the exact division?
Because stairs need whole steps — 5.14 risers can’t be built. Rounding and recomputing the exact riser keeps every step identical, which is both a code requirement and a safety essential.
Should I round riser count up or down?
Round to the nearest whole number. Rounding down gives taller risers (fewer steps, less lumber); rounding up gives shorter risers (easier to climb, more run). Either is fine as long as the exact riser stays at or under 7.75 inches (196.9 mm).
Why is tread count always one less than riser count?
The deck surface itself is the top tread — you step from the last tread up onto the deck. Counting an extra tread would extend the run one full step too far.
Does stringer length include the plumb and level cuts?
The Pythagorean result is the length between cut lines along the stringer’s edge. Buy lumber 12–24 inches (300–600 mm) longer than the computed length to accommodate the top plumb cut and bottom level cut.
What is the 17–18 inch rule?
Riser height plus tread depth should total 17–18 inches (432–457 mm) to match a natural stride. It’s an ergonomics guideline, not code — but stairs inside the band feel noticeably better than stairs outside it.
Get Your Number
These six formulas are everything a stair calculator does: round the risers, compute the exact height, count the treads, multiply out the run, take the hypotenuse for the stringer, and check comfort and headroom. Plug your own total rise into the Deck Stair Calculator and verify the results against the formulas above — when the hand math and the calculator agree, you can cut with confidence.
Disclaimer: All formulas and figures in this guide are planning estimates based on standard construction practice and the International Residential Code. Actual requirements vary by location and project. Verify measurements with your supplier and consult a licensed professional or your local building authority for structural or code-related decisions.
