Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Stair Calculator (Rise, Run, Number of Steps, Stringer Length and Angle)

Enter the total rise of the stairs (from the lower floor to the upper floor) and the tread depth. Choose the riser height either by a target value or by the number of steps.

Choose the unit from the dropdowns (mm, cm or m). If you choose "Include" for the tread thickness, it is subtracted from the stringer height and the first riser.
Result and figure
Enter the total rise of the stairs and the tread depth in the fields on the left and press "Calculate". The result will appear here.

What you can do on this page

  • Enter the total rise (the height from the lower floor to the upper floor) and the tread depth, and you get the riser height, the number of steps, the total run, the stringer length and the stair angle on the spot
  • Switch between two modes: "set a target riser height" or "set the number of steps". The stringer mounting (standard or flush) and the tread thickness can also be included
  • A comparison table shows how the riser height and the angle change if you add or remove steps
  • The result checks the stairs against the US residential code (IRC): a riser height of 7 3/4 in or less and a tread depth of 10 in or more
  • Optionally, enter the thickness of the upper floor and the length of the stairwell opening to find the headroom under the floor above, or the opening length you need for a given headroom
  • A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
The code check uses the IRC rules for stairs in homes (one- and two-family houses). Other buildings follow other codes, and states and cities may adopt different editions or local changes, so always confirm your design with your local building department or a professional. By default this page works in inches and feet; switch "Units" above the calculator to Metric to use mm, cm and m.

What is this calculation used for?

Planning the stairs for a new home or a remodel

In a house with a floor-to-floor height of 105 in (8 ft 9 in) and a target riser of 7.5 in, you get \(105 \div 7.5 = 14\) risers and 13 steps. With 10 in treads the total run is \(10 \times 13 = 130\) in (10 ft 10 in).
Seeing the trade-off in numbers ("one more step makes each riser lower, but the stairs grow about 10 in into the hall") helps you check the designer's proposals for yourself when you discuss the floor plan.

Checking the building code and safety (home safety)

The IRC stair rules for homes are a riser height of 7 3/4 in or less and a tread depth of 10 in or more. These are minimums: stairs right at the limits (7 3/4 in riser, 10 in tread) have an angle of \(\arctan(7.75 \div 10) \approx 37.8^\circ\), noticeably steeper than a comfortable stair.
Checking the rule of thumb "2 × riser + tread = 24 to 25 in" as well (\(2 \times 7.75 + 10 = 25.5\) in here, just over the range) lets you review the safety of the stairs, where many home accidents happen, in numbers.

Building steps for a deck or porch (DIY)

For a deck 32 in above the ground with a target riser of about 7.5 in, \(32 \div 7.5 \approx 4.27\) rounds to 4 risers, but \(32 \div 4 = 8\) in is over the 7 3/4 in limit. With 5 risers (4 treads), every riser is \(32 \div 5 = 6.4\) in.
Even for a few steps, working out "how high each step is when divided evenly" first keeps you from building uneven steps that people trip on. (Deck stairs in the US generally follow the same IRC rules as indoor stairs.)

Estimating lumber length for stair stringers

For stairs with a total run of 130 in and a stringer height of 97.5 in, the stringer length is \(\sqrt{130^2 + 97.5^2} = 162.5\) in, or 13 ft 6.5 in.
Lumber is usually sold in 2 ft steps (8, 10, 12, 14 and 16 ft), so this Pythagorean calculation tells you before you shop that a 12 ft board is too short and you need a 14 ft 2×12. The sloped board is longer than you might expect, so buying lumber by the horizontal distance alone often leaves you short.

Seeing how steep a loft or attic stair would be

If you try to fit stairs up to a loft 96 in high into a run of 60 in (6 treads of 10 in), the riser height is \(96 \div 7 \approx 13.71\) in and the angle is \(\arctan(13.71 \div 10) \approx 53.9^\circ\), close to a ladder.
Working out "what angle do I get in this space" first helps you decide between a regular stair, a ship ladder (alternating tread device) or a ladder. Which ones are allowed depends on the local code and how the space is used.

Checking the headroom when a floor hangs over the stairs

