About Easy Stair Calculator
A fast, accurate stair and stringer calculator built for people holding a tape measure on a job site. Accurate to 1/16", backed by 16 automated unit tests, and 100% free with no ads, no paywalls, and no sign-up.
The Backstory: Frustration on the Job Site
If you have ever stood on a subfloor or a freshly framed deck framing stairs while balancing an iPhone, you know how painful existing stair calculator websites are.
Almost every stair tool online falls into one of three traps:
- 18 confusing inputs: They demand stringer lumber width, tread overhang, bottom landing thickness, minimum headroom, and obscure clearances before giving you a single number. All you have is your total rise measurement.
- Ad-bloated interfaces: Giant banner ads shift the page as you type, video popups block your touch targets, and laggy tracking scripts make mobile browsers crawl.
- Paywalls and email gates: Some tools let you calculate the risers, but lock the printable stringer cut sheet or framing diagram behind a "Pro" subscription or an email opt-in.
Easy Stair Calculator was built to fix this. Total rise is the only number you need to enter. The calculator instantly determines the mathematically optimal step count, draws a live 2D cut diagram, flags any building code violations, and gives you framing square settings—all above the fold on a 360-pixel phone screen.
The Author: Carpenter & Software Engineer
This tool was built by a carpenter and software engineer who has spent years framing decks, building custom interior staircases, and writing mission-critical software.
In carpentry, stairs are uniquely unforgiving. Under the International Residential Code (IRC), the greatest riser height in any flight cannot exceed the smallest by more than 3/8" (0.375"). A 1/8" error made on each step turns into a dangerous, code-failing trip hazard by the top of the flight.
Cutting an expensive 16-foot 2x12 stringer incorrectly ruins a $60 piece of lumber and wastes hours of labor. When you are on site, you need absolute confidence that the math is correct down to 1/16 of an inch.
Rigorous Mathematical Verification: 16 Automated Tests
Unlike most calculators on the web whose formulas were copy-pasted into untracked client scripts, every formula on this website lives in a dedicated, isolated mathematical engine (stairMath.ts).
Before any change can be deployed to this website, it must pass a suite of 16 automated unit tests running directly in Node.js (node --test src/lib/stairMath.test.ts). If even a 1/64" discrepancy is introduced, the build halts immediately.
Two Critical Bugs We Caught in Other Calculators
During our research and benchmarking against existing web calculators, we discovered two widespread algorithmic flaws that regularly produce non-code-compliant or structurally dangerous stairs:
1. The Riser Count Rounding Bug
Many calculators calculate the number of risers using Math.round(totalRise / maxRiser).
Consider a total rise of 31 1/2 inches (31.5") with the standard IRC maximum riser of 7 3/4" (7.75"):
31.5 ÷ 7.75 = 4.0645 risers
Math.round(4.0645) rounds down to 4 risers. This produces an individual riser height of:
31.5 ÷ 4 = 7.875" (7 7/8") ➔ FAILS CODE (Exceeds 7 3/4" max)
Easy Stair Calculator strictly uses Math.ceil(totalRise / maxRiser). It rounds up to 5 risers of 6 5/16" (6.3"), which passes building inspection every single time.
2. The Uncut Stringer Throat Formula
The uncut "throat" is the remaining solid wood between the inside corner of the step notch and the back edge of the 2x12 stringer. It provides all the beam strength carrying the stair load.
Many online tools calculate throat with naive 1D subtraction like boardWidth − unitRise. This is mathematically false because the board is tilted at an angle.
The true throat depth measured perpendicular to the stringer slope is governed by right-triangle trigonometry:
Throat = boardWidth − (unitRise × unitRun) ÷ √(unitRise² + unitRun²)
Our test suite explicitly validates this exact Euclidean formula against CAD blueprints. When throat depth drops below 5", our diagram warns you in amber so you know to switch from a 2x10 to a 2x12 or add center support posts.
What Our 16 Unit Tests Cover
| # | Test Case | What It Verifies | Status |
|---|---|---|---|
| 1 | Standard 68 1/2" Rise | Verifies 9 risers at 7 5/8" (7.611"), 8 treads, 84" total run, and 5 1/16" throat on 2x12. | PASS |
| 2 | Riser Ceiling Limit | Guarantees riser height never exceeds 7 3/4" on any input; catches Math.round regression. | PASS |
| 3 | Exact Multiple Boundaries | Tests exact multiples of 7 3/4" (e.g. 46 1/2" = exactly 6 risers of 7.750"). | PASS |
| 4 | Geometric Throat Formula | Confirms throat depth calculation matches true perpendicular triangle geometry. | PASS |
| 5 | Thin Throat Warning | Ensures throat depths under 5" trigger a visible structural warning. | PASS |
| 6 | Tread Depth & Nosing Rules | Enforces 10" minimum tread depth; flags treads under 11" that lack 3/4"–1 1/4" nosing. | PASS |
| 7 | Handrail Triggers | Validates IRC R311.7.8 handrail requirement trigger on flights with 4 or more risers. | PASS |
| 8 | Bottom Riser Drop | Deducts tread thickness from bottom riser cut so all finished steps are identical. | PASS |
| 9 | Framing Square Settings | Computes exact tongue (rise) and blade (run) layout numbers for stair gauges. | PASS |
| 10 | Lumber Sizing & Length | Calculates hypotenuse stringer length and recommends standard board stock (10ft, 12ft, 16ft). | PASS |
| 11 | Notch Coordinate Tracing | Verifies exact (x, y) coordinates for rendering the SVG stringer cut path. | PASS |
| 12 | Intermediate Landing Split | Splits total rise into two flights with custom landing placement and height validation. | PASS |
| 13 | Top Flush vs. Drop | Validates geometry when top tread is installed flush with upper finished floor. | PASS |
| 14 | 151" Flight Rise Limit | Enforces IRC 151" (12' 7") maximum flight height before requiring a landing platform. | PASS |
| 15 | Input Error Resilience | Ensures negative numbers, zero, and malformed strings never crash or produce NaN. | PASS |
| 16 | Fraction & Tape Measure Parsing | Tests parsing of strings like 5' 8 1/2", 68.5, and 174cm to 1/16" tape fractions. | PASS |
Core Architecture: Built for Speed
Easy Stair Calculator is engineered as a static Astro website deployed on Cloudflare Pages global edge network:
- Zero Framework Overhead: The calculator is written in lightweight, vanilla TypeScript. No bloated React or Vue runtimes. Total JavaScript bundle is under 15 KB gzipped.
- Sub-second Load Times: The entire page payload is under 110 KB. It loads instantly even on weak 3G cellular signals on job sites.
- Cookieless & Private: We do not track you across the web. We use privacy-first, cookieless Cloudflare Web Analytics to monitor site health without storing personal information.