Homeowners and DIY builders
Plan a basement or deck stair, check an old one before buying, and know what to ask a contractor.
Stair-Math is a free set of stair calculators for homeowners, carpenters, deck builders and designers. We build each one so you can check every number it gives you — the formula with your values, the rule it was checked against, and what to change when it fails.
A stair is the most rule-bound thing most people ever build. Every riser in a flight has to match the others to within a fraction of an inch, the treads have to be deep enough to land a foot, the floor above has to stop far enough back to clear a head, and the rails have to be the right height with gaps too small for a child. Get one number wrong and the stair fails inspection — or, worse, passes and trips someone for the next fifty years.
The arithmetic is not hard, but it is unforgiving, and it is spread across codes, tables and rules of thumb that rarely agree on their terms. Most stair calculators give you a number and stop there. We wanted tools that show how they got it, say which rule they used, draw the result to scale and tell you what to fix.
Start here for any straight stair: finished total rise, risers and treads, angle, the opening for headroom, floor space and stringer cuts.
When a straight stair will not fit: L and U stairs, winders, spiral and curved stairs, ship ladders and attic ladders.
Handrail length, baluster spacing, cable railing and glass panels — with the handrail and guard rules checked.
What to buy and what it costs: lumber, concrete, carpet, flooring, paint and the price of a new stair or a remodel.
Pass inspection: the full code check, commercial egress stair width and stringer and tread spans.
Start with the stair calculator, or browse all 26 calculators.
The same calculators serve very different jobs. These are the people we build for, and where each usually starts.
Plan a basement or deck stair, check an old one before buying, and know what to ask a contractor.
Cut stringers that come out right, size the stairwell opening and get the lumber list in one go.
Steps to sloped ground, stringer spans, and rails, balusters, cable or glass that pass the sphere rule.
Compare stair types by footprint, test turning and spiral layouts, and size commercial exit stairs early.
Count carpet, planks, nosings, tile and paint for a stair — with the waste stairs really need.
See each rule with its code section and the arithmetic behind it, for any of five codes.
The same six steps for every page, whether it is a quick angle check or a full code check.
Every calculator starts with the primary sources: the code sections that govern the stair, the published tables, and the manufacturers’ data where products are involved. Each limit we use is recorded with its code, edition and section, and where published summaries disagree we follow the code text.
Before any code is written, the calculation is set out as formulas and rules: what is measured, what is assumed, how values are rounded and which limit applies in each region. That method is what you see under “How the calculator works” on each page.
Each calculator gets worked cases — typical stairs, edge cases, failures, metric versions — with the expected answers computed from the published limits. When a source turns out to be wrong in an edge case, we note the correction and the reason.
The calculator, its error messages and its scale drawing are built against that method, in inches and in millimetres, with the code chosen by the reader.
Every test value is run through the real page in a browser — typed into the inputs, read off the results — on a desktop and a phone, alongside checks for layout, accessibility and broken links. A calculator ships only when every value matches.
The page goes live with its sources, its assumptions, its worked examples and its date. When a reader shows us a better source, or a code edition changes, we update the method, re-run the tests and note the change on the page.
A worked case is one complete stair — say, a 108 in rise under the IRC — with every expected answer worked out independently of the calculator. Each case checks several values: counts, lengths, angles, pass or fail. These are the current totals, counted from the test files the site is built from.
| Category | Calculators | Worked cases | Values checked |
|---|---|---|---|
| Stair Layout | 6 | 41 | 290 |
| Turning & Specialty Stairs | 7 | 41 | 362 |
| Railings & Balusters | 4 | 23 | 140 |
| Stair Materials & Cost | 6 | 33 | 145 |
| Stair Codes & Structure | 3 | 20 | 102 |
| All calculators | 26 | 158 | 1,039 |
The rules every page on Stair-Math is written and maintained by.
Every result can be checked: “Solved with your numbers” prints each step with your values in it.
A limit is never just “code”. It comes with the code, the section and the region it applies to.
Each page lists its assumptions and what it does not cover, and points to the calculator that does.
A failed check says what to change — add a riser, lengthen the opening, add a baluster — not only that it failed.
Inches, feet and inches, millimetres, centimetres and metres are all first-class, with the right code values for each region.
No sign-up, no limits, no tracking scripts. The calculators run in your browser and work on a phone.
These are the documents our limits and formulas come from. Each calculator page lists the exact sections it uses, with links where the publisher offers free access.
| Document | Edition | Publisher | Used for |
|---|---|---|---|
| International Residential Code | 2021 | International Code Council | US homes: rise, run, headroom, width, handrails, guards, loads |
| International Building Code | 2021 | International Code Council | US commercial stairs, egress width, guards, deflection limits |
| Approved Document K | 2013 edition, with 2013 amendments | UK government | Private stairs in England: rise, pitch, 2R + G, guarding |
| National Building Code of Canada | 2020 | National Research Council Canada | Stairs in Canadian homes |
| National Construction Code | 2019 / 2022 | Australian Building Codes Board | Stairs and balustrades in Australian houses |
| National Design Specification for Wood Construction | 2018 | American Wood Council | Lumber values for stringer and tread spans |
Building departments adopt different editions and add local amendments. Where your local code differs, it governs — and we would like to hear about it.
Stair-Math is free to use, with no account and no limits. The site may carry advertising to cover its costs. Ads are kept apart from the calculators and never change a result, a limit or a recommendation.
Stair-Math is written, built and maintained by the Stair-Math Team. We publish as a team because every page goes through the same process and the same checks, and the team stands behind every number on the site.
Stair-Math is built to work for everyone who needs to plan a stair:
If something does not work with your device or assistive technology, tell us and we will fix it.
Name the calculator, link to its page and give the date you used it:
Stair-Math Team. “Stair Calculator.” Stair-Math, stair-math.com/calculators/stair-layout/stair-calculator. Accessed 2026-11-20.For a result, copy its share link — it opens the calculator with the same inputs, so anyone can check the numbers.
Stair-Math is written, built and maintained by the Stair-Math Team. Every page goes through the same research, testing and correction process, and the team stands behind every number on the site.
Each calculator is built from a written method taken from the code text, then checked against worked cases whose answers are worked out independently from the published limits — 158 cases and 1,039 individual values across the site. Every value is run through the real page in a browser before release.
The 2021 International Residential and Building Codes, Approved Document K for England, the 2020 National Building Code of Canada and the Australian National Construction Code. Each calculator names the section behind every limit, so you can compare it with the edition your building department enforces.
You can use its numbers on your drawings and to prepare for inspection, but the building department’s reading of the local code is final, and structural or commercial stairs may need a design stamped by an engineer or architect.
Use the contact form or email contact@stair-math.com. Include the page, the value you expected and its source — the code, edition and section. We check every report and record each fix on the page.
Yes — links and short quotations with a link back are welcome, including in quotes, plans and coursework. The format below gives a citation you can copy.
Corrections are the most useful message we get. Send the page, the value you expected and its source — code, edition and section — and we will check it against the source, fix the calculator, re-run its tests and note the change on the page.