When a hallway or room upstairs covers part of the stairs, the space above your head gets tight near the top. For stairs with a 7.5 in riser and a 10 in tread, a 12 in thick floor and a 120 in stairwell opening, the headroom is \(7.5 \times 120 \div 10 - 12 = 78\) in (6 ft 6 in), 2 in short of the 6 ft 8 in the IRC requires.
For 80 in of headroom the opening must be \((80 + 12) \times 10 \div 7.5 \approx 122.67\) in, so you can discuss with numbers whether to lengthen the stairwell by about 2 3/4 in, make the stairs steeper or make the floor thinner (follow your local code and your designer for the required height).

Formulas and figures

Number of risers - from a target riser height
Figure
Standard notation (the usual math form)
\(n\) \(=\) \(\mathrm{round}\) \((\) \(H\) \(\div\) \(R\) \()\)
In words (symbols replaced with words)
④ \(n\): number of risers \(=\) ③ \(\mathrm{round}\) \((\) ① \(H\): total rise \(\div\) ② \(R\): target riser height \()\)
The formula in words
① Take the \(H\): total rise
② divide it by the \(R\): target riser height
③ round to the nearest whole number (\(\mathrm{round}\) means "round to the nearest whole number")
④ and you get the \(n\): number of risers
Quick example
For stairs with a total rise of 105 in (8 ft 9 in) and a target riser height of 7.5 in, the number of risers is
risers \(n\) \(=\) \(\mathrm{round}\) \((\) total rise (105 in) \(\div\) target riser (7.5 in) \()\)
\(105 \div 7.5 = 14\)
Key idea
The "number of risers" counts the vertical rises, and the "number of steps" counts the treads you step on. With the standard stringer mounting, the last rise takes you up onto the upper floor, so there is one fewer tread than risers: \(n - 1\) treads (with flush mounting, \(n\) treads). If the division does not come out even, round to get the number of risers and put the remainder into the first riser: first riser \(= H - R \times (n-1)\). For example, with a total rise of 110 in and a 7.5 in riser, \(110 \div 7.5 \approx 14.67\) rounds to 15 risers, and only the first riser is \(110 - 7.5 \times 14 = 5\) in. Note that the IRC says the tallest and shortest risers in a flight may differ by no more than 3/8 in, so a leftover this large is not allowed in the US. In that case, use the "Number of steps" mode to divide the total rise evenly (\(110 \div 15 \approx 7.33\) in for every riser).
Riser height - from the number of steps
Figure
Standard notation (the usual math form)
\(R\) \(=\) \(H\) \(\div\) \((\) \(s\) \(+\) \(1\) \()\)
In words (symbols replaced with words)
③ \(R\): riser height \(=\) ① \(H\): total rise \(\div\) \((\) ② \(s\): number of steps (treads) \(+\) \(1\) \()\)
The formula in words
① Take the \(H\): total rise
② divide it by the \(s\): number of steps (treads) plus 1 (= the number of risers)
③ and you get the \(R\): riser height
Quick example
For stairs with a total rise of 105 in and 13 steps (13 treads), the riser height is
riser height \(R\) \(=\) total rise (105 in) \(\div\) \((\) steps (13) \(+\) \(1\) \()\)
\(105 \div (13 + 1) = 105 \div 14 = 7.5\)
Key idea
Do not forget the "\(+1\)". With the standard stringer mounting, even with 13 treads you rise 14 times, including the last rise onto the upper floor. You divide the total rise by the number of risers (\(s + 1\)), not by the number of treads. This way the total rise is divided evenly, so there is no remainder and every riser, including the first, is the same height. This is what the US code wants: all risers in a flight within 3/8 in of each other. (With flush mounting, the number of risers equals the number of steps, so \(R = H \div s\).)
Total run (the horizontal length of the stairs)
Figure
Standard notation (the usual math form)
\(D\) \(=\) \(T\) \(\times\) \(s\)
In words (symbols replaced with words)
③ \(D\): total run \(=\) ① \(T\): tread depth \(\times\) ② \(s\): number of steps (treads)
The formula in words
① Take the \(T\): tread depth
② multiply it by the \(s\): number of steps (treads)
③ and you get the \(D\): total run
Quick example
The horizontal length (total run) of stairs with a 10 in tread depth and 13 steps is
total run \(D\) \(=\) tread depth (10 in) \(\times\) steps (13)
\(10 \times 13 = 130\)
Key idea
The total run is the horizontal distance from the bottom riser to the edge of the upper floor. Use it to check whether the stairs fit in the space you have (the length of the hall or the stairwell). Deeper treads or more steps make the stairs easier to climb, but the total run grows and takes more room. It is a trade-off. Here, 130 in is 10 ft 10 in.
Stringer length
Figure
Standard notation (the usual math form)
\(L\) \(=\) \(\sqrt{D^2 + K^2}\)
In words (symbols replaced with words)
② \(L\): stringer length \(=\) ① square root of the sum of the squares of \(D\): total run and \(K\): stringer height
The formula in words
① Take the square root of the sum of the squares of \(D\): total run and \(K\): stringer height (square each, add them and take the square root)
② and you get the \(L\): stringer length
Quick example
With a total run of 130 in and a stringer height of 97.5 in (105 − 7.5), the stringer length is
stringer length \(L\) \(=\) square root of the sum of squares (130² + 97.5²)
\(L = \sqrt{130^2 + 97.5^2} = \sqrt{16900 + 9506.25} = \sqrt{26406.25} = 162.5\)
Key idea
A stringer is the sloped structural board that supports the treads. It is the hypotenuse of a right triangle that spans the total run \(D\) horizontally and the stringer height \(K\) vertically, so its length comes from the Pythagorean theorem. Here the sides are in the ratio 3:4:5 (97.5 : 130 : 162.5), so the answer comes out exact: 162.5 in = 13 ft 6.5 in. The stringer height \(K\) depends on the mounting. With the standard mounting, the stringer only needs to reach one riser below the upper floor, so \(K = H - R\). With flush mounting, it reaches the upper floor, so \(K = H\). If you include the tread thickness, subtract it as well.
Stair angle
Figure
Standard notation (the usual math form)
\(\theta\) \(=\) \(\arctan\) \((\) \(R\) \(\div\) \(T\) \()\)
In words (symbols replaced with words)
④ \(\theta\): stair angle \(=\) ③ \(\arctan\) \((\) ① \(R\): riser height \(\div\) ② \(T\): tread depth \()\)
The formula in words
① Take the \(R\): riser height
② divide it by the \(T\): tread depth to get how steep each step is (a ratio)
③ turn that ratio into an angle (\(\arctan\) is the inverse trig function that finds an angle from a slope ratio)
④ and you get the \(\theta\): stair angle
Quick example
The angle of stairs with a 7.5 in riser height and a 10 in tread depth is
stair angle \(\theta\) \(=\) \(\arctan\) \((\) riser (7.5 in) \(\div\) tread depth (10 in) \()\)
\(7.5 \div 10 = 0.75\)
\(\arctan(7.5 \div 10) \approx 36.87^\circ\)
Key idea
The angle comes from the ratio of one riser to one tread. If the remainder of the rise was put into the first riser, the slope of the whole stringer (\(\arctan(K \div D)\)) can differ slightly, but what matters for how steep the stairs feel is the ratio of each step. At the IRC limits (a 7 3/4 in riser and a 10 in tread), the angle is \(\arctan(7.75 \div 10) \approx 37.78^\circ\), so code-compliant house stairs are no steeper than about 38°. A common rule of thumb for comfortable stairs is "2 × riser + tread = 24 to 25 in" (for a 7.5 in riser and a 10 in tread, \(2 \times 7.5 + 10 = 25\) in, within the range).
Headroom - the height up to the floor that hangs over the stairs
Figure
Standard notation (the usual math form)
\(h_c\) \(=\) \(R\) \(\times\) \(L_o\) \(\div\) \(T\) \(-\) \(t_f\)
In words (symbols replaced with words)
⑤ \(h_c\): headroom \(=\) ① \(R\): riser height \(\times\) ② \(L_o\): stairwell opening length \(\div\) ③ \(T\): tread depth \(-\) ④ \(t_f\): upper floor thickness
The formula in words
① Take the \(R\): riser height
② multiply it by the \(L_o\): stairwell opening length
③ divide by the \(T\): tread depth to see how far the nosing line has dropped below the upper floor, right below the edge of the opening
④ subtract the \(t_f\): upper floor thickness
⑤ and you get the \(h_c\): headroom
Quick example
For stairs with a 7.5 in riser and a 10 in tread, under a 12 in thick upper floor with a 120 in stairwell opening, the headroom is
headroom \(h_c\) \(=\) riser (7.5 in) \(\times\) opening (120 in) \(\div\) tread depth (10 in) \(-\) floor thickness (12 in)
\(7.5 \times 120 \div 10 = 90\)
\(90 - 12 = 78\)
Key idea
When the upper floor (a hallway or a room) hangs over the stairs, the space above your head gets tight near the top. This formula finds the vertical distance between the nosing line (the sloped line that joins the front edges of the treads) and the underside of the floor above (the ceiling), right below the "edge of the opening" where the ceiling begins. The nosing line drops one riser \(R\) for every tread \(T\), so at a point \(L_o\) back from the edge of the upper floor it is \(\dfrac{\text{riser height} \times \text{opening length}}{\text{tread depth}}\) below the upper floor. The ceiling is lower than the upper floor by the floor thickness \(t_f\), and the difference is the headroom. As a reference, the result also shows the height from the tread directly below the edge of the opening to the ceiling (measured from the surface you actually stand on, not from the nosing line). With flush mounting, the top tread is level with the upper floor, so the nosing line starts one tread earlier and you use \(L_o - T\) instead of \(L_o\). If the opening is longer than the total run \(D\), the point below the edge of the opening is the floor in front of the stairs, so the headroom is simply the lower floor to the ceiling, \(H - t_f\). In this example the headroom is 78 in (6 ft 6 in), 2 in short of the 6 ft 8 in (80 in) that the IRC requires. Enter the height your code requires in the "Required headroom" field.
Opening length needed - worked back from the headroom
Figure
Standard notation (the usual math form)
\(L_{\mathrm{req}}\) \(=\) \((\) \(h_{\mathrm{req}}\) \(+\) \(t_f\) \()\) \(\times\) \(T\) \(\div\) \(R\)
In words (symbols replaced with words)
⑤ \(L_{\mathrm{req}}\): opening length needed \(=\) \((\) ① \(h_{\mathrm{req}}\): required headroom \(+\) ② \(t_f\): upper floor thickness \()\) \(\times\) ③ \(T\): tread depth \(\div\) ④ \(R\): riser height
The formula in words
① Take the \(h_{\mathrm{req}}\): required headroom
② add the \(t_f\): upper floor thickness to see how far the nosing line must drop below the upper floor at the edge of the opening
③ multiply by the \(T\): tread depth
④ divide by the \(R\): riser height
⑤ and you get the \(L_{\mathrm{req}}\): opening length needed
Quick example
For stairs with a 7.5 in riser, a 10 in tread and a 12 in thick upper floor, the stairwell opening you need for 80 in (6 ft 8 in) of headroom is
opening needed \(L_{\mathrm{req}}\) \(=\) \((\) required headroom (80 in) \(+\) floor thickness (12 in) \()\) \(\times\) tread depth (10 in) \(\div\) riser (7.5 in)
\(80 + 12 = 92\)
\(92 \times 10 \div 7.5 \approx 122.67\)
Key idea
This is the headroom formula solved for the opening length \(L_o\). If the opening reaches the point where the nosing line is \(h_{\mathrm{req}} + t_f\) below the upper floor, the height to the ceiling there is exactly \(h_{\mathrm{req}}\). The nosing line drops one riser for every tread, so the horizontal distance you need is the drop multiplied by \(\dfrac{\text{tread depth}}{\text{riser height}}\). A longer opening means cutting back the upper floor to widen the stairwell. In this example the opening must grow from 120 in to about 122.67 in. If the length you need is longer than the total run \(D\), the opening must extend over the floor in front of the stairs. If you cannot lengthen the opening, the only other options are a taller riser (steeper stairs, so the nosing line drops sooner) or a thinner floor. Once again, how gentle the stairs are and how big the stairwell is are a trade-off. With flush mounting, the nosing line starts one tread earlier, so add \(T\) to the length you need.
Stair design starts with dividing the total rise evenly by the number of risers to get the riser height. The total run is tread depth × number of steps, the stringer length comes from the Pythagorean theorem, and the angle is the arctan of riser ÷ tread. In US homes, the IRC sets a riser height of 7 3/4 in or less and a tread depth of 10 in or more. When a floor hangs over the stairs, check the headroom with riser × opening length ÷ tread − floor thickness, and lengthen the opening if it falls short of 6 ft 8 in.

