Staircase Calculator

Construction

Calculate staircase dimensions

Building a staircase is one of the few home projects where the math genuinely has to be right before you cut a single board — get the riser height wrong and you build a staircase that trips people up (literally) and fails inspection, since most building codes limit riser height to a narrow range and require every step in a run to be nearly identical. Yet the underlying calculation is straightforward geometry once you know the total vertical rise you need to climb.

Our stair calculator takes your total rise (the floor-to-floor height) and your target riser height, then works out the number of steps, the resulting tread depth needed for a comfortable and code-compliant run, and the diagonal stringer length you'll need to cut from a 2×12. This is the same core calculation carpenters use when laying out stringers for a deck staircase, a basement staircase, or an interior staircase connecting two floors.

Enter your numbers once, get a full set of measurements, and double-check the result against your local building code before cutting any lumber — code requirements vary slightly by jurisdiction.

Why Staircase Calculator Matters

Stair geometry directly affects safety, and building codes reflect decades of accident data on this exact issue. Most U.S. residential codes cap riser height around 7.75 inches and require a minimum tread depth around 10 inches, with a rule that no single step in a staircase can differ from the others by more than about 3/8 inch — a variance that small can cause a fall because the human body walks stairs on autopilot, expecting every step to match the last. A staircase built without checking this math is a common reason for failed building inspections, and worse, a real safety hazard once it's in daily use.

Getting the stringer length right also has a direct material cost. Stringers are typically cut from 2×12 lumber, and the diagonal length calculated by the Pythagorean theorem determines how long a board you need to buy — buying a board that's too short means an ugly splice or a wasted trip back to the lumberyard, while wildly overestimating wastes material on a job where 2×12 lumber isn't cheap. Calculating rise, run, and stringer length together before shopping ensures you buy the right board length and the right riser/tread combination on the first try.

The Staircase Calculator Formula, Explained

Number of Steps = Total Rise ÷ Riser Height; Total Run = Number of Steps × Tread Depth; Stringer Length = √(Total Rise² + Total Run²)

Where: Total Rise is the full vertical floor-to-floor height the staircase must climb (measured in inches), Riser Height is the vertical height of each individual step, typically 7 to 7.75 inches per most U.S. residential building codes, Tread Depth (also called 'run') is the horizontal depth of each step, typically 10 to 11 inches for comfortable, code-compliant stairs, Total Run is the total horizontal distance the staircase covers, and Stringer Length is the diagonal board length needed, calculated with the Pythagorean theorem since the stringer forms the hypotenuse of a right triangle with total rise and total run as the two legs.

In practice, total rise rarely divides evenly by a chosen riser height, so the standard method is to divide total rise by your target riser height, round up to a whole number of steps, and then recalculate the actual riser height by dividing total rise by that rounded step count — this keeps every riser in the staircase exactly equal, which is a strict code requirement, even if it means the actual riser height is slightly different from your original target (for example, targeting 7.5 inches might produce an actual riser of 7.2 or 7.6 inches once rounded to a whole step count).

Always verify riser height, tread depth, headroom, and handrail requirements against your local building code before construction, since exact limits vary by jurisdiction and by whether the stairs are interior, exterior, or a deck staircase.

How to Use the Staircase Calculator: Step by Step

  1. Measure total rise

    Measure the exact vertical distance from the finished floor below to the finished floor above (floor-to-floor height), not just the rough framing height.

  2. Choose a target riser height

    Pick a riser height within your local code's allowed range, typically 7 to 7.75 inches. Most residential codes require this to be checked against local amendments.

  3. Calculate number of steps and actual riser height

    Divide total rise by your target riser height and round up to a whole number of steps, then divide total rise by that step count to get the actual, equal riser height for every step.

  4. Calculate tread depth, total run, and stringer length

    Choose a tread depth of 10-11 inches, multiply by the number of steps to get total run, then use the Pythagorean theorem on total rise and total run to find your stringer board length.

Staircase Calculator Examples: Real-World Scenarios

1

Interior Staircase, Standard Floor-to-Floor Height

A staircase needs to climb a 9 ft (108 inch) floor-to-floor height. The builder targets a 7.2-inch riser, which divides evenly into 15 equal steps.

Total rise:108 in (9 ft)
Riser height:7.2 in
Tread depth:10 in

Calculation

Steps = 108 / 7.2 = 15. Total run = 15 × 10 = 150 in. Stringer length = √(108² + 150²) = √(11,664 + 22,500) = √34,164 ≈ 184.8 in

Result

This staircase needs 15 steps, a total horizontal run of 150 inches (12.5 ft), and a stringer length of about 184.8 inches (15.4 ft) — requiring a 16-foot 2×12 board for the stringer.

2

Basement Staircase, Rounded Riser Height

A basement staircase must climb 8 ft (96 inches). The builder targets a 7.5-inch riser (code maximum in this jurisdiction), which doesn't divide evenly and must be rounded up to a whole step count.

Total rise:96 in (8 ft)
Target riser:7.5 in
Tread depth:10.5 in

Calculation

Steps = CEILING(96 / 7.5) = 13. Actual riser = 96 / 13 = 7.38 in. Total run = 13 × 10.5 = 136.5 in. Stringer length = √(96² + 136.5²) = √(9,216 + 18,632.25) = √27,848.25 ≈ 166.9 in

Result

This staircase needs 13 steps at an actual riser height of 7.38 inches each (below the 7.5-inch code maximum), a total run of 136.5 inches, and a stringer length of about 166.9 inches (13.9 ft).

Common Mistakes to Avoid

  • Using a riser height target directly without recalculating the actual riser after rounding to a whole step count — every step in the run must be equal, and skipping this recalculation produces one odd-height step that fails inspection and creates a trip hazard.
  • Forgetting that the top step is often the finished floor itself, leading to an off-by-one error in the step count — always confirm with your local code whether the top floor counts as a 'step' in the tread count.
  • Not checking headroom clearance above the staircase, which is a separate code requirement (commonly a 6 ft 8 in minimum) independent of the rise-and-run calculation.

Tips & Tricks

  • Keep the sum of one riser height plus one tread depth close to 17-18 inches, and the product of riser × tread close to 72-75 — these are traditional stair-comfort rules of thumb used by builders long before modern codes formalized riser and tread limits.
  • Order stringer lumber one size longer than your calculated length to allow for the notched cuts at the top and bottom of the stringer, which remove material from the board's usable length.

Stair geometry is unforgiving — every riser must be equal, and the numbers must fit within your local code before you cut lumber. Use this calculator to nail down your step count, riser height, and stringer length, then check our lumber calculator for board-foot estimates on stringers, treads, and risers, or our drywall calculator if you're finishing the stairwell walls.

Staircase Calculator — Frequently Asked Questions

Related Calculators

Authoritative References

External links open in a new tab. OmniCalc.us is not affiliated with these organisations.

Related Calculators