Stairs14 min read

Stair Calculator: Rise, Run, Stringer Length & Code Compliance

Every staircase starts with the same three numbers: total rise, target riser height, and tread depth. Get those right and everything else — stringer length, lumber quantities, headroom clearance, code compliance — flows from them automatically. Get them wrong and you are looking at a failed inspection and a complete rebuild. This guide walks through the full calculation sequence the way a licensed carpenter actually does it, with the formulas, the code limits, and the material takeoff process for any staircase from a simple deck flight to a full interior staircase.

Key Takeaways

  • IRC maximum riser height is 7¾ inches; all risers in one flight must be within ⅜ inch of each other
  • Stringer length = √(total rise² + total run²) — the Pythagorean theorem applied to the stair diagonal
  • The comfort formula: 2 × riser + tread = 24–25 inches; target 7–7.5" risers and 10.5–11.5" treads
  • A standard 9-foot story height requires 13–15 risers depending on material stack-up
  • Most residential stairs need two or three 2×12 stringers — verify the net depth at the notch is ≥ 3.5"

Calculate Your Stairs Now

Enter your floor-to-floor height and get riser count, riser height, tread depth, stringer length, and total run — all checked against IRC code.

Open the Free Stair Calculator

The Problem With "Eyeballing" Stairs

Here is a call I get more than I should: a homeowner had a contractor build new stairs, and now the inspector won't sign off. The reason is almost always one of two things: the risers are not consistent (the last riser at the top or bottom is a different height because nobody measured the actual floor-to-floor distance carefully), or the riser height exceeds 7.75 inches because the builder divided wrong.

According to the National Association of Home Builders (NAHB), stair-related inspection failures are among the most common framing deficiencies cited in residential construction. The IRC is not vague on this — the math has to work out, and the measurements have to be field-verified before you cut a single stringer.

The calculation sequence I use on every stair job, whether it is a three-step deck landing or a full two-story interior staircase, is the same: measure total rise, determine riser count, calculate individual riser height, set tread depth, compute total run, then calculate stringer length. That is the order. Do not skip steps.

IRC Building Code Requirements You Cannot Ignore

The International Residential Code (IRC) Section R311.7 governs residential stairways. These are the hard limits that determine whether your staircase passes inspection. Most local jurisdictions adopt IRC verbatim; a few add stricter requirements for handrail graspability or headroom.

IRC R311.7 Residential Stair Requirements