Symbols and terms

Symbols

\(H\) aitch The total rise of the stairs - the vertical distance from the finished lower floor to the finished upper floor. (Example - 105 in from the first floor to the second)
\(R\) ar The riser height - the vertical distance of one step.
\(T\) tee The tread depth - the horizontal depth of the surface you step on.
\(n\) en The number of risers - the number of vertical rises. With the standard mounting, it is one more than the number of steps.
\(s\) ess The number of steps (treads) - the number of surfaces you step on. In everyday speech, people often count the risers instead ("a 14-step staircase" for one with 14 risers), but on this page "number of steps" means the number of treads.
\(D\) dee The total run - the horizontal length the stairs take up. It is found with \(D = T \times s\).
\(K\) kay The stringer height - the vertical height the stringer covers. It is \(H - R\) with the standard mounting and \(H\) with flush mounting.
\(L\) ell The stringer length. It is found with \(L = \sqrt{D^2 + K^2}\) (the Pythagorean theorem).
\(t\) lowercase tee The tread thickness. If you include it, it is subtracted from the stringer height and the first riser.
\(t_f\) tee sub eff The upper floor thickness - from the finished upper floor down to the ceiling seen from the stairs (the underside of the floor). The f stands for "floor"; it is a different quantity from the tread thickness \(t\).
\(L_o\) ell sub oh The stairwell opening length - the horizontal distance from the edge of the upper floor to the edge of the floor that hangs over the stairs. The o stands for "opening"; it is a different quantity from the stringer length \(L\).
\(h_c\) aitch sub cee The headroom - the height measured straight up from the nosing line to the ceiling, right below the edge of the opening. It is found with \(h_c = R \times L_o \div T - t_f\). The c stands for "clearance".
\(h_{\mathrm{req}}\) aitch sub req The required headroom - the height you want right below the edge of the opening, set by the code (6 ft 8 in under the IRC), local rules or your designer. "req" is short for "required".
\(L_{\mathrm{req}}\) ell sub req The opening length needed - the stairwell opening that gives the required headroom. It is found with \(L_{\mathrm{req}} = (h_{\mathrm{req}} + t_f) \times T \div R\).
\(\theta\) theta The stair angle (pitch). It is found with \(\theta = \arctan(R \div T)\).
\(\sqrt{x}\) square root of x The square root - the value that gives the number when squared. (Example - \(\sqrt{25} = 5\))
\(\arctan\) arctangent The function that finds an angle from its tangent (the slope ratio). On a scientific calculator it is often shown as tan⁻¹. (Example - \(\arctan(1) = 45^\circ\))

