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:

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 CaseWhat It VerifiesStatus
1Standard 68 1/2" RiseVerifies 9 risers at 7 5/8" (7.611"), 8 treads, 84" total run, and 5 1/16" throat on 2x12.PASS
2Riser Ceiling LimitGuarantees riser height never exceeds 7 3/4" on any input; catches Math.round regression.PASS
3Exact Multiple BoundariesTests exact multiples of 7 3/4" (e.g. 46 1/2" = exactly 6 risers of 7.750").PASS
4Geometric Throat FormulaConfirms throat depth calculation matches true perpendicular triangle geometry.PASS
5Thin Throat WarningEnsures throat depths under 5" trigger a visible structural warning.PASS
6Tread Depth & Nosing RulesEnforces 10" minimum tread depth; flags treads under 11" that lack 3/4"–1 1/4" nosing.PASS
7Handrail TriggersValidates IRC R311.7.8 handrail requirement trigger on flights with 4 or more risers.PASS
8Bottom Riser DropDeducts tread thickness from bottom riser cut so all finished steps are identical.PASS
9Framing Square SettingsComputes exact tongue (rise) and blade (run) layout numbers for stair gauges.PASS
10Lumber Sizing & LengthCalculates hypotenuse stringer length and recommends standard board stock (10ft, 12ft, 16ft).PASS
11Notch Coordinate TracingVerifies exact (x, y) coordinates for rendering the SVG stringer cut path.PASS
12Intermediate Landing SplitSplits total rise into two flights with custom landing placement and height validation.PASS
13Top Flush vs. DropValidates geometry when top tread is installed flush with upper finished floor.PASS
14151" Flight Rise LimitEnforces IRC 151" (12' 7") maximum flight height before requiring a landing platform.PASS
15Input Error ResilienceEnsures negative numbers, zero, and malformed strings never crash or produce NaN.PASS
16Fraction & Tape Measure ParsingTests 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:

Ready to Plan Your Staircase?

Try our calculators or check standard rise and run dimensions for your project: