How we test our formulas
- Spec card first. Before we write code, we write down the inputs, outputs, formula and at least two authoritative sources.
- One formula, one place. Each formula is a small, pure function. Every unit conversion comes from one shared file, using the exact NIST conversion factors.
- Golden tests from two sources. We take worked values from two independent sources (for example, a manufacturer's chart and a government reference) and check that our formula reproduces them within a stated tolerance.
- Property tests. Automated checks try thousands of random inputs to confirm results move the right way (a bigger tank never weighs less) and that US and metric inputs give the same answer.
- Page checks. Every page is loaded in a real browser, at desktop and phone sizes, on every change.
Each calculator lists its sources and the date we last checked them. If a source changes or you spot an error, email hello@calcvisual.com and we'll fix it.