Terms

riser height The height of one step (a vertical distance), also called the rise. The larger it is, the higher each step up and the steeper and more tiring the stairs. The IRC limits it to 7 3/4 in in homes.
tread depth The horizontal depth of the surface you step on, also called the run of one step. If it is too small, your foot does not fit well and you can slip off. The IRC requires at least 10 in in homes, measured from nosing to nosing.
riser The vertical part of a step (the rise between one tread and the next). On this page, the "number of risers" is the number of rises, which is one more than the number of steps (treads) with the standard mounting.
stringer The sloped structural board on each side of the stairs that supports the treads. In wood stairs, a board (often a 2×12) is set at an angle and cut into a sawtooth shape, and the treads sit on the cuts.
tread thickness The thickness of the tread board you step on. Wood treads are often about 1 in thick, and the thickness changes how the stringer must be cut and placed.
flush mounting Mounting the stringer so that its top is level with the upper floor. Compared with the standard mounting (one step below the upper floor), it adds one step.
pitch How steep something is. For stairs it is the ratio riser ÷ tread, or the angle found from it. The larger the number, the steeper the stairs.
IRC (International Residential Code) The model building code for one- and two-family homes, adopted by most US states (often with local changes). Its stair rules (section R311.7) include a riser height of 7 3/4 in or less, a tread depth of 10 in or more, a width of at least 36 in, headroom of at least 6 ft 8 in, and risers in a flight within 3/8 in of each other.
headroom The height of the free space above the head of someone using the stairs. On this page, it is measured straight up from the nosing line (the line joining the front edges of the treads) to the underside of the floor above, and it is smallest right below the edge of the opening where the ceiling begins.
stairwell opening The hole in the upper floor that the stairs pass through (the part with no floor). On this page, the "stairwell opening length" is the horizontal distance from the edge of the upper floor to the edge of the floor that hangs over the stairs.
nosing line The sloped line that joins the front edges (nosings) of the treads. It shows the slope of the stairs, and headroom and handrail height are usually measured straight up from it. For each step it moves forward one tread depth and rises one riser height.

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.

