What is a stair calculator?

A stair calculator works out the geometry of a flight of stairs from the total rise, the floor-to-floor height the stair has to climb, and the tread depth you want each step to have. From those it derives the number of risers, the actual riser height shared equally by every step, the number of treads, the total run, the stringer length and the stair angle, and checks the result against residential code limits and the comfort rules that make a stair feel right. People search for it as a stair calculator, stringer calculator, stair stringer calculator, stair rise and run calculator or number of steps calculator; the underlying maths is one set of equations.

Stairs are unforgiving arithmetic. A deck that is one board short is an errand; a stair whose last riser is half an inch taller than the rest is a trip hazard felt in the ankles on every climb, for the life of the building. Codes limit the difference between the tallest and shortest riser in a flight to 0.375 in for exactly that reason. The only way to guarantee even risers is to do the division in the right order: choose a whole number of risers first, then let the riser height be whatever the total rise divided by that count says it is. That ordering is what most hand calculations get backwards, and it is what this stair calculator enforces on every run.

One worked example runs through the whole guide and the calculator opens with it pre-filled: a total rise of 108 in (a 9 ft floor-to-floor height), a target riser of 7.5 in and a tread depth of 10.5 in. Its answers are 15 risers at 7.200 in, 14 treads, a total run of 147 in, 2R + T of 24.9 in, an angle of 34.44 degrees and a stringer length of 182.41 in, each derived by hand below so you can check the method first. A deck stair example follows further down, because a deck stair calculator is this same tool with the deck height as the total rise.

How this stair and stringer calculator works

Quick answer: Risers = total rise divided by target riser height, rounded up. Actual riser = total rise divided by risers. Treads = risers - 1. Total run = treads x tread depth. Stringer length = square root of (total rise squared + total run squared). Angle = arctangent of (actual riser / tread depth). 2R + T = 2 x actual riser + tread depth.

The inputs fall into three groups. The total rise comes first and must be right: finished floor to finished floor, including the flooring in place when the stair is used, at both levels. A half inch of hardwood added after the stair is built is a half inch added to the first riser or taken from the last. The second group is the design choice: a target riser height, turned into a riser count by rounding up, or an exact number of risers forced to fit a fixed opening. The third group is the tread depth, with an optional total run available field that warns you when the designed stair is longer than your space.

Everything else is derived in a fixed order that mirrors stringer layout. The riser count is settled first and never revisited. The actual riser height is the total rise divided by that count, reported to three decimals because rounding early compounds. Treads follow from risers, total run from treads and depth, stringer length and angle from rise and run together. Finally the checks run: actual riser against the IRC maximum, tread depth against the IRC minimum, and 2R + T against the comfort band.

The worked example: a 108 inch floor-to-floor rise, step by step

Start with the riser count. The total rise is 108 in and the target is 7.5 in, so the raw count is 108 / 7.5 = 14.4 risers. A flight cannot contain four tenths of a riser, and rounding down to 14 would push the actual riser to 7.714 in, legal but steep. Rounding up gives 15 risers, and the actual riser height becomes 108 / 15 = 7.200 in, exactly, on every step. That single decision, round up and re-divide, is the whole secret of even stairs.

Treads and run come next. The upper floor is the last tread, so treads = 15 - 1 = 14. At a tread depth of 10.5 in, the total run is 14 x 10.5 = 147 in, which is 12 ft 3 in of floor space the staircase will occupy, measured from the face of the first riser to the edge of the upper floor. The comfort check is 2R + T = 2 x 7.200 + 10.5 = 24.9 in, inside the 24 to 25 in band. The angle is arctangent of 7.200 / 10.5 = 34.44 degrees. And the stringer length along the pitch line is the square root of 108 squared plus 147 squared: 108 squared is 11,664, 147 squared is 21,609, the sum is 33,273, and the square root is 182.41 in, about 15.2 ft.

StepWorkingResult
Raw riser count108 in / 7.5 in target14.4
Risers (rounded up)ceil(14.4)15 risers
Actual riser height108 in / 157.200 in
Treads15 risers - 114 treads
Total run14 x 10.5 in147 in
2R + T comfort check2 x 7.200 + 10.524.9 in (pass)
Stair anglearctan(7.200 / 10.5)34.44 degrees
Stringer length (pitch line)sqrt(108 x 108 + 147 x 147)182.41 in

The same rounding holds at other sizes: a 96 in rise with a 7 in target gives 13.71, rounds to 14 risers and an actual riser of 6.857 in; a 2,600 mm rise with a 170 mm target gives 16 risers at 162.5 mm. The warning path matters too: force a 60 in rise into 7 risers and the actual riser is 8.571 in, above the 7.75 in maximum, and the calculator says so rather than quietly printing a stair you should not build.

Risers: why every riser must be equal

People do not look at their feet on a familiar stair. Climbing is a rhythm the body learns in the first two steps and then trusts, which is why one different riser is so dangerous: the foot arrives where the rhythm says the step should be, and finds air or extra height. Codes encode this directly: under the IRC, the greatest riser height within any flight may not exceed the smallest by more than 0.375 in (9.5 mm), and the same tolerance applies to tread depths. A well built stair does far better, because its risers are never individually measured: they are one number, total rise divided by riser count, marked along the stringer with a story pole.