DimensionIRC RequirementPractical Target
Riser height (max)7¾ inches (7.75")7.0–7.5"
Riser height (min)4 inchesNever below 6" in practice
Tread depth (min)10 inches10.5–11.5"
Nosing projection¾" to 1¼"Required on closed-riser stairs
Stair width (min)36 inches36–42" for comfort
Headroom (min)6 ft 8 inMeasure at tightest point
Handrail height34–38 inchesMeasured from nosing
Guardrail height36 inches minAt open sides
Baluster spacing4 inches max4" sphere must not pass through
Riser variation⅜ inch maxMost commonly failed item

The riser variation rule trips up more builds than any other requirement. Let me be explicit: the tallest riser and the shortest riser in a single flight cannot differ by more than ⅜ inch. That is 0.375 inches. If you have 14 risers and your floor-to-floor height is 105 inches, each riser must be 7.5 inches — exactly. If the subfloor is slightly thicker on one end or the top landing elevation is off by half an inch, you will have one riser at 7.5" and another at 8", which fails.

This is why the first step on any stair job is measuring the actual floor-to-floor height at multiple points — not the plan dimension. Floors are not always perfectly level. Measure at both sides of the stairwell opening and at the center. Use the largest measurement as your design dimension so you are not cutting short on any end.

Step-by-Step Stair Calculation: The Full Process

Let me walk through a complete example. We have a floor-to-floor height of 109 inches — a standard 9-foot ceiling with framing, subfloor, and finish flooring. Here is how the calculation unfolds:

Step 1: Determine the Number of Risers

Divide total rise by your target riser height and round up to find the minimum number of risers needed to stay below the IRC maximum:

Total rise: 109 inches

Target riser: 7.25 inches

109 ÷ 7.25 = 15.03 → round up to 15 risers

Always round up, never down. Rounding down gives you risers above the target height, which may push you over the 7.75" code maximum.

Step 2: Calculate Actual Riser Height

Divide total rise by the number of risers to get the exact height each riser must be:

109 ÷ 15 = 7.267 inches per riser

Check: 7.267 < 7.75 ✓ (within IRC max)

In fractions: 7 and ¼ inches (close enough — cut to 7-9/32")

This is the number you mark on every riser. Every single one. Cut them all identical using a stair gauge clamped to a framing square or a dedicated stair-marking jig.

Step 3: Set Tread Depth Using the Comfort Formula

With riser height set at 7.267 inches, the comfort formula (2R + T = 24–25) gives us:

2 × 7.267 = 14.53

24 − 14.53 = 9.47 (minimum tread for 24" formula)

25 − 14.53 = 10.47 (maximum tread for 25" formula)

Target: 10.5 to 11 inches (also above 10" IRC minimum ✓)

We will use 11-inch treads. This satisfies both the comfort formula and the IRC minimum tread depth, and it is a standard dimension for red oak treads available off the shelf at most lumber yards. Note: tread depth is measured from the face of one riser to the face of the next — the nosing overhang of ¾ to 1¼ inches is in addition to this measurement.

Step 4: Calculate Total Run

Total run is the horizontal distance the staircase occupies. There is one fewer tread than riser, because the top landing surface is the final "tread." With 15 risers, we have 14 treads:

14 treads × 11 inches = 154 inches (12 ft 10 in) total run

This is the floor space the staircase consumes. Add 36 to 42 inches for landing clearance at the top and bottom — the IRC requires at least 36 inches of floor space in the direction of travel at both ends. Total floor space needed for this staircase: roughly 19 to 20 feet.

Step 5: Calculate Stringer Length

Stringer length is the hypotenuse of the right triangle formed by total rise (vertical) and total run (horizontal):

Stringer length = √(total rise² + total run²)

= √(109² + 154²)

= √(11881 + 23716)

= √35597

= 188.7 inches ≈ 15 ft 9 in

Purchase length: 18–20 ft 2×12 boards (add 15–20% for top/bottom cuts)

Buy 20-foot 2×12 boards and you will have comfortable material to work with. For this 15-riser staircase, you need two or three stringers depending on the stair width. A 36-inch stair needs two stringers; anything over 36 inches wide should have three. Our stair calculator computes all of this automatically — enter your floor-to-floor height and tread width and get the full material list.

The Stringer Notch Depth Rule Nobody Tells You About

Here is something that catches even experienced framers: when you notch a 2×12 stringer for each tread and riser, you reduce the structural depth of the board. The IRC requires that the remaining net depth at the cut — the section of uncut material from the notch to the opposite edge — must be at least 3.5 inches.

A 2×12 is 11.25 inches deep. If your riser is 7.267 inches and your tread is 11 inches, the notch cuts 7.267 inches deep on the vertical and 11 inches deep on the horizontal. The net depth from the deepest point of the notch to the bottom edge of the stringer is roughly 11.25 − 7.267 = 3.98 inches. That barely clears the 3.5-inch minimum.

Push those dimensions and you are cutting into structurally compromised territory. If you have a high riser (7.5"+) combined with a deep tread (11.5"+), verify the remaining net depth before you commit to 2×12 stock. Some situations require engineered LVL stringer stock or steel stringers to provide adequate structural depth.

Quick Reference: Steps for Common Ceiling Heights

Ceiling height in architectural plans is the rough-framed height from subfloor to underside of floor joists above, but the actual floor-to-floor height depends on the finish floor thickness above and below. Here are typical calculations for common situations:

Ceiling HeightTypical Total RiseRisers NeededActual Riser HeightTotal Run (11" tread)
8 ft ceiling~105–109"14–157.0–7.79"143–154" (11'11"–12'10")
9 ft ceiling~117–121"15–177.06–7.47"154–176" (12'10"–14'8")
10 ft ceiling~129–133"17–196.9–7.53"176–198" (14'8"–16'6")
Basement (7 ft)~93–97"13–146.64–7.46"132–143" (11'0"–11'11")

Total rise includes structural floor depth (typically 10–12" for joists + subfloor + finish flooring). Measure your actual dimension — never rely on plan dimensions alone.

Calculating Deck and Exterior Stairs

Exterior stairs for decks and porches follow the same calculation process as interior stairs, but with one important difference: the landing elevation changes seasonally due to frost heaving and soil settlement. On any exterior stair, build the landing grade 1 to 2 inches below your calculated total rise so minor settling does not create an oversize bottom riser over time.

Pressure-treated 2×12 stringers are standard for deck stairs. The 2×12 needs to be rated for ground contact (UC4A or UC4B) if it will sit within 6 inches of grade. Composite decking boards make excellent exterior treads — 5/4×6 boards at 11.25 inches wide fit a standard 11-inch tread with minimal cutting. Plan on two boards per tread for a 36-inch wide stair.

Exterior stair railing requirements match interior: 36-inch guardrail height with 4-inch maximum baluster spacing. In practice, most deck builders go to 42 inches because it looks more proportional on an elevated deck and provides better fall protection above 30 inches of deck height, where 42-inch rails are actually required by IRC.

Complete Material Takeoff for a 15-Step Interior Staircase

To illustrate the full material calculation, here is a complete takeoff for our 15-riser, 14-tread staircase (109" total rise, 11" treads, red oak finish, iron balusters). Prices based on Q1 2026 national averages from RSMeans Building Construction Cost Data:

MaterialQuantityUnit CostTotal
2×12 stringers (20 ft)3 boards$65–$85 ea$195–$255
Red oak treads (4', 1" thick)14 treads$45–$65 ea$630–$910
Poplar risers (4' × 7.5")15 risers$18–$28 ea$270–$420
Iron balusters (¾" square)~35 pcs$12–$18 ea$420–$630
Oak handrail (16 ft)1 piece$90–$140$90–$140
Newel posts (starting + landing)2–3 posts$85–$200 ea$170–$600
Stain, poly, sandpaper1 lot$80–$140$80–$140
Fasteners, glue, misc1 lot$40–$80$40–$80
Materials Total$1,895–$3,175
Finish carpenter labor (16–24 hrs)At $75–$100/hr$1,200–$2,400
Total Installed Cost$3,095–$5,575

Labor rates per RSMeans Q1 2026 data. Finish carpenter: $60–$90/hr base plus overhead and profit = $75–$110 fully loaded. Project includes layout, cutting, installation, and initial finish work.

The Stair Angle and How It Affects Everything

Stair angle is the arctangent of total rise divided by total run, expressed in degrees. Our 109-inch rise and 154-inch run example: angle = arctan(109/154) = arctan(0.708) = approximately 35.3 degrees. Comfortable residential stairs range from 30 to 38 degrees. The IRC-maximum stair (7.75" risers, 10" treads) calculates to arctan(7.75/10) = 37.8 degrees — workable but steep. The code minimum values are not the design targets; they are the outer boundary of legal construction.

Knowing the angle lets you set a sliding bevel or digital angle gauge to mark your cut lines directly on the stringer stock, which is faster and more accurate than measuring each cut individually. Set the bevel to 35.3 degrees and use it consistently on every stringer board. This approach also helps when cutting the plumb cut at the top of the stringer (where it bears against the header) and the level cut at the bottom (where it bears on the floor or rim joist).

Checking Headroom Before You Commit

Headroom is the vertical distance from the nosing of any tread to the ceiling or structural element directly above it. The IRC minimum is 6 feet 8 inches. For existing homes with lower ceilings, headroom often forces the staircase to start further out from the upper floor or limits the stair angle.

Here is how to verify headroom before cutting: draw the stair profile to scale on a piece of cardboard or use a layout on the subfloor. Mark the nosing locations at the stair angle. Draw a vertical line 6'8" above each nosing. If any of those lines intersect the ceiling framing or header above the stairwell opening, you have a headroom problem.

Headroom problems are solved in three ways: increasing the floor opening (requires structural framing work), lowering the starting point of the stair (requires more horizontal run), or reducing the stair angle (requires less riser height, which adds risers). None of these are cheap — which is why verifying headroom during layout, before cutting anything, is non-negotiable.

When to DIY and When to Hire a Stair Contractor

A simple exterior deck stair is within reach for a competent DIYer. The stakes are lower, the materials are forgiving, and the geometry is straightforward. If you can operate a circular saw accurately and use a framing square, you can build a three- to four-step deck stair.

Interior staircase replacement is a different matter. Per HomeAdvisor's 2025 True Cost Guide, homeowners who attempted DIY interior stair replacements spent an average of $2,100 more than estimated due to rework, failed inspections, and material waste from incorrect cuts. A finish carpenter who builds stairs regularly will complete the same job in 16 to 24 hours. An inexperienced DIYer may spend 40 to 60 hours — and still have code problems.

My recommendation: use a stair calculator to work out the dimensions and material quantities yourself. Then get a quote from a finish carpenter. If the labor quote is reasonable (roughly $1,200 to $2,400 for a standard 14-step interior stair), hire it out. Use the saved time and reduced rework risk to justify the cost.

Frequently Asked Questions

How do I calculate the number of stairs I need?

Divide the total rise (floor-to-floor height in inches) by your target riser height (typically 7 to 7.5 inches). Round up to the nearest whole number to get the number of risers. For example, 109 inches ÷ 7.25 = 15.03, so you need 15 risers. Then recalculate the actual riser height: 109 ÷ 15 = 7.27 inches per riser, which is within the IRC maximum of 7.75 inches.

What is the formula for stringer length?

Stringer length equals the square root of (total rise squared plus total run squared) — the Pythagorean theorem applied to stairs. If your total rise is 109 inches and total run is 154 inches (14 treads × 11 inches each), the stringer length is √(109² + 154²) = √35,597 = approximately 188.7 inches, or 15 feet 9 inches. Add 15–20% for top and bottom cut waste when purchasing lumber.

What is the maximum riser height per IRC code?

The International Residential Code (IRC Section R311.7.5) sets a maximum riser height of 7¾ inches (7.75 inches) and a minimum riser height of 4 inches for residential stairs. All risers in a single flight must be within ⅜ inch of each other. A riser even ½ inch taller than the others is a code violation and a tripping hazard that will fail inspection.

What is the comfort formula for stairs?

The stair comfort formula states that 2 × riser height + tread depth should equal 24 to 25 inches. A 7-inch riser with an 11-inch tread gives 2(7) + 11 = 25, which is ideal. The IRC minimum of 7.75-inch risers with 10-inch treads gives 25.5 — technically legal but steep. For the most comfortable stair, target 7 to 7.5-inch risers and 10.5 to 11.5-inch treads.

How much lumber do I need for stair stringers?

Most residential stairs use two or three 2×12 stringers. Add 20% to the calculated stringer length for waste from the top and bottom cuts. For a stringer length of 15 feet 9 inches, buy 20-foot 2×12 boards. A typical 14-step staircase needs two or three 2×12 boards at 16 to 20 feet each. The net depth at each notch cut must be at least 3.5 inches per IRC requirements.

Do I need a permit to build stairs?

New staircase construction and structural modifications typically require a building permit. Cosmetic work — refinishing treads, replacing balusters, painting — generally does not. Permit costs range from $100 to $500. Most jurisdictions require a framing inspection with stringers up before treads, and a final inspection after completion. See our building permit cost guide for jurisdiction-specific fee ranges.

How many steps are in a standard 8-foot ceiling?

An 8-foot ceiling with standard framing and flooring produces a total rise of roughly 105 to 109 inches. At a 7-inch riser, you need 15 risers and 14 treads. At 7.5-inch risers, you need 14 risers and 13 treads. Most builders target 13 to 15 steps for a standard story height. Always measure the actual floor-to-floor dimension — plan heights are not reliable for stair layout.

Run Your Stair Calculation Now

Enter your floor-to-floor height and get riser count, riser height, tread depth, stringer length, total run, and stringer lumber quantities — instantly and free.

Open the Stair Calculator

Related Articles