Division and rounding (Grades 4–5)
  • Understanding the division "split the total rise evenly by the number of risers"
  • Being able to round to the nearest whole number
Converting units of length (Grades 4–5)
  • Knowing that 1 ft = 12 in, and being able to put everything in the same unit before calculating (for example, 8 ft 9 in = 105 in)
The Pythagorean theorem (Grade 8)
  • Knowing that the hypotenuse of a right triangle is \(\sqrt{a^2 + b^2}\)
  • Knowing right triangles with whole-number ratios such as 3:4:5 makes checking faster
Trigonometric ratios and tangent (Geometry, high school)
  • Knowing that the tangent is "height ÷ base" (the slope ratio)
  • Knowing that \(\arctan\) (tan⁻¹) finds the angle from the ratio (a scientific calculator can do the arithmetic)
Ratios and trade-offs (Grades 6–7)
  • Knowing that the ratio of riser to tread decides how steep the stairs are
  • Being able to follow with formulas how "more steps make each step easier but the total run longer"
Proportional relationships and similar triangles (Grades 6–8)
  • Seeing that the nosing line drops one riser for every tread (a constant rate), so you can find the drop from a horizontal distance with a proportion

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to find the number of risers and steps (from a target riser height)
Total rise H (in) 105
Target riser height R (in) 7.5
Number of risers n =ROUND(B1/B2,0)
Number of steps (standard mounting) =B3-1
First riser height (in) =B1-B2*(B3-1)
Table to find the riser height (from the number of steps)
Total rise H (in) 105
Number of steps (treads) s 13
Riser height R (in) =B1/(B2+1)
Table to find the total run
Tread depth T (in) 10
Number of steps (treads) s 13
Total run D (in) =B1*B2
Table to find the stringer length
Total run D (in) 130
Stringer height K (in) 97.5
Stringer length L (in) =SQRT(B1^2+B2^2)
Table to find the stair angle
Riser height R (in) 7.5
Tread depth T (in) 10
Stair angle (degrees) =DEGREES(ATAN(B1/B2))
Table to find the headroom
Riser height R (in) 7.5
Tread depth T (in) 10
Stairwell opening length L_o (in) 120
Upper floor thickness t_f (in) 12
Headroom h_c (in) =B1*B3/B2-B4
Table to find the opening length needed
Required headroom h_req (in) 80
Upper floor thickness t_f (in) 12
Tread depth T (in) 10
Riser height R (in) 7.5
Opening length needed L_req (in) =(B1+B2)*B3/B4
After pasting, the upper rows of column B are your inputs and the lower rows are calculated automatically.
"ROUND(value, 0)" rounds to the nearest whole number, "SQRT" is the square root, "ATAN" finds an angle from a slope ratio (the result is in radians), and "DEGREES" turns radians into degrees.
In the first table B3 is 14, B4 is 13 steps and B5 is 7.5 in. In the second table B3 is 7.5 in, in the third 130 in, in the fourth 162.5 in and in the fifth about 36.87 degrees. Just replace the numbers in column B with your own.
The sixth table gives the headroom (B5 is 78 in) and the seventh the opening length needed (B5 is about 122.67 in). Both use the standard mounting. For flush mounting, in the sixth table enter the opening length minus one tread depth in B3, and in the seventh table add one tread depth to the result in B5.

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to find the number of risers and steps (from a target riser height)
Total rise H (in) 105
Target riser height R (in) 7.5
Number of risers n =ROUND(B1/B2,0)
Number of steps (standard mounting) =B3-1
First riser height (in) =B1-B2*(B3-1)
Table to find the riser height (from the number of steps)
Total rise H (in) 105
Number of steps (treads) s 13
Riser height R (in) =B1/(B2+1)
Table to find the total run
Tread depth T (in) 10
Number of steps (treads) s 13
Total run D (in) =B1*B2
Table to find the stringer length
Total run D (in) 130
Stringer height K (in) 97.5
Stringer length L (in) =SQRT(B1^2+B2^2)
Table to find the stair angle
Riser height R (in) 7.5
Tread depth T (in) 10
Stair angle (degrees) =DEGREES(ATAN(B1/B2))
Table to find the headroom
Riser height R (in) 7.5
Tread depth T (in) 10
Stairwell opening length L_o (in) 120
Upper floor thickness t_f (in) 12
Headroom h_c (in) =B1*B3/B2-B4
Table to find the opening length needed
Required headroom h_req (in) 80
Upper floor thickness t_f (in) 12
Tread depth T (in) 10
Riser height R (in) 7.5
Opening length needed L_req (in) =(B1+B2)*B3/B4
The same formulas as in Excel (including the ROUND, SQRT, ATAN and DEGREES functions) work as is. Copy the whole table, paste it into cell A1, and replace the numbers in column B with your own.

