DEV Community

Suman Kumar for CalculateEveryday

Posted on

What checking 244 calculators against their sources actually found

I run CalculateEveryday, a free site with 244 calculators: paycheck, mortgage, BMI, unit conversion, chemistry, statistics and so on. Each page shows the formula, a worked example, the source the formula was checked against, and a section called "Where this can give the wrong answer".

Most of the first drafts were written with AI, and a second model reviewed them. That is exactly why the checks matter more than the drafting, so this post is about the checks: what the build refuses, what the tests pin, and the bugs that only appeared when each calculator was read against its published source.

A calculator can't get a page without a source

Every calculator is an entry in one registry. An entry only builds a route if it carries a verified record: how it was checked, against what, and when.

verified: {
  method: "source-checked",
  source: "OpenStax College Algebra 2e, §9.5 'Counting Principles' — P(n, r) = n! ÷ (n − r)! and C(n, r) = n! ÷ (r!(n − r)!)",
  date: "2026-10-02",
},
Enter fullscreen mode Exit fullscreen mode

That record prints on the page as "Formula last checked against … on …". A noindex flag beats it. One India capital-gains calculator sat built but unpublished for seven weeks, because its debt-fund branch used rules from before 2023. It went live this week, for equity only, once the debt branch was gone.

One golden-value test file per calculator

Each calculator has a test file of hand-worked values, preferably the source's own examples. There are 1,102 of them, and CI runs them before every deploy. A changed constant fails the build instead of shipping a wrong tax figure.

// 60C30 = 118,264,581,564,861,424 (OEIS A000984). Past 2^53 a
// floating-point count lost its last digits and showed …390.
test("60C30 is exact: 118,264,581,564,861,424", () => {
  const r = run(60, 30);
  assert.equal(r.items?.find((i) => i.label.startsWith("60C30"))?.value, "118,264,581,564,861,424");
});
Enter fullscreen mode Exit fullscreen mode

That test exists because the old version used floating-point numbers. The combinations calculator now uses BigInt.

What reading each calculator against its source found

Over two days in October, 237 of the then 243 pages were rewritten against a named source, and each calculator was checked against that source along the way. Forty faults turned up. A few of them:

  • The baking-pan converter was inverted from launch. Moving to a bigger pan gave a multiplier of 0.79, while the page's own text said 1.26.
  • Body fat fed centimetres into equations fitted in inches. The US Navy formulas (Hodgdon and Beckett, 1984) expect inches. A 175 cm man with an 85 cm waist and 38 cm neck read 23.5% instead of 17.0%. Women were overstated by far more.
  • A unit-price comparison divided by the wrong base. It called a jar "12.4% cheaper" when it was 11% cheaper, the same mistake the site's own discount page warns about.
  • Three states' paychecks ignored a deduction. Alabama, Missouri and Oregon let federal income tax come off before state tax. The engine didn't, so it understated take-home pay. Utah's taxpayer credit phases out with income, and a flat $966 understated tax by about $540 at $60,000.

The lesson I keep coming back to: checking the calculator was worth more than writing the explanation around it. Fluent text is cheap now. Correct numbers still take a source and a test.

Content rules that fail the build

A site with hundreds of templated pages drifts toward the same sentences on every page, so the content rules are tests too:

  • at least 700 words of real explanation per page (a few simple tools have a named lower floor), three or more FAQs, and a source that isn't just the formula restated;
  • no sentence on more than 10 pages;
  • a cap on the share of a page's sentences that also appear on another page. The 51 state paycheck pages started at 54–86% shared. The cap only ever moves down.

The 1.3 MB bug

Last week I found that every page loaded a 1.3 MB script. One client component imported the registry, so every calculator's explanation and FAQs went to every visitor, on phones too. The browser now reads a small generated catalogue, about 17 KB gzipped. A test walks the imports of every "use client" file and fails if any chain reaches the registry. The homepage went from 582 KB of gzipped JavaScript to 196 KB.

Where it still breaks

Every page ends with the cases its formula doesn't cover: a 0% loan rate, a BMI for an athlete, a paycheck with tips. The method, including the parts done by AI, is written up at How we check.

If you know a calculator where the usual formula is quietly wrong, I'd like to hear about it. The combinations calculator is the one that taught me about 2^53.
Copy
Create your user account first, then Settings › Organization › create CalculateEveryday, with the logo from the kit as its image.
In the editor choose to post under the CalculateEveryday organisation. Set the AI disclosure to "AI-assisted" (required since 26 Aug 2026).
Change published: false to true when you're h

Top comments (0)