This is why the calculator reports the actual riser height to three decimals. 7.200 in is exact for the worked example, but 96 / 14 = 6.857142 in is not a number a tape holds. Work in the fraction your tools resolve, or mark a story pole directly from the division. What you must never do is round each riser to a friendly number and mark them independently: 14 risers at 6.875 in climb 96.25 in, and the missing quarter inch lands, whole, on the last step.

The first and last risers are where finished-floor mistakes live. If the lower floor gains 0.75 in of tile and underlayment after the stringer is cut, the first riser grows by that much and the rhythm breaks at the step where users are least braced for it. Measure with finished surfaces in mind. The Flooring Calculator and the Tile Calculator help estimate the material build-up that sets that finished height.

Treads, run and the space a staircase eats

Tread depth is the horizontal distance from the nose of one tread to the nose of the next, and it decides both comfort and footprint. The IRC residential minimum is 10 in, but that figure assumes a nosing projection; without one the practical minimum is 11 in, which most builders treat as the real floor for a main stair. Deeper treads are kinder on the way down, and they cost run: on the worked example, moving from 10.5 in to 11 in treads lengthens the stair from 147 in to 154 in, seven inches that must exist in the room, the opening and the headroom calculation.

The total run available field exists because that trade is usually discovered too late. Enter the horizontal space you genuinely have and the calculator compares it with the run your choices require. If the design does not fit, the honest fixes are limited: a slightly taller riser if the code maximum allows it, the minimum tread depth, a landing turn, or a larger opening. Squeezing one or two treads narrower than the rest is exactly what the 0.375 in uniformity rule forbids. A Square Footage Calculator shows how much of a room a straight run consumes at the sketch stage.

People also ask: how much space do I need for a staircase?
For a straight flight, plan on the total run plus room to step on and off at both ends. The worked example needs 147 in of run for a 108 in rise at comfortable proportions, roughly 12 to 13 ft of horizontal space plus landing clearance, and at least 36 in of width and 6 ft 8 in of headroom under the IRC. Taller floor-to-floor heights or shallower angles need proportionally more room, which is why stairs are planned before rooms, not fitted into them afterwards.

The 2R + T rule and stair comfort

Quick answer: 2R + T means twice the riser height plus the tread depth. A total of about 24 to 25 in (610 to 635 mm) matches a natural walking stride and feels comfortable. The worked example gives 24.9 in. Below 24 in a stair feels mincing; above 25 in it feels like a climb.

The 2R + T rule is the oldest comfort formula in stair design, usually credited to the seventeenth century architect Francois Blondel. It survives because it describes something real: a step spends most of its energy on lifting, so a taller riser must be paid for with a shorter tread if the stride is to stay natural. Twice the riser plus the tread approximates that stride length. No inspector measures it, but it reliably predicts which of two code-legal stairs people will call comfortable and which they will call steep.

Two companion rules are worth knowing: riser plus tread should total about 17 to 18 in, and riser times tread should land near 70 to 75 square inches. No design satisfies every rule exactly, which is why this page leads with 2R + T. The comfort window they all point at is the same: risers of about 7 to 7.5 in, treads of 10.5 to 11.5 in, angles in the low to mid thirties. Code is a safety floor, not a comfort target: a stair built exactly at the maximum riser and minimum tread, 2R + T = 25.5 in at 37.8 degrees, is legal and tiring in equal measure.

Stringer length: the pitch line, honestly explained

The stringer is the inclined board that carries the treads and risers, and its length is the figure people most often get wrong, because two different lengths both claim the name. The first is the pitch-line length: the hypotenuse of the whole flight, the square root of total rise squared plus total run squared. For the worked example that is the square root of 33,273, which is 182.41 in. This is the length of the straight line from the foot of the flight to the top floor edge, and it is the figure this calculator reports as the stringer length, because it is the conservative number for ordering material: a board that covers the pitch line, with layout allowance, is long enough.

The second figure is the nosing-to-nosing diagonal. One step forms its own small right triangle whose hypotenuse in the worked example is the square root of 7.200 squared plus 10.5 squared, which is 12.731 in. Times the 14 treads that gives 178.24 in: the distance along the slope from the first tread nosing to the last, the line a handrail parallels. It is shorter than the pitch-line length by about 4.17 in because it starts at the first nosing, one riser up, rather than at the floor. Neither figure is a mistake; they measure different lines.

For buying the board, use the pitch-line figure and round up to a stocked length with room for the cuts: 182.41 in is 15.2 ft, so a 16 ft blank is the practical order for the worked example. Stringers are commonly cut from 2x12 stock so enough uncut depth remains below the tread notches to carry the load; that throat depth is a structural matter code and span tables govern, and one reason this page reports lengths but does not certify stringer stock. The Board Foot Calculator prices the lumber once you know the blank size, and the Roof Pitch Calculator cross-checks the angle in pitch terms.

Stair angle: what feels right