How to calculate it in Python

import math

total_rise_in = 105     # total rise (lower floor to upper floor)
tread_in = 10           # tread depth
target_riser_in = 7.5   # target riser height

# number of risers = total rise / riser height, rounded
# Python's round() rounds .5 to the nearest even number, so use floor(x + 0.5) to round half up
num_risers = math.floor(total_rise_in / target_riser_in + 0.5)
steps = num_risers - 1                                             # number of steps (standard mounting)
first_riser_in = total_rise_in - target_riser_in * (num_risers - 1)  # remainder goes into the first riser

total_run_in = tread_in * steps                                    # total run
stringer_height_in = total_rise_in - target_riser_in               # stringer height (standard mounting)
stringer_length_in = math.sqrt(total_run_in ** 2 + stringer_height_in ** 2)  # Pythagorean theorem
angle_deg = math.degrees(math.atan(target_riser_in / tread_in))    # stair angle

# headroom under a floor that hangs over the stairs (standard mounting)
floor_thickness_in = 12     # upper floor thickness (finished floor to the ceiling below)
opening_length_in = 120     # stairwell opening (edge of the upper floor to the overhanging floor)
headroom_required_in = 80   # headroom you want (IRC: 6 ft 8 in = 80 in)
headroom_in = target_riser_in * opening_length_in / tread_in - floor_thickness_in
opening_required_in = (headroom_required_in + floor_thickness_in) * tread_in / target_riser_in

