Methodology: how every number is verified
This page is the reference behind every calculator on Yard to Roof: which code limits are applied, how materials and lumber are sized, and where rounding happens. Last reviewed November 2026.
A calculator is only useful if you can audit it. Each tool on this site runs a pure TypeScript engine with unit tests, prints the formula it used, and shows a worked US example. Nothing is calculated on a server, and no result depends on an account, a cookie or a hidden default.
Building code references
Stair and guard checks cite the International Residential Code (IRC), which most US jurisdictions adopt with local amendments. The limits below are the model-code values used by the calculators. Always confirm the edition and amendments adopted in your jurisdiction.
| IRC section | Requirement | Applied in |
|---|---|---|
| R311.7.5.1 | Maximum riser height 7-3/4 in; riser variance max 3/8 in | Stair stringer |
| R311.7.5.2 | Minimum tread depth 10 in | Stair stringer |
| R311.7.1 | Minimum stairway width 36 in | Stair stringer |
| R311.7.8 | Handrail required at four or more risers | Stair stringer notes |
| R312.1.3 | Guard openings must reject a 4 in sphere | Baluster spacing |
Battery of checks: the stringer tool reports pass, caution or fail for each limit rather than hiding a violation behind an average.
Nominal versus actual dimensions
US softwood lumber is sold by nominal size and dressed to a smaller actual size. A “2x4” is 1-1/2 in by 3-1/2 in. Stringer throat calculations must use the dressed width, because that is the wood left in the board. The lookup below is the table used by the engine.
| Nominal | Actual thickness | Actual width | Typical use |
|---|---|---|---|
| 1x4 | 0.75" | 3.5" | Studs, plates, blocking, tread supports |
| 2x4 | 1.5" | 3.5" | Studs, plates, blocking, tread supports |
| 2x6 | 1.5" | 5.5" | Studs, plates, blocking, tread supports |
| 2x8 | 1.5" | 7.25" | Studs, plates, blocking, tread supports |
| 2x10 | 1.5" | 9.25" | Joists, stringers (marginal throat), headers |
| 2x12 | 1.5" | 11.25" | Stair stringers, headers, rim boards |
| 4x4 | 3.5" | 3.5" | Posts, rail posts, built-up columns |
| 6x6 | 5.5" | 5.5" | Posts, rail posts, built-up columns |
Dressed sizes follow voluntary product standard PS 20 and typical US softwood grading. Some species and imported stock differ; measure the board in your hand.
Bulk densities and bag sizes
Gravel and mulch are sold by volume, but weight drives delivery cost and truck limits. The densities below are typical dry, loose US bulk values. Moisture, gradation and supplier blending can move them by 10 to 15 percent, so treat the tonnage as a planning figure and the supplier ticket as final.
| Material | lb/cu yd | tons/cu yd | Retail bags |
|---|---|---|---|
| Pea Gravel | 2,700 | 1.35 | 0.5 cu ft |
| River Rock | 2,600 | 1.3 | 0.5 cu ft |
| Crushed Limestone (#57) | 2,800 | 1.4 | 0.5 cu ft |
| Hardwood Bark Mulch | 650 | 0.33 | 2 cu ft · 3 cu ft |
| Cedar / Pine Mulch | 500 | 0.25 | 2 cu ft · 3 cu ft |
| Rubber Mulch | 1,100 | 0.55 | 0.8 cu ft · 1.5 cu ft |
One cubic yard is 27 cubic feet. Bag counts are rounded up to whole bags; a 0.5 cu ft gravel bag and a 3 cu ft mulch bag are not interchangeable.
Unit tests, worked examples and rounding
Hand-verified test cases
The engine test suite covers fractional carry-over (7.99 in becomes 8 in), 1/8, 1/16 and 1/32 precision, IRC failures at 2x10 throat depth, baluster tape marks that close exactly at the opening width, and bulk volume-to-tonnage conversions at each stocked density. Tests run before every production build.
Rounding rules
- Internal lengths are decimal inches with full floating-point precision.
- Displayed fractions round to the nearest 1/16 in and carry into whole inches.
- Riser counts, stringer counts and bag counts round up, never down.
- Board lengths snap up to stocked 8, 10, 12, 14, 16 or 20 ft lengths.
- Totals are computed from unrounded values, then rounded once for display.
Worked example published on every tool
Each calculator page includes a step-by-step US example with the same engine output you see in the interactive tool. If a formula changes, the tests and the worked example change with it in the same commit.
What these calculators are not
- Not a stamped structural design or a substitute for a licensed engineer.
- Not a permit or inspection approval in your jurisdiction.
- Not a soil, frost-depth or load-bearing analysis.
- Not a substitute for measuring the actual board, bed or opening on site.
Use the numbers to plan and to check a quote, then verify against local code and the materials you actually bought.
Corrections and advertising
Advertising is separated from editorial and never changes a formula. Ad slots are reserved outside the calculator workspace so a result cannot be influenced by a sponsor. If you find an error, email hello@yardtoroof.com with the calculator, the inputs you used and a source for the correction. Corrections are reviewed against the engine tests before the page changes.
Read the privacy policy for how calculator inputs and advertising are handled, or return to the calculator hub.