How StepCalc calculates
Every number the calculators and the project planner produce, worked through on one real stair — so you can check any result by hand.
The example: 9′ 0″ measured floor to floor on subfloor, with ¾″ flooring still to go on both floors, a 7″ target riser, a 36″ wide stair, 12′ 6″ of space for the run, a 10″ deep upper floor and a 2×12 stringer. You can open this exact stair in the project planner.
1. Units, and why nothing is rounded early
Everything is worked in millimetres internally — 1 inch is exactly 25.4 mm — and converted back only for display.
Inputs are read generously: 108, 9' 0", 9ft, 7 3/4 and 2743mm all work.
Results are shown to the nearest 1/16″ (or 0.1 mm), but the arithmetic keeps full precision throughout. Rounding each riser
to 1/16″ and then adding them up would drift by nearly an inch over a long flight; carrying the exact value avoids that.
2. Total rise, corrected for floor finishes
true rise = measured rise − lower finish + upper finish
= 108″ − ¾″ + ¾″ = 108″
Flooring added to the lower floor raises the bottom, so the stair climbs less; flooring on the upper floor raises the top, so it climbs more. With equal finishes they cancel — but the stringer is still cut from the subfloor, which is why the bottom drop (section 8) matters. Unequal finishes are the classic cause of a first or last riser that fails the uniformity rule.
3. Riser count and riser height
risers = round(total rise ÷ target riser) = round(108 ÷ 7) = 15
riser = total rise ÷ risers = 108 ÷ 15 = 7.2″ ≈ 7 3/16″
The count comes first because you cannot build a fraction of a step. The height then falls out of the count, which guarantees every riser is identical — uniformity matters more to safety than the exact height. StepCalc also shows the layouts with one riser more and one fewer, since the best choice depends on space it may not know about.
4. Going (tread depth) from the comfort rule
2R + G = 630 mm (Blondel's rule, the middle of the comfortable 600–660 mm band)
G = 630 − 2 × 182.88 mm = 264.24 mm ≈ 10 3/8″
If you enter a going yourself, that is used instead. Two other rules of thumb are checked alongside — rise + run of 17–18″ and rise × run of 71–74 sq in — and shown separately rather than averaged into one invented score. Where these rules came from.
5. Treads, total run, pitch and stringer length
treads = risers − 1 = 14 (the upper floor is the top step)
total run = treads × going = 14 × 10.403″ = 12′ 1 5/8″
pitch = arctan(rise ÷ going) = arctan(7.2 ÷ 10.403) = 34.687°
diagonal = √(total rise² + total run²) = 15′ 1 5/16″
One fewer tread than risers is the trap that throws layouts out by a whole step. Untick “the upper floor is the top step” only when a full tread sits level with the upper floor. Pitch and diagonal are plain right-triangle trigonometry — see the trigonometry of a staircase.
6. The code check
Each result is compared with the limits of the code you pick — the IRC (US homes), the IBC (US commercial) or UK Approved Document K: maximum riser, minimum tread, maximum pitch (UK), minimum width, maximum rise of a single flight, nosing where required, and the floor opening when you give one. A line shows the value, the limit and pass or fail; the limits and their section numbers are in stair codes compared. These are starting points — local amendments win.
7. Fitting a stair into a fixed space
When the run is limited (here 12′ 6″), every possible riser count is tried, from the fewest the code allows to the most. For each one the riser follows from the count, and the going is the comfortable Blondel going if it fits — otherwise it is squeezed down to what fits, never below the code minimum. Layouts that pass the code are listed first, then those closest to the comfortable 630 mm stride. If even the steepest legal stair is too long, StepCalc says so and by how much, rather than proposing an illegal one. In the example, the default layout fits with 4 3/8″ to spare.
8. Cutting the stringer
framing square: 7 3/16″ on the tongue, 10 3/8″ on the blade
plumb cut = pitch = 34.687° off square level cut = 90° − pitch = 55.313°
bottom drop = tread thickness = 1″ (so the first finished riser matches the rest)
cut depth = (rise × going) ÷ √(rise² + going²) = 5 15/16″
throat = board width − cut depth = 11¼″ − 5 15/16″ = 5 5/16″ → good
The throat is the wood left behind the notches, which carries the load; about 5″ is what most inspectors look for and under 3½″ the board is considered spent. Note that a “2×12” is really 1½″ × 11¼″ — using 12″ would overstate the throat. The board to buy is the diagonal plus 6″ for the end cuts, rounded up to the next stock length (16 ft here). Stringers are spaced no more than your maximum apart across the width: 4 stringers at 12″ centres for a 36″ stair with a 16″ maximum. The stringer calculator adds a numbered cut sequence.
9. Headroom and the floor opening
headroom is measured straight up from the nosing line (the line through the tread edges)
opening = (headroom + floor depth) ÷ tan(pitch)
= (80″ + 10″) ÷ tan(34.687°) = 10′ 10 1/16″ measured back from the top riser
The hole in the upper floor has to start far enough back that, everywhere under its edge, the nosing line is at least the code headroom (80″ IRC/IBC, 2 m UK) below the underside of the floor. Deeper floors and shallower stairs need longer openings. In the example it reaches over the top 13 treads.
10. Balusters and handrail
balusters per tread = smallest n with (going ÷ n) − baluster width < sphere
= 2 per tread, leaving a 3 15/16″ gap (4″ sphere rule)
The “sphere rule” says a 4″ ball (100 mm in the UK) must not pass through any gap. The handrail height range comes straight from the code, and its length is the diagonal along the nosings plus about a foot for ends and returns.
11. The cut list
Treads: one per tread, as wide as the stair and as deep as the going plus the nosing. Riser boards: one per riser, each the riser height minus the tread thickness, ripped to fit. Stringers: the count and stock length from section 8. Balusters and handrail from section 10. Quantities are for one stair with no waste allowance.
12. The drawings
The project planner draws three views to scale from the same numbers: the side elevation (steps, stringer, floors, the opening, the nosing line and the headroom line), the stringer laid flat on its board with the notches stepped off, and the plan from above with the treads and the stringers underneath. Nothing is drawn freehand, so a dimension on a drawing is always the dimension in the tables.
13. Area and perimeter
The area & perimeter calculators use the standard formulas for each shape, shown with your numbers substituted. How each formula works is explained in area and perimeter, explained.
Checking a result yourself
Every line above can be done on a phone calculator. If a StepCalc answer and your own disagree, the usual culprits are a finish thickness left out, the tread count off by one, or a riser rounded before multiplying. If it is none of those, tell us — the formulas are tested against hand-worked figures, and a real discrepancy gets fixed.