Methodology

How our calculators are built and checked

A wrong answer costs someone a trip to the supply house or a failed inspection. This is how we try to make sure it does not happen, and what we do when it does.

From spec to published tool

  1. Written specification. Before any code exists, each calculator gets a specification: its purpose, the sources it relies on (code tables with edition and section, or manufacturer data), every input with its unit and allowed range, the constants, the equations in order, the rounding rules, the warnings it should give, its edge cases, and at least three worked examples calculated independently by hand.
  2. Implementation from the spec. The calculator is then written to follow the spec equation by equation. The same code produces the result you see when the page first loads and the result you get after changing an input, so the two cannot disagree.
  3. Audit. A separate review reads the code against the spec line by line, recomputes the worked examples, and checks the diagram against the geometry it is supposed to show.
  4. Tests, then publish. The worked examples become automated tests. A calculator is only listed as available once those tests and the site-wide checks below pass.

We use software tools, including AI coding assistants, to write and test the code. That is why the written spec, the independent worked examples and the automated tests matter: the code has to reproduce answers that were worked out separately.

Rounding and units

  • Calculations run at full double precision. Values are rounded only for display, so rounding errors do not build up between steps.
  • Feet-and-inch lengths are rounded to the nearest 1/16 inch and carried into the next inch or foot (5.99 inches displays as 6 inches, not 5-15/16).
  • Things you buy by the piece, such as sheets, bundles, bags, boxes and rolls, are rounded up to a whole unit, because you cannot buy part of one.
  • Length inputs accept feet and inches in the usual forms (12' 6", 12 ft 6 in, 150", 6-1/2) as well as metric lengths.

What “estimate” means here

A calculator result is a quantity estimate based on the dimensions you enter and the stated assumptions: typical coverage rates, nominal product sizes and the waste allowance shown on the page. Real products vary by manufacturer, real rooms are rarely square, and real jobs have mistakes and offcuts. Where a result depends on a building code, the calculator states the code, edition and section, but codes are adopted and amended locally. Treat any code check here as a first pass, and confirm with your building department, your supplier or a licensed professional.

Sources

Code-based tools cite the model code edition they implement, such as the 2023 National Electrical Code, the 2021 International Residential Code, the 2021 International Plumbing Code and the 2021 International Energy Conservation Code. Material coverage figures come from published manufacturer data sheets, named on the page. Reference charts are generated from the same data files the calculators use, so a chart and its calculator cannot show different numbers.

Diagrams

Result diagrams are drawn from the computed values, with the dimension you are solving for highlighted. Numbered callouts on a diagram match the numbered legend beneath it.

The test suite

Every change to the site runs automated checks before it is published:

  • unit tests that run each worked example from the spec through the calculator and compare the outputs within a stated tolerance;
  • edge-case tests for zero, negative, very large and malformed inputs, which must produce a clear message rather than a wrong number;
  • tests that load each built page in a simulated browser and confirm it shows the same result as the formula;
  • site-wide checks for broken links, structured data, page titles and descriptions; and
  • Lighthouse audits of every page for performance, accessibility, best practices and SEO.

Report an error

If a result looks wrong, please tell us. Include the page, the inputs you used, the result you got and the result you expected, with its source if you have one. We check every report.

Corrections policy

When we confirm an error we fix the calculator, add a test so the same mistake cannot return, update the page’s review date, and record the fix in the public changelog with the date and what changed. We do not quietly edit results.

Limits

These tools are for estimating and planning. They do not replace an engineer, an architect, a licensed tradesperson or your local building department. See the terms of use.