How it works
The calculator divides the total rise into equal risers no taller than the maximum you enter, then works out the run and the stringer.
Risers = ⌈ Total rise ÷ Maximum riser height ⌉
Riser height = Total rise ÷ Risers
Treads = Risers − 1
Total run = Treads × Tread depth
Stringer length = Risers × √(Riser height² + Tread depth²)
Angle = arctan(Riser height ÷ Tread depth)
⌈ ⌉ means rounding up. The stringer length is the hypotenuse of the total rise and the risers times the tread depth: the cut stringer’s top edge starts on the floor one tread depth in front of the first riser.
Code limits are notes, not advice
The International Residential Code, section R311.7.5 (quoted from the City of Boise’s IRC code handout), sets risers of not more than 7 3/4 in (196 mm), treads of not less than 10 in (254 mm), and no more than 3/8 in variation within a flight. The calculator fills these in as example values and shows a note when your figures go past them, but it does not check your design. Local codes are often amended, and stair width, headroom, handrails, guards and landings are all part of the same rules.
Board length
In the US system the calculator picks the shortest standard length that is not shorter than the stringer, from the 8 to 20 ft lengths in 2 ft steps listed in the Southern Forest Products Association’s specification guidelines. Leave some extra for the cuts at the top and bottom. In metric, choose from the lengths your supplier stocks.
Not included
Stringer size, the number of stringers, their spacing, how they attach at the top and bear at the bottom, treads, risers, handrails and guards are not part of this calculation. Take them from your plans, local code or a qualified professional.
Worked example
Inputs
- Total rise
- 40 in
- Maximum riser height
- 7 3/4 in
- Tread depth (run per step)
- 10 in
Result
- Risers
- 6
- Riser height
- 6.67 in
- Treads
- 5
- Total run
- 50 in (4.17 ft)
- Stringer length
- 6.01 ft (72.11 in)
- Board length to buy (US)
- 8 ft
- Stair angle (degrees)
- 33.7
Common mistakes
- Measuring the rise to the ground where the stairs start rather than where they land. If the ground slopes, measure at the spot of the bottom tread.
- Counting treads and risers as equal. A straight flight has one tread fewer than risers, because the upper floor or deck is the top step.
- Forgetting the tread thickness. Cut stringers are usually laid out on the bare stringer, and the bottom riser is shortened by the tread thickness so that every finished step is the same height.
- Buying a board as long as the total run. The stringer runs diagonally and is longer than the rise or the run.
- Taking stringer size, spacing and support from a calculator. Those come from local code, a deck guide such as AWC DCA 6 or a qualified professional.
Assumptions and limits
- A straight flight with equal risers and equal treads, with no landing in the middle.
- Risers = total rise ÷ maximum riser height, rounded up; every riser is then the total rise divided by that number.
- Treads = risers − 1, because the top step is the upper floor or deck.
- The stringer length is the hypotenuse of the total rise and risers × tread depth – the length of the cut stringer’s top edge from the floor to the top.
- Board lengths to buy are the US standard lengths from 8 to 20 ft in 2 ft steps. Nosings, tread thickness and top and bottom connections are not included.
- This is layout arithmetic, not a structural design.
Frequently asked questions
How do I calculate the number of stairs?
Divide the total rise by the largest riser height you may use and round up. A 40 in rise with a 7 3/4 in maximum gives 40 ÷ 7.75 = 5.16, so 6 risers of 6.67 in each and 5 treads.
What is the maximum riser height and minimum tread depth?
The International Residential Code, section R311.7.5, says risers may be no more than 7 3/4 in (196 mm) and treads no less than 10 in (254 mm). Many places amend these rules, so check the code that applies where you build.
How long does a stair stringer need to be?
Multiply the number of risers by the diagonal of one step. With 6 risers of 6.67 in and 10 in treads, each step’s diagonal is 12.02 in, so the stringer is about 72.1 in – a little over 6 ft before the top and bottom cuts. The shortest standard board for it is 8 ft.
How many stringers do I need?
That depends on the stair width, the tread material and the code or deck guide you follow. AWC’s DCA 6, for example, sets limits for cut stringers. This calculator lays out one stringer; the count comes from your plans.
Sources
- IRC Code Handout #437 – IRC Section R311.7.5: Stair Treads & Risers — City of Boise, Planning and Development Services. R311.7.5.1: "The riser height shall be not more than 7 ¾ inches (196 mm)", measured between the leading edges of adjacent treads; R311.7.5.2: "The tread depth shall be not less than 10 inches (254 mm)"; variation within a flight at most 3/8 in.
- Specifying Southern Pine Lumber – Specification Guidelines — Southern Forest Products Association. Dimension lumber is specified in standard lengths from 8 to 20 ft in two-foot increments.
- NIST Handbook 44, Appendix C – General Tables of Units of Measurement — National Institute of Standards and Technology. Exact unit definitions: 1 in = 2.54 cm, 1 yd³ = 27 ft³, 1 US gal = 231 in³, 1 lb = 0.45359237 kg.
Method reviewed November 5, 2026