print(f"Number of steps (treads): {steps}")
print(f"Riser height: {target_riser_in} in (first riser {first_riser_in} in)")
print(f"Total run: {total_run_in} in")
print(f"Stringer height: {stringer_height_in} in")
print(f"Stringer length: {stringer_length_in:.2f} in")
print(f"Stair angle: {angle_deg:.2f} degrees")
print(f"Headroom: {headroom_in:.2f} in")
print(f"Opening length needed: {opening_required_in:.2f} in")
Runs with the standard library only. math.sqrt() is the square root (the Pythagorean theorem), and math.atan() and math.degrees() calculate the angle. Replace the total rise, tread depth and riser height at the top with your own numbers and run it. The second half is the headroom, "riser × opening length ÷ tread − floor thickness", and the opening length worked back from it. If no floor hangs over the stairs, you do not need this part.

How to write it in LaTeX and other math languages (copy and paste)

Number of risers - from a target riser height
n = round(H ÷ R)
n = \mathrm{round}\left( \frac{H}{R} \right)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>n</mi>
    <mo>=</mo>
    <mi>round</mi>
    <mo>&#x2061;</mo>
    <mrow>
      <mo>(</mo>
      <mfrac><mi>H</mi><mi>R</mi></mfrac>
      <mo>)</mo>
    </mrow>
  </mrow>
</math>
n = round(H / R)
Round[h/r]
n := round(H/R);
n = round(H/R);
n = round(H/R)
Riser height - from the number of steps
R = H ÷ (s + 1)
R = \frac{H}{s + 1}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>R</mi>
    <mo>=</mo>
    <mfrac>
      <mi>H</mi>
      <mrow><mi>s</mi><mo>+</mo><mn>1</mn></mrow>
    </mfrac>
  </mrow>
