Home Build Math

How we check the calculators

A material estimate is only useful if you can see where it comes from. This page explains how each calculator is built and checked.

Two implementations, compared by tests

Each formula is written twice: once in JavaScript, which runs in your browser, and once as a separate reference in Python. The reference produces a set of test cases with known answers, including the worked examples shown on each page. Automated tests check that the browser version returns the same answers.

Code limits come from the code text

Where a calculator checks a building-code limit, the page names the code edition and section and links to it. The stair calculator uses the 2021 International Residential Code (IRC) limits for riser height (R311.7.5.1) and tread depth (R311.7.5.2). Local codes can differ, so every page with a code check says so.

Every constant has a named source

  1. 27 cubic feet = 1 cubic yard: NIST Handbook 44, Appendix C.
  2. Compacted aggregate base, 139 lb/ft³: FHWA Central Federal Lands estimating table.
  3. Riser at most 7¾ in, tread at least 10 in: 2021 IRC R311.7.5.1 and R311.7.5.2.
  4. 1 board foot = 1 ft × 1 ft × 1 in: USDA Forest Service FIA glossary.
  5. Paint coverage 350–400 sq ft per gallon (example product): Benjamin Moore technical data sheet.
  6. 1 roofing square = 100 sq ft: NRCA Steep-Slope Roofing Materials Guide.

Links to each source are on the calculator page that uses it. Sources were last checked on .

What we don't assume

Rounding

Corrections

If you find an error in a formula, a source or a code reference, tell us. Corrections will be noted on the page they affect.

Results are estimates. Local building codes, site conditions and product specifications differ. For structural work, follow your local code and consult a qualified professional.