Stair Calculator | Code Compliance & Dimensions
Short answer
The Stair Calculator determines the exact number of risers, individual riser height, number of treads, total horizontal run, stringer length, and incline angle based on your total vertical rise. For example, a 108-inch vertical rise using a 10-inch tread and a 7.75-inch maximum riser yields 14 risers at 7.714 inches each, 13 treads, a total run of 130 inches, and a stringer length of approximately 169.01 inches.
Formula
Risers = ⌈Total rise / max riser⌉; Riser = rise / risers; Run = (risers − 1) × tread; Stringer = √(rise² + run²)
The calculations determine stair geometry from three basic inputs: total rise, maximum riser height, and tread depth. Risers equals the ceiling of total rise divided by maximum riser height: Risers = ⌈Total rise / max riser⌉. Individual riser height is calculated by dividing total vertical rise by the number of risers: Riser = rise / risers. Total horizontal run accounts for one fewer tread than risers: Run = (risers − 1) × tread. Finally, the structural stringer length uses the Pythagorean theorem: Stringer = √(rise² + run²). The stair incline angle is computed as arctan(rise / run).
Worked example
- Total rise (floor to floor)
- 108
- Maximum riser height
- 7.75
- Tread depth
- 10
- Number of risers (steps): 14
- Riser height: 7.714 in
- Number of treads: 13
- Total run: 130 in (10.83 ft)
- Stringer length (approx.): 169.01 in (14.08 ft)
- Stair angle: 39.7°
- IRC residential check (≤ 7¾ in riser, ≥ 10 in tread): Meets
How the Stair Calculator Works
Designing a safe, comfortable, and code-compliant staircase requires precise geometry. A staircase is fundamentally a right triangle: the vertical leg represents the total rise (the overall height between finished floor surfaces), the horizontal leg represents the total run (the distance the stairs travel across the room), and the hypotenuse represents the stringer length (the diagonal structural member supporting the steps).
To construct stairs that are easy to climb, the height of each step must be identical. Human locomotion relies heavily on muscle memory; even a quarter-inch variation between steps can disrupt a person's stride and cause a fall. The Stair Calculator takes your total vertical rise, maximum allowable riser height, and desired tread depth to establish uniform dimensions across the entire flight.
The Mathematical Principles
The calculator executes several sequential formulas to balance mathematical exactness with construction feasibility:
-
Determining Step Count (Ceiling Function): Because you cannot build a fraction of a physical step, the total rise is divided by the maximum riser height, and the result is rounded up to the next whole integer using the ceiling function: $$\text{Risers} = \lceil \text{Total rise} / \text{max riser} \rceil$$ Rounding up ensures that the resulting individual riser height remains at or below your specified maximum threshold.
-
Calculating Unit Riser Height: Once the total number of risers is established as an integer, the total rise is divided equally by this count: $$\text{Riser} = \frac{\text{Total rise}}{\text{Risers}}$$ This produces an identical, repeatable vertical dimension for every step.
-
Calculating Total Horizontal Run: In standard construction, the uppermost step terminates flush with the edge of the upper floor landing. Consequently, there is always one fewer physical tread than vertical risers: $$\text{Treads} = \text{Risers} - 1$$ $$\text{Total run} = (\text{Risers} - 1) \times \text{Tread depth}$$
-
Calculating Stringer Length: The diagonal length of the rough stringer is computed using the Pythagorean theorem: $$\text{Stringer} = \sqrt{\text{Total rise}^2 + \text{Total run}^2}$$
-
Calculating Stair Incline Angle: The pitch of the staircase is derived trigonometrically: $$\text{Stair angle} = \arctan\left(\frac{\text{Total rise}}{\text{Total run}}\right) \times \left(\frac{180}{\pi}\right)$$
Step-by-Step Worked Example
To demonstrate how the math applies in practice, consider a common residential scenario where a staircase connects two finished levels.
Input Parameters:
- Total rise (floor to floor): 108 in
- Maximum riser height: 7.75 in (the maximum threshold permitted under IRC residential rules)
- Tread depth: 10 in (the minimum depth permitted under IRC residential rules)
Calculation Steps:
-
Find the number of risers: $$\text{Risers} = \left\lceil \frac{108}{7.75} \right\rceil = \lceil 13.935 \rceil = 14$$ Rounding up gives exactly 14 equal vertical risers.
-
Determine individual riser height: $$\text{Riser height} = \frac{108}{14} = 7.71428... \approx 7.714\text{ in}$$ In fractional carpentry terms, 7.714 inches is approximately $7\frac{23}{32}$ inches.
-
Determine the number of horizontal treads: $$\text{Number of treads} = 14 - 1 = 13$$
-
Compute total horizontal run: $$\text{Total run} = 13 \times 10\text{ in} = 130\text{ in}$$ Converted to feet: $130 / 12 = 10.83\text{ ft}$.
-
Compute the approximate stringer length: $$\text{Stringer} = \sqrt{108^2 + 130^2} = \sqrt{11664 + 16900} = \sqrt{28564} \approx 169.01\text{ in}$$ Converted to feet: $169.01 / 12 = 14.08\text{ ft}$.
-
Determine the staircase angle: $$\text{Stair angle} = \arctan\left(\frac{108}{130}\right) = \arctan(0.83077) \approx 39.7^\circ$$
Exact Results:
- Number of risers (steps): 14
- Riser height: 7.714 in
- Number of treads: 13
- Total run: 130 in (10.83 ft)
- Stringer length (approx.): 169.01 in (14.08 ft)
- Stair angle: 39.7°
- IRC residential check (≤ 7¾ in riser, ≥ 10 in tread): Meets
How to Interpret Your Results
Evaluating your calculation outputs ensures that your framing plans translate successfully into physical space.
Code Compliance Verification
The tool checks your results against the model International Residential Code (IRC Section R311.7). The standard specifies that maximum riser height cannot exceed 7.75 inches ($7\frac{3}{4}$ in) and minimum tread depth cannot be less than 10 inches. In the worked example, a riser height of 7.714 inches meets the requirement because it sits just beneath the 7.75-inch legal threshold. If your design produces an "Exceeds" status, you must either increase the number of risers or expand the horizontal space allocated for the tread depth.
Total Run and Spatial Clearance
The total run indicates how much floor space the staircase will consume horizontally. In the example, a run of 130 inches means you must have at least 10 feet 10 inches of unobstructed horizontal clearance. Additionally, consider landing clearances: building codes require a minimum 36-inch by 36-inch landing at both the top and bottom of the flight. This landing space is separate from and cannot encroach upon the calculated 130-inch run.
Stringer Board Sizing
The calculated stringer length is the hypotenuse from point to point. In the example, the stringer spans approximately 169.01 inches (14.08 feet). Because lumber is purchased in standard two-foot increments, you would need to order at least 16-foot $2\times12$ boards to accommodate the cuts and plumb line trimmings at the header and footer.
Stair Pitch and Comfort
A stair angle of 39.7° falls within the acceptable range for residential architecture (typically between 30° and 40°). While steep, it maximizes vertical climb within a compact horizontal footprint. Builders often reference the classic comfort rule of thumb: $2 \times \text{Riser} + \text{Tread} \approx 24\text{ to }25\text{ inches}$. In this example, $(2 \times 7.714) + 10 = 25.43\text{ inches}$, confirming a natural, ergonomic walking rhythm.
Practical Tips
1. Measure from Finished Surfaces, Not Framing
Never base your total rise on bare subfloors or concrete slabs unless you have accounted for underlayment, hardwood, tile, or carpeting. For example, if you lay a 3/4-inch hardwood floor on the lower level but carpet the upper level, the net total rise changes. Measure precisely between where the top surface of the lower finished floor will be and where the top surface of the upper finished landing will be.
2. Execute the "Drop the Stringer" Cut
One of the most frequent carpentry errors occurs on the very first step. Because a finish tread (often 1 inch thick) sits on top of the cut stringer, it raises every step height by 1 inch. At the bottom of the stringer, you must cut off the exact thickness of one tread from the bottom foot. If you omit this cut, your first step will be 1 inch too tall, and your final step onto the upper floor will be 1 inch too short—a direct code violation.
3. Check Headroom Clearance
Building codes require a minimum vertical headroom of 6 feet 8 inches (80 inches). This clearance is measured vertically from a sloped plane tangent to the nosing of the treads upward to any overhead ceiling, bulkhead, or framing obstruction. Ensure that your ceiling opening extends far enough along the horizontal run to prevent tall individuals from striking their heads while descending.
4. Maintain Throat Depth Integrity
When laying out notches on a $2\times12$ stringer, the remaining solid wood below the notch—known as the "throat"—must carry the weight of the stairs. Building inspectors generally look for at least 3.5 inches to 5 inches of uncut material. If your stringer span is long (such as the 14-foot member in our example), install center bearing blocks or mid-span support posts to eliminate bounce and deflection.
Comparison
| Scenario | Input | Result |
|---|---|---|
| Base example | Default inputs | Number of risers (steps): 14 |
Common mistakes
- Measuring vertical rise from subfloor to finished floor without accounting for final flooring thickness on both levels.
- Forgetting that the number of horizontal treads is always one less than the number of vertical risers in standard framing.
- Failing to cut the bottom of the stringer by the thickness of the tread material, resulting in an uneven first step.
- Exceeding the maximum allowed International Residential Code (IRC) riser height of 7.75 inches or providing less than 10 inches of tread depth.
- Allowing a riser height variance greater than 3/8 inch between the tallest and shortest steps across the entire flight.
Checklist
- Measure total vertical rise from finished upper floor to finished lower floor.
- Confirm local residential building code adoption of IRC limits (maximum 7.75-inch riser, minimum 10-inch tread).
- Select an adequate lumber dimension (typically 2x12) to maintain sufficient throat depth on cut stringers.
- Calculate minimum headroom clearance (IRC requires at least 6 feet 8 inches measured vertically from the stair sloped line).
- Verify that the total horizontal run fits within the available room or hallway footprint without obstruction.
- Account for nosing overhangs (typically 0.75 to 1.25 inches) if tread depth is less than 11 inches.

Michael Torres
Co-Founder & Chief Editor, Calculators PercentageCo-Founder & Chief EditorMichael Torres writes about personal finance, loans, and savings for the financial blog The Money Leads.
This tool provides structural estimates based on standard mathematical formulas and model International Residential Code (IRC) guidelines. Always consult your local municipal building authority, as regional amendments, structural requirements, and local codes take precedence over general calculations.
