How we check our formulas

A calculator is only useful if its answer is right. Each formula on this site goes through the same four checks before its page is published.

The four checks

  1. One formula, one module. The math lives in a small function with explicit units (feet, inches, cubic feet, US gallons). The page and the tests call the same function, so what is tested is what you use.
  2. Published reference values. Each formula is tested against at least three reference cases taken from a manufacturer data sheet, a building code, a government table or a university extension guide, or worked by hand step by step. The source is written next to each test.
  3. Edge cases. Zero, negative, empty and very large inputs are tested too: the calculator must refuse impossible values instead of returning a wrong number.
  4. Full precision, rounded only on screen. Calculations keep every decimal. Rounding happens only when a number is displayed, and quantities you buy (bags, bundles, cans) are rounded up.

Unit conversions

All conversions use the exact factors published by the US National Institute of Standards and Technology: 1 ft = 0.3048 m, 1 US gallon = 231 in³ = 3.785411784 L, 1 short ton = 2,000 lb = 907.18474 kg.

What a calculator does not replace

Results are estimates for planning and ordering. Structural work (concrete, stairs, roofs) depends on loads, soil and local code: have it checked by a qualified professional.

Formula references by calculator