ThisCalculator

Statistics

Box Stair Calculator: Steps, Rise, Run & Code

Updated · Standard formula, shown below

Number of risers 14
Riser height
7.50 in
Result
Tread depth
9.23 in
Result
Stringer length
159.5 in
Result

Box Stair Calculator: Steps, Rise, Run & Code

A box stair calculator works out the number of steps, riser height, and tread depth for a straight staircase built inside a boxed opening, such as a deck, porch, or interior rough opening. You enter the total rise (floor-to-floor height), total run (horizontal distance available), and desired riser height or tread depth, and it returns the exact number of risers, individual riser height, tread depth, and total stringer length. The result lets you build a code-compliant staircase without guesswork.

Formula

The calculator uses two basic stair formulas that appear in most building codes and carpentry guides:

  • Number of risers = ceiling(total rise ÷ maximum allowed riser height). Ceiling means you round up to the nearest whole number.
  • Riser height = total rise ÷ number of risers. This is the actual vertical distance between the top of one tread and the top of the next.
  • Tread depth = total run ÷ (number of risers − 1). The minus one accounts for the fact that the top tread is usually the floor or landing itself.
  • Stringer length = square root of (total run² + total rise²) — the Pythagorean theorem applied to the right triangle formed by the stair.

Variables and units:

  • Total rise (inches): vertical distance from the finished floor below to the finished floor above.
  • Total run (inches): horizontal distance from the face of the bottom riser to the face of the top riser (or from the front edge of the bottom tread to the front edge of the top tread).
  • Maximum riser height (inches): the largest riser your local code allows — commonly 7.75 in (about 19.7 cm) for residential stairs.
  • Riser height (inches): the actual computed rise per step.
  • Tread depth (inches): the horizontal depth of each step, not including any nosing overhang.
  • Stringer length (inches): the length of the diagonal board that supports the treads and risers.

Worked Example

Using the default values from the calculator: total rise = 105 inches, total run = 120 inches, max riser = 7.75 inches.

  1. Number of risers = ceil(105 ÷ 7.75) = ceil(13.548) = 14 risers.
  2. Riser height = 105 ÷ 14 = 7.5 inches. That’s under the 7.75 max, so it’s acceptable.
  3. Tread depth = 120 ÷ (14 − 1) = 120 ÷ 13 = 9.23 inches. That’s a bit shallow for most codes (which want at least 10 inches), so you might need to increase the run or accept a steeper stair.
  4. Stringer length = sqrt(120² + 105²) = sqrt(14400 + 11025) = sqrt(25425) = 159.45 inches (about 13.3 feet).

The calculator’s first output shows 14 risers, riser height 7.50 in, tread depth 9.23 in, and stringer length 159.5 in. The math matches.

When to Use a Box Stair Calculator

Use this calculator whenever you’re framing a straight staircase that fits between two walls, stringers, or other vertical surfaces — that’s the “box� in box stairs. Typical situations:

  • Deck stairs from a deck surface down to a patio or yard.
  • Porch steps with a fixed width between posts or walls.
  • Interior stairs in a stairwell with a known floor-to-floor height.
  • Replacing an old set of stairs where you want to match the existing rise and run.

If your staircase has a landing, a turn, or winders, this simple calculator won’t handle it directly — you’ll need to break the stair into straight segments and calculate each separately.

How to Read the Results

The most important number is the riser height. Building codes typically cap it at 7.75 inches (residential) or 7 inches (public buildings). If your calculated riser is below the max, you’re good. If it’s above, you need more risers (which means more steps) or a shallower total rise.

The tread depth is the second critical number. Most codes require a minimum tread depth of 10 inches (25.4 cm) for residential stairs, measured from nosing to nosing. If your tread comes out less than that, you have three options:

  • Increase the total run (make the stair longer horizontally).
  • Use a smaller maximum riser height (which increases the number of steps and thus reduces the required tread depth for the same run).
  • Accept a steeper stair if your local code allows it (some older homes have 9-inch treads).

The stringer length tells you how long a board you need to buy. Add a few inches for cutting waste and for the top and bottom connections.

Common Mistakes and How to Avoid Them