The stair angle is the arctangent of riser over tread, the slope of the pitch line, and it summarises the design in one number. The worked example sits at 34.44 degrees. As a field guide: below about 30 degrees a stair feels generous and consumes a great deal of run; 30 to 35 degrees is the comfortable heartland for main stairs; 35 to 37 degrees is common where space is tight; and the IRC extremes, a 7.75 in riser on a 10 in tread, produce 37.8 degrees, which most people experience as steep, especially descending with their hands full.

Angle is also where stairs meet the rest of the building. Headroom is measured vertically from the pitch line, so a steeper stair buys headroom under a given floor opening while a shallower one spends it. The IRC asks for 6 ft 8 in of headroom, a 36 in minimum clear width, and caps a single flight at 12 ft 7 in of rise between landings. None of those change the riser and tread maths, but any of them can veto a design the maths approves.

Deck stairs: a worked outdoor example

A deck stair is the same geometry wearing boots: the total rise is the distance from the ground or patio surface to the finished deck surface, and every formula on this page applies unchanged, which is why this tool doubles as a deck stair calculator. Work the example: a deck surface 42 in above the patio. With a 7 in target, 42 / 7 = 6.0 exactly, so the flight takes 6 risers at exactly 7.000 in. Treads = 5. At an 11 in tread depth the total run is 55 in, 2R + T is 25.0 in, the angle is 32.47 degrees, and the stringer length is the square root of 42 squared plus 55 squared, which is 69.20 in, so an 8 ft blank covers each stringer.

Outdoor work adds three complications the numbers do not settle. The ground end of the measurement moves as soil and pavers settle, so the total rise should be measured to a fixed footing or pad, not bare earth. Stringers touching the ground need ground contact rated treatment, with cut ends field treated. And in cold climates the stair footing must reach below the frost line or the flight lifts seasonally and rewrites its own first riser every winter. The Deck Calculator estimates the deck the stair attaches to, and the Concrete Calculator sizes the pad and footing pours.

Code limits: IRC, IBC and why local code governs

The checks on this page use the US International Residential Code, with figures checked November 2026: maximum riser height 7.75 in (196 mm) under section R311.7.5.1, minimum tread depth 10 in (254 mm) under R311.7.5.2, and no more than 0.375 in of variation between the tallest and shortest riser, or deepest and shallowest tread, in a flight. Around those sit related IRC requirements a designer must still satisfy: 36 in minimum clear width, 6 ft 8 in minimum headroom, handrails on flights with four or more risers, and a maximum of 12 ft 7 in of rise in one flight between landings.

RuleFigureSource
Maximum riser height, residential7.75 in (196 mm)IRC R311.7.5.1
Minimum tread depth, residential10 in (254 mm)IRC R311.7.5.2
Riser and tread variation within a flight0.375 in (9.5 mm) maximumIRC R311.7.5.1 and R311.7.5.2
Maximum rise of one flight between landings12 ft 7 in (151 in)IRC R311.7.3
Minimum clear width36 in (914 mm)IRC R311.7.1
Minimum headroom6 ft 8 in (80 in)IRC R311.7.2
Comfort rule, 2R + TAbout 24 to 25 in (610 to 635 mm)Blondel formula, trade practice
Comfort rule, riser + treadAbout 17 to 18 inTrade practice
Commercial riser range (for contrast)4 in minimum to 7 in maximumIBC, commercial stairs
Commercial minimum tread (for contrast)11 inIBC, commercial stairs

Read the table with the honesty warning it deserves. The IRC is a model code: jurisdictions adopt it in different editions, amend it in different places, and enforce it locally, so the figures above are the widely used residential reference values, not a promise about your street. Commercial and public stairs follow the IBC instead, with its tighter 4 to 7 in riser range and 11 in minimum tread, and other countries set their own dimensions entirely. Local code governs. This tool is a planning aid that names its code figures and their source; it is not a code compliance certificate, and the permit office is the final authority on any stair you build.

What this calculator cannot do

It plans straight flights. Winders, curved stairs, spiral stairs and alternating tread devices each have their own geometry and code sections, and none reduce to risers times treads the way a straight flight does. The calculator also does not size structure: stringer stock and throat depth, tread span, handrail loads, guard openings and footing sizes are engineering and code questions the figures here feed into but do not answer. It does not check headroom against your actual floor opening, because that needs the opening position as well as its size.

What it does do, it does exactly: the division in the right order, equal risers, the run, both stringer lengths with the difference explained, the angle, and named checks against named code figures. Measure the total rise twice, from the finished surfaces, let the riser count round up, and let every step be the same step. That is how to calculate stairs that feel right the first time they are climbed.

Sources and References

Code figures on this page are the US IRC residential values, checked November 2026 against the ICC source above: maximum riser 7.75 in (196 mm), minimum tread 10 in (254 mm). Commercial IBC figures and other countries differ, and local code governs. Source verification note: six of the seven sources above returned HTTP 200 to this page automated link check. InspectAPedia blocks automated curl requests with a Mod Security response, so that source was verified by full content retrieval in a browser instead, and its stair calculation method and IRC quotations were read and checked there. No source was substituted: all seven were verified by one of those two routes before being linked.