</math>
R = H / (s + 1)
h/(s + 1)
R := H/(s + 1);
R = H/(s + 1);
R = H/(s + 1)
Total run (the horizontal length of the stairs)
D = T × s
D = T \times s
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>D</mi>
    <mo>=</mo>
    <mi>T</mi>
    <mo>&#xD7;</mo>
    <mi>s</mi>
  </mrow>
</math>
D = T * s
t*s
d := T*s;
D = T*s;
D = T × s
Stringer length
L = √(D² + K²)
L = \sqrt{D^2 + K^2}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>L</mi>
    <mo>=</mo>
    <msqrt>
      <mrow>
        <msup><mi>D</mi><mn>2</mn></msup>
        <mo>+</mo>
        <msup><mi>K</mi><mn>2</mn></msup>
      </mrow>
    </msqrt>
  </mrow>
</math>
L = sqrt(D^2 + K^2)
Sqrt[d^2 + k^2]
L := sqrt(d^2 + K^2);
L = sqrt(D^2 + K^2);
L = √(D^2 + K^2)
Stair angle
θ = arctan(R ÷ T)
\theta = \arctan\left( \frac{R}{T} \right)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>&#x3B8;</mi>
    <mo>=</mo>
    <mi>arctan</mi>
    <mo>&#x2061;</mo>
    <mrow>
      <mo>(</mo>
      <mfrac><mi>R</mi><mi>T</mi></mfrac>
      <mo>)</mo>
    </mrow>
  </mrow>
</math>
theta = arctan(R / T)
ArcTan[r/t]/Degree
theta := arctan(R/T)*180/Pi;
theta = atand(R/T);
θ = arctan(R/T)
Headroom - the height up to the floor that hangs over the stairs
h_c = R × L_o ÷ T − t_f
h_c = \frac{R \, L_o}{T} - t_f
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msub><mi>h</mi><mi>c</mi></msub>
    <mo>=</mo>
    <mfrac>
      <mrow><mi>R</mi><mo>&#x2062;</mo><msub><mi>L</mi><mi>o</mi></msub></mrow>
      <mi>T</mi>
    </mfrac>
    <mo>-</mo>
    <msub><mi>t</mi><mi>f</mi></msub>
  </mrow>
</math>
h_c = R * L_o / T - t_f
r*lo/t - tf
h_c := R*L_o/T - t_f;
h_c = R*L_o/T - t_f;
h_c = R L_o/T − t_f
Opening length needed - worked back from the headroom
L_req = (h_req + t_f) × T ÷ R
L_{\mathrm{req}} = \frac{(h_{\mathrm{req}} + t_f) \, T}{R}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msub><mi>L</mi><mi>req</mi></msub>
    <mo>=</mo>
    <mfrac>
      <mrow>
        <mo>(</mo>
        <msub><mi>h</mi><mi>req</mi></msub>
        <mo>+</mo>
        <msub><mi>t</mi><mi>f</mi></msub>
        <mo>)</mo>
        <mo>&#x2062;</mo>
        <mi>T</mi>
      </mrow>
      <mi>R</mi>
    </mfrac>
  </mrow>
</math>
L_req = (h_req + t_f) * T / R
(hreq + tf)*t/r
L_req := (h_req + t_f)*T/R;
L_req = (h_req + t_f)*T/R;
L_req = (h_req + t_f) T/R

How to have ChatGPT  do the calculation

You are a stair dimension calculation assistant. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

I am building stairs with a total rise of 105 inches (from the first floor to the second floor), a tread depth of 10 inches and a target riser height of 7.5 inches. The stringers use the standard mounting (up to one step below the upper floor).
Find each of the following:
1. The number of risers = total rise ÷ riser height, rounded to the nearest whole number, and the number of steps (treads) = number of risers − 1
2. The first riser height (total rise − riser height × (number of risers − 1))
3. The total run (tread depth × number of steps)
4. The stringer length (√(total run² + stringer height²), where stringer height = total rise − riser height)
5. The stair angle (arctan(riser height ÷ tread depth) in degrees)
6. Whether the stairs meet the IRC rules for homes (riser height 7 3/4 inches or less, tread depth 10 inches or more)
7. With a 12-inch thick upper floor and a 120-inch stairwell opening, the headroom (riser height × opening length ÷ tread depth − floor thickness), and the opening length needed for 80 inches of headroom ((80 + floor thickness) × tread depth ÷ riser height)

Show the formulas you used and the numbers from the execution result.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.