How the stair layout is worked out
A staircase has to climb a fixed vertical distance — the total rise from one finished floor to the next — in equal steps. The calculator divides that rise by your maximum allowed riser height and rounds up to a whole number of steps, because every riser in a flight must be the same height for the stairs to feel safe underfoot.
It then divides the total rise evenly by that number of steps to find the actual riser height, multiplies the tread depth by the number of treads to get the horizontal run, and uses the Pythagorean theorem on the rise and run to find the diagonal length of the stringer — the sloped board that carries the steps.
Why there is one fewer tread than riser
A common point of confusion is that the run is based on the number of steps minus one. This is because the top step lands directly on the upper floor, so that final rise has no tread of its own in front of it.
In other words, a flight with eight risers has only seven treads between the floors. Getting this right matters because it determines how far the staircase projects into the room below.
Comfortable, code-compliant dimensions
Stairs that are comfortable to climb follow well-established proportions. Many builders aim for a riser plus tread that falls within a tested range so the stride feels natural.
- Riser height is typically capped near 7.75 inches; 6.5 to 7.5 inches feels comfortable.
- Tread depth is usually at least 10 to 11 inches so a foot lands securely.
- A popular rule is that two risers plus one tread should total roughly 24 to 25 inches.
- Every riser and every tread in a flight must match within a small tolerance.
Check local codes before you build
These figures give you a clean starting layout, but stair dimensions are tightly regulated and the limits vary by jurisdiction and by whether the stair is interior, exterior, or for a deck. Headroom, handrail height, nosing, and landing requirements are not modeled here. Confirm the final design against your local building code, and remember that real-world finished floor thicknesses can shift the total rise slightly.
Formula
numSteps = ceil(totalRise / maxRiser); riser = totalRise / numSteps; run = tread × (numSteps − 1); stringer = √(totalRise² + run²)Frequently asked questions
- What is a comfortable riser height?
- Most building codes cap risers around 7.75 in. Risers between 6.5 and 7.5 in are generally comfortable.
- Why is the run based on numSteps − 1?
- The top step lands on the upper floor, so there is one fewer tread than there are risers.

