How calculators are built and checked

Every Mathulate page follows the same path from a public formula to a tested answer. This page describes that path, and what it does not claim.

Choosing the formula

A calculator starts with a formula that already exists in public. Preferential sources are standards bodies, government guidance, professional associations and peer-reviewed papers. The formula is written as a plain expression that matches the cited source, so a reader can compare the two line by line.

Where public sources disagree, the page says which one it follows and why. Where a source sets thresholds or categories, the thresholds are copied from the source rather than invented.

Writing the page

Each page is written from scratch in plain Canadian English. It names the inputs, shows the formula, works through an example with real numbers, explains the assumptions, and states the limits of the result. Nothing is copied from another calculator site.

Sources

Every calculator lists the sources its formula and thresholds come from, with a link to each one. Sources are linked on the calculator page itself, not in a separate document, so the citation is next to the working it supports.

Worked examples

Each calculator has a worked example computed by hand. The same inputs and expected answer then become a test case, so the example on the page and the behaviour of the engine cannot drift apart without a test failing.

Automated tests

The calculation engine is tested with Vitest. Tests run each calculator with chosen inputs and compare the output to a hand-computed value, including unit conversions and the errors expected for invalid input. A change that alters a result breaks the suite before it reaches the site.

  1. Hand-computed valueThe example is worked out by hand from the cited formula, with the arithmetic written down.
  2. Test caseThe inputs and the expected value are added to the calculator's test file.
  3. Run the suiteEvery calculator is exercised through the real engine, not a stand-in.
  4. BuildThe static site is built only after the suite and the type check pass.

Review

Before a calculator ships, its page is read against the cited source: the formula, the units, the thresholds and the stated limitations. Each calculator page shows the date it was last reviewed.

Corrections and how a fix ships

When a mistake is reported, we check the formula against its source and the expected value against the hand calculation. A confirmed error is fixed in the calculator, its worked example and its tests together, so the page, the engine and the suite agree. The corrected page is then rebuilt and redeployed, and its reviewed date is updated.

Report a correction

Estimates, not guarantees

Last reviewed 2 November 2026.