Orbital Four

How These Calculators Are Built and Checked

One page, one tool, one formula — built by hand, its numbers verified against a named source, and its math proven by tests before it goes live. This page documents the pipeline as it runs.

32 live calculators · 140 known-answer checks · 2 standing gates (hub + sitemap, identity) · DOM journey harness over 32 pages · every worked example on every page is a tested answer

A page is one self-contained file

Each calculator is a single HTML file: its markup, its styles, and its math live together, and the file makes zero network requests — every calculation runs in the visitor's browser, so nothing typed is ever sent anywhere. The math sits in plain functions at the top of the file (removeTax, boardFeet, poolVolume...) with the DOM wiring guarded below them, which is what makes the same code testable outside a browser.

Numbers come from named sources

Every rate, fee schedule, density or constant that can drift is verified against a named public source at build time — Stripe's pricing pages, PayPal's fee schedule, the CRA's GST/HST tables, QUIKRETE's data sheet, a lumber supplier's own tally rules — and the source link, with its review date, ships on the page itself. Where a source is bot-walled to our fetchers it is named in words and not linked. Where a figure is only typical, the page says so and makes it an editable input. The full list lives in the formula library: 11 verified external links across 32 calculators.

Known-answer tests: the math is asserted, not assumed

Every calculator's functions are run in a test harness against answers computed by hand — 140 checks in all, one suite, run before any change ships. The worked examples printed on the pages are lifted from these tested answers, so a page can never show an example its own code does not produce. A typical check, quoted from the suite for the reverse HST calculator:

let r = removeTax(113, 13);           // Ontario
  assert.equal(r.before, 100);
  assert.equal(r.tax, 13);
  ok("Ontario: $113 total -> $100.00 before tax, $13.00 HST");

The same suite also enforces the shape of every page: the formula-and-example block above the tool, the sources block below it, matching visible and structured FAQs, the review date, the identity footer — pages that drift fail the build.

A second harness clicks every button

Known-answer tests prove the math; a journey harness proves the wiring. It builds a stub browser document from each page's real HTML and walks it like a visitor: first render, every button click, every radio flip, every select change, inputs nudged and garbage-typed, then 0, −5 and empty typed into every field, then defaults restored. A page fails if any handler throws, if the result region never populates, or if bad input does not get a friendly error box. Current state: JOURNEY HARNESS: ALL 32 PAGES PASS.

This reference layer is generated, not typed

The directory, the formula library, this page and the sitemap are produced by one generator script that reads the calculator pages themselves and fails the build if either test suite is red. Counts on those pages are computed, never hand-maintained — add a calculator and the counts move with it.

Build of 2026-10-16. Verify suite at this build: All 140 checks passed. + 2 gates. Spotted a stale number? info@orbitalfour.com.