How to Calculate Stairs for Your Deck
Divide total rise by a target riser, round to whole steps, then set tread depth and total run. Step-by-step stair maths with worked examples and checks.
How to Calculate Stairs: Rise, Run and Number of Steps
You have the total floor-to-floor height measured, but you do not know how many steps that makes, what each riser should be, or whether the stair will fit the space you have. The answer is a four-step calculation: find the number of risers, compute the actual riser height, determine the tread depth using code limits, and then calculate the total run and stringer length. You can calculate stairs manually using the formulas, the code numbers, and the two things that cause most inspection failures. All dimensions come from the 2021 IRC R311.7.5, which sets the maximum riser at 7 3/4 inches and the minimum tread depth at 10 inches.
Measure Total Rise Correctly
The total rise is the vertical distance from the finished floor of the lower level to the finished floor of the upper level. Do not measure from subfloor to subfloor. If the finished floor on the upper level is not yet installed, add its thickness to the measurement you take from subfloor to subfloor. A common failure mode here is forgetting that carpet, tile, or hardwood adds 1/2 to 3/4 inch, which shifts every riser by that amount and puts the stair out of compliance.
Measure at the center of the stair opening, using a tape measure at least 25 feet long. Record the value in inches. For an 8-foot ceiling with a typical floor thickness of 12 inches, the total rise is 108 inches. For a 9-foot ceiling with the same floor thickness, it is 120 inches. These two examples cover the majority of residential stair calculations.
Number of Risers Formula
Divide the total rise by a target riser height. Start with 7 inches, which is a comfortable step for most adults. The formula is N = total rise / target riser height, where N is the number of risers. Round the result up to the next whole number. Rounding up is the only safe direction: rounding down produces a riser that exceeds the 7 3/4 inch maximum set by the 2021 IRC R311.7.5.
For a total rise of 104 inches, 104 / 7 = 14.857, which rounds up to 15 risers. For a total rise of 112 inches, 112 / 7 = 16.0, which stays at 16 risers. If the target riser is 7.5 inches, 112 / 7.5 = 14.933, rounding up to 15 risers.
Actual Riser Height
Divide the total rise by the number of risers to get the actual riser height: r = R / N. This value must fall between 4 inches and 7 3/4 inches per IRC R311.7.5. If it falls outside this range, adjust N by one step and recalculate.
For the 104-inch total rise with 15 risers, the actual riser is 6.933 inches. For 112 inches with 16 risers, it is 7.0 inches. For 112 inches with 15 risers, it is 7.467 inches. All three are within code. The uniformity rule requires that every riser in the flight be within 3/8 inch of each other, so the stringer cuts must be precise.
Treads Equal Risers Minus One
The number of treads is always one fewer than the number of risers. The top landing serves as the last tread, so you do not cut a separate step for it. For a flight of 15 risers, you need 14 treads. For 16 risers, you need 15 treads. This is where DIYers miscount most often, leading to stringers cut with one notch too many or too few.
The tread depth must be at least 10 inches per IRC R311.7.5. There is no maximum, but the practical range for comfort is 10 to 12 inches. The tread depth combined with the riser height determines the stair's pitch and comfort. Use the safety formula r + t, which should fall between 17 and 18 inches, to verify tread depth. For the 6.933-inch riser, a 10.067-inch tread gives r + t = 17.0, which meets the safety range. For the 7.467-inch riser, a 10.033-inch tread gives r + t = 17.5.
Total Run and Stringer Length
The total run is the horizontal distance the stair occupies from the first nosing to the last nosing. Multiply the tread depth by the number of treads: T_run = t × (N, 1). For the 6.933-inch riser example, T_run = 10.067 × 14 = 140.938 inches, approximately 11 feet 9 inches. For the 7.467-inch riser example, T_run = 10.
The stringer length is the diagonal of the right triangle formed by the total rise and total run. Use the Pythagorean theorem: L = √(R² + T_run²). For the first example, L = √(104² + 140.938²) = √(10816 + 19863.5) = √30679.7 inches, or 15 feet 0 inches. Add extra length for any overhang or connections at the top and bottom of the stringer.
Worked Example: 8-Foot Floor-to-Floor
Total rise is 104 inches. Target riser is 7 inches. Number of risers is 15. Actual riser is 6.933 inches, which is within the 4 to 7 3/4 inch range. Tread depth using the safety formula r + t = 17 gives 10.067 inches. Total run is 10.067 × 14 = 140.938 inches, about 11 feet 9 inches. Stringer length is 175.2 inches, about 14 feet 7 inches. Headroom check: the IRC requires 80 inches minimum measured vertically from the nosing to the nearest overhead obstruction. With a 12-inch floor thickness above, the clearance is 104-12 = 92 inches from the nosing to the underside of the floor, which exceeds 80 inches.
Worked Example: 9-Foot Floor-to-Floor
Total rise is 112 inches. Target riser is 7.5 inches. Number of risers is 15 (112 / 7.5 = 14.933, rounded up). Actual riser is 7.467 inches. Tread depth using the safety formula r + t = 17.5 gives 10.033 inches. Total run is 10.033 × 14 = 140.462 inches, about 11 feet 8 inches. Stringer length is 179.7 inches, about 15 feet 0 inches. This stair has a steeper riser and shallower tread than the 8-foot example, which may feel less comfortable but is still code-compliant. The Blondel value 2r + t is 2(7.467) + 10.033 = 24.967, which sits at the upper bound of the 24 to 25 inch comfort range.
| Dimension | 8-Foot Ceiling (104 in) | 9-Foot Ceiling (112 in) |
|---|---|---|
| Number of Risers | 15 | 15 |
| Actual Riser Height | 6.933 in | 7.467 in |
| Tread Depth | 10.067 in | 10.033 in |
| Total Run | 140.938 in (11 ft 9 in) | 140.462 in (11 ft 8 in) |
| Stringer Length | 175.2 in (14 ft 7 in) | 179.7 in (15 ft 0 in) |
| Blondel Value (2r + t) | 24.967 | 24.967 |
| Safety Value (r + t) | 17.0 | 17.5 |
How to Calculate Stair Rise and Run
The rise and run are the two numbers that define a step's geometry. The rise is the vertical height from the top of one tread to the top of the next. The run is the horizontal depth from the nosing of one tread to the nosing of the next. The IRC R311.7.5 limits the rise to a maximum of 7 3/4 inches and a minimum of 4 inches, and the run to a minimum of 10 inches with no maximum. These limits produce a maximum stair angle of about 38 degrees.
To calculate the rise and run together, start with the number of risers from the previous step, then adjust the tread depth until the safety formula r + t falls between 17 and 18 inches. If the stair feels too steep, increase the number of risers by one, which lowers the riser height and allows a deeper tread. If the stair feels too shallow, decrease the number of risers by one, which raises the riser height but may push it over the 7 3/4 inch limit.
Number of Steps Formula
The formula for the number of steps is N = R / target, where N is the number of risers, R is the total rise in inches, and target is the target riser height in inches. Round N up to the nearest whole number. The formula for the number of treads is N - 1. For a total rise of 104 inches and a target of 7 inches, N = 104 / 7 = 14.857, rounded up to 15 risers, giving 14 treads. For a total rise of 112 inches and a target of 7 inches, N = 112 / 7 = 16.0, giving 16 risers and 15 treads.
Stair Math: The Key Numbers
The stair math involves four numbers: total rise, number of risers, actual riser height, and tread depth. The relationship between them is fixed. Total rise divided by number of risers equals riser height. Tread depth multiplied by (number of risers minus 1) equals total run. Total rise squared plus total run squared equals stringer length squared.
The uniformity rule is the most common inspection failure. All risers in a flight must be within 3/8 inch of each other, and all tread depths must be within 3/8 inch of each other. This means the stringer must be cut to a single precise pattern, and the finish floor thickness must be the same on every step. If you are building a deck stair where the bottom step sits on a concrete pad and the top step meets a wood deck floor, the riser height at the bottom may be different from the others unless you account for the difference in surface height.
How Many Stairs for an 8-Foot Ceiling
For an 8-foot ceiling with a total rise of 104 inches, the calculation produces 15 risers and 14 treads. The actual riser is 6.933 inches, and the tread depth is 10.067 inches. The total run is about 11 feet 9 inches, which means the stair needs about 13 feet 9 inches of floor space including the top and bottom landings. The stringer length is about 14 feet 7 inches, which fits a standard 16-foot 2x12 board with room to trim.
This configuration is the most common residential stair in the United States. It meets the IRC limits and the safety formula, and it produces a stair angle of about 35 degrees, which most users find comfortable. If the available floor space is shorter than 13 feet 9 inches, you may need to increase the number of risers to 16, which reduces the riser to 6.5 inches and allows a deeper tread, but increases the total run.
Common Stair Calculation Mistakes
Six Mistakes That Cause Inspection Failures
Six mistakes cause nearly all stair calculation failures. The first is measuring the total rise from subfloor to subfloor instead of finished floor to finished floor. This shifts every riser by the thickness of the flooring, which can push the riser above the 7 3/4 inch maximum or create a uniformity violation.
The second mistake is forgetting that the number of treads is one fewer than the number of risers. The top landing is the last tread. Cutting a stringer with the same number of notches as risers produces one too many treads and a stair that does not fit the total rise.
The third mistake is not accounting for tread thickness when cutting stringer notches. The notch depth on a cut stringer must be exactly the riser height minus the tread thickness. If the tread is 1 inch thick and the riser is 6.933 inches, the notch depth is 5.933 inches. Cutting the notch to the full riser height produces a step that is too high.
The fourth mistake is ignoring the uniformity rule. A variation of 1/2 inch between the shortest and tallest riser is a common inspection failure. This happens when the finish floor is not level, or when the stringer is cut to a pattern that does not account for the thickness of the bottom tread bearing on a different surface.
The fifth mistake is using the wrong code. The 2021 IRC applies to one- and two-family dwellings and townhouses. A commercial project falls under the IBC, which allows a 7-inch maximum riser and an 11-inch minimum tread. Applying IRC dimensions to a commercial stair leads to a failed inspection.
The sixth mistake is assuming the nosing projection is optional. The IRC requires a nosing projection between 3/4 and 1 1/4 inches. Omitting it reduces the effective tread depth, which can put the tread below the 10-inch minimum. The nosing is measured from the riser below to the leading edge of the tread, not from the stringer face.
What Most Often Goes Wrong
The single thing that most often goes wrong is the uniformity violation. A DIYer measures the total rise, divides by the number of risers, cuts the stringer to that pattern, installs the stair, and then discovers that the bottom riser is 1/2 inch taller than the top riser because the finish floor was not accounted for. The fix is to measure the total rise from finished floor to finished floor before cutting anything. If the finished floor is not yet installed, add its thickness to the subfloor measurement. That single number, measured correctly, is the difference between a stair that passes inspection and one that requires a complete rebuild.
Common Questions
What is the maximum riser height under the 2021 IRC?
The 2021 IRC R311.7.5 sets a maximum riser height of 7 3/4 inches (196.8 mm) and a minimum of 4 inches (101.6 mm). Every riser in a flight must be within 3/8 inch of each other.
Why do I subtract one from the number of risers to get treads?
The top landing serves as the last tread. For a straight stair with 15 risers, you walk up 14 treads and step onto the upper floor. Counting 15 treads means cutting one too many.
What is the safety formula r + t?
The safety formula adds the riser height (r) and tread depth (t). The sum should fall between 17 and 18 inches for a comfortable step. Values below 17 feel choppy; values above 18 feel like a stretch.
Can I use a 2x10 instead of a 2x12 for my stringer?
A 2x12 is standard because the notch depth reduces the remaining wood to a minimum that supports the load. A 2x10 may be acceptable with intermediate support, but the American Wood Council DCA 6 provides the span tables.