People often mix up units or forget the “minus one� in the tread calculation. Here are the most frequent errors:

  • Using total run instead of available run: The total run is the horizontal distance from the face of the bottom riser to the face of the top riser. If you measure from the wall to the edge of the deck, you’ll be off by the thickness of the top tread.
  • Forgetting the floor counts as a tread: The top step is usually the floor itself, so you divide the run by (risers − 1), not by risers. This mistake makes treads too shallow.
  • Mixing inches and feet: Always convert everything to inches before calculating. If you enter feet in one field and inches in another, the result will be nonsense.
  • Rounding too early: Round the number of risers up to a whole number first, then compute the riser height. Don’t round the riser height to a convenient fraction before checking it against code.
  • Ignoring nosing and overhang: Tread depth is measured from the front edge of one tread to the front edge of the next, not including any nosing (the protruding lip). If you add a 1-inch nosing, the actual tread board can be 1 inch deeper than the code minimum.

Limits of the Formula

This calculator assumes a straight, uniform staircase with identical risers and treads. It doesn’t account for:

  • Landings: If your stair has a landing, you must treat it as a separate stair segment with its own rise and run.
  • Winders (tapered treads): These require more complex geometry and are usually not allowed as primary stairs in many codes.
  • Headroom: The calculator doesn’t check that you have at least 6’8â€� (80 inches) of headroom above the stair. You need to verify that separately.
  • Stringer thickness and notching: The stringer length is the hypotenuse of the triangle, but the actual board you cut will have notches for treads and risers, which reduces its effective strength. For wide stairs or heavy loads, you may need thicker stringers or more support.
  • Handrails and guardrails: These are required by code but don’t affect the rise/run calculation.

Choosing the Right Inputs

To get a useful result, measure carefully:

  • Total rise: Measure from the finished floor (or deck surface) below to the finished floor above. If you’re building on dirt, add the thickness of the future concrete pad or paver base.
  • Total run: Measure the horizontal distance from the face of the bottom riser to the face of the top riser. If you’re not sure where the bottom riser will be, mark a point on the ground that gives you the desired run.
  • Max riser height: Use 7.75 inches as a default for residential, but check your local code — some jurisdictions allow 8 inches, others require 7 inches.

If your calculated riser height is, say, 7.9 inches, you have two choices: increase the number of risers (by lowering the max riser input) or reduce the total rise (e.g., by adding a step at the bottom). The calculator helps you see both options instantly.

Frequently Asked Questions

What is the standard rise and run for box stairs?

Most residential codes allow a maximum riser height of 7.75 inches and a minimum tread depth of 10 inches. A common comfortable combination is a 7-inch rise with an 11-inch run, which gives a slope that’s easy to climb. However, the exact numbers vary by jurisdiction, so always check your local building code before cutting.

How many steps do I need for a 10-foot rise?

Ten feet is 120 inches. Divide 120 by the maximum riser height (say 7.75 inches) to get 15.48, then round up to 16 risers. That means 15 actual treads (since the top step is the floor). The riser height would be 120 ÷ 16 = 7.5 inches, which is within code.

Can I use this calculator for deck stairs?

Yes, as long as the stairs are straight. For deck stairs, measure the total rise from the deck surface to the ground (or the top of the concrete pad). The total run is the horizontal distance from the deck edge to the point where the bottom step lands. Remember to subtract the thickness of the decking if the top tread is the deck itself.

What if my tread depth is less than 10 inches?

If your calculated tread depth is under 10 inches, you need to either increase the total run (make the stair longer) or increase the number of risers (by using a smaller max riser height). For example, with a 120-inch run and 14 risers, you get 9.23-inch treads — too shallow. If you increase the run to 130 inches, you get 10.0-inch treads. Alternatively, if you use 15 risers (max rise 7 inches), the tread depth becomes 120 ÷ 14 = 8.57 inches, which is worse. So the practical fix is usually to extend the run.

Does the stringer length include the top and bottom cuts?

No. The stringer length is the diagonal distance from the top of the stringer to the bottom, measured along the back of the notches. You need to add extra length for the top bearing (where the stringer attaches to the deck or floor) and the bottom bearing (where it sits on the ground or a concrete pad). Typically, you add a few inches to each end, but the exact amount depends on your connection method.

Can I build stairs with different riser heights?

No. Building codes require that all riser heights be uniform within 3/8 inch (about 9.5 mm) between the tallest and shortest. Uneven risers are a trip hazard and a common cause of falls. If your calculated riser height isn’t a nice round number, that’s fine — just use the exact decimal value and cut all risers to that same dimension.

Related

Formula used
in total_rise | Total rise | in | 105 | 0
in total_run | Total run | in | 120 | 0
in max_rise | Max riser height | in | 7.75 | 0
out risers | Number of risers | - | ceil(total_rise / max_rise) | 0
out riser_h | Riser height | in | total_rise / risers | 2
out tread_d | Tread depth | in | total_run / (risers - 1) | 2
out stringer | Stringer length | in | sqrt(total_run^2 + total_rise^2) | 1

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.