Skip to main content
Calculator Matters=
Calculator Matters=
[=]Calculators
Guides
HomeHealth formula verification

Legal & Policies

Health Formula Verification

5 of the 5 published health calculators have an automated formula test suite. Each row gives one calculator's passing cases and the kinds of check behind them.

Last updated 16 September 2026

This is the health section of the formula verification report, which explains what each kind of case tests, how the counts are produced and what they do not prove; how to read the report walks through a single row. Rows run from the largest suite to the smallest; each row's address ends in the calculator's slug, so one calculator's evidence can be linked and cited on its own. The test file behind every row, and the per-kind numbers, are in the machine-readable report.

Every health calculator, with its case mix

Automated formula-test coverage for the Health calculators: passing cases and case mix per calculator
CalculatorCasesCase mix
Calorie Deficit Calculator11213 golden · 52 boundary · 32 property · 15 structural
BMI Calculator862 independent · 26 golden · 42 boundary · 10 property · 6 structural
IU to mg Converter7619 independent · 12 golden · 22 boundary · 14 property · 9 structural
TDEE Calculator688 golden · 20 boundary · 29 property · 11 structural
mg/dL to mmol/L Converter454 independent · 10 golden · 6 boundary · 8 property · 17 structural

What each suite checks

Counts say how much was checked; these say what. Each case below is quoted from its test file exactly as the runner recorded it, in the order the cases run, independent cross-checks first. Where a suite has more cases than fit, the count in brackets says how many of that kind exist in total.

Calorie-deficit engine

112 passing cases behind Calorie Deficit Calculator: 13 golden, 52 boundary, 32 property and 15 structural.

  • Golden — target below current -> loss (-1)
  • Golden — target above current -> gain (+1)
  • Golden — -10% deficit
  • Golden — +10% surplus
  • Golden — 0.5 kg/week -> 550 kcal/day delta
  • Golden — 1 lb/week -> 500 kcal/day delta
  • Golden — loss direction subtracts the delta
  • Golden — gain direction adds the delta
  • Golden — lb variant matches kg variant via conversion constant
  • Golden — target-date daily deficit matches linear estimate
  • Golden — target-date daily surplus for a gain goal
  • Golden — weeksToTarget matches the simple constant-deficit arithmetic (11 weeks)
  • Golden — weeksBetweenDates matches known elapsed time (Jan 1 -> Mar 1 2026 = 59 days)
  • Boundary — target == current -> already reached (0)
  • Boundary — target within 0.05kg of current -> already reached (0)
  • Boundary — 0% = maintenance
  • Boundary — zero weeks available returns maintenance unchanged
  • Boundary — pace at exactly 1kg/week: no caution
  • Boundary — pace above 1kg/week: caution shown
  • Boundary — pace above 2lb/week: caution shown
  • Boundary — pace exceeding ~1% of body weight triggers caution even under the absolute threshold
  • Boundary — percent at exactly 20%: no caution
  • Boundary — percent above 20%: caution shown
  • Boundary — 1199 is below the floor

13 of 13 golden cases shown; 11 of 52 boundary cases shown. The test file is scripts/validate-calorie-deficit-engine.mjs.

BMI engine

86 passing cases behind BMI Calculator: 2 independent cross-check, 26 golden, 42 boundary, 10 property and 6 structural.

  • Independent cross-check — lower obesity classes sit 2.5 below the standard ones
  • Independent cross-check — lower overweight starts at 23, NICE's stated figure
  • Golden — metric formula
  • Golden — imperial formula
  • Golden — metric worked example raw
  • Golden — metric worked example rounded = 23.5
  • Golden — imperial worked example raw
  • Golden — cm passthrough
  • Golden — m to cm
  • Golden — ft/in to cm (5ft 9in = 175.26cm)
  • Golden — cm to ft/in round-trip
  • Golden — cm to inches
  • Golden — kg passthrough
  • Golden — lb to kg
  • Golden — stone/lb to kg (11st 0lb ≈ 69.853kg)
  • Golden — kg to lb
  • Golden — page example 23.5 is healthy on the standard thresholds
  • Golden — and overweight on the lower thresholds
  • Golden — the default is still the standard table
  • Golden — lower healthy range at 170 cm starts at 53.465 kg
  • Golden — and ends at 66.181 kg
  • Golden — 70 kg at 170 cm is 3.819 kg above the lower range
  • Golden — healthy upper edge: 23 exact, 22.9 displayed
  • Golden — min weight for 170cm

2 of 2 independent cross-check cases shown; 22 of 26 golden cases shown. The test file is scripts/validate-bmi.mjs.

Dose unit engine

76 passing cases behind IU to mg Converter: 19 independent cross-check, 12 golden, 22 boundary, 14 property and 9 structural.

  • Independent cross-check — d round-trips through mass
  • Independent cross-check — d agrees in mg and µg
  • Independent cross-check — a-retinol round-trips through mass
  • Independent cross-check — a-retinol agrees in mg and µg
  • Independent cross-check — a-carotene round-trips through mass
  • Independent cross-check — a-carotene agrees in mg and µg
  • Independent cross-check — e-natural round-trips through mass
  • Independent cross-check — e-natural agrees in mg and µg
  • Independent cross-check — e-synthetic round-trips through mass
  • Independent cross-check — e-synthetic agrees in mg and µg
  • Independent cross-check — insulin round-trips through mass
  • Independent cross-check — insulin agrees in mg and µg
  • Independent cross-check — acrossForms agrees for d
  • Independent cross-check — acrossForms agrees for a-retinol
  • Independent cross-check — acrossForms agrees for a-carotene
  • Independent cross-check — acrossForms agrees for e-natural
  • Independent cross-check — acrossForms agrees for e-synthetic
  • Independent cross-check — acrossForms agrees for insulin
  • Independent cross-check — mg to g to mcg matches mg to mcg
  • Golden — a milligram is a thousand micrograms
  • Golden — a gram is a thousand milligrams
  • Golden — a microgram is a thousand nanograms
  • Golden — a gram is a million micrograms
  • Golden — 40 IU of vitamin D is one microgram

19 of 19 independent cross-check cases shown; 5 of 12 golden cases shown. The test file is scripts/validate-dose-units-engine.cjs.

TDEE engine

68 passing cases behind TDEE Calculator: 8 golden, 20 boundary, 29 property and 11 structural.

  • Golden — BMR matches hand-verified spec fixture (1780)
  • Golden — TDEE at moderate (1.55) matches spec fixture (2759)
  • Golden — female BMR matches hand-verified fixture
  • Golden — lean body mass
  • Golden — Katch-McArdle BMR matches hand-verified fixture (1752.4)
  • Golden — feet/inches use the exact 2.54 cm/in conversion
  • Golden — pounds use the exact 0.45359237 kg/lb conversion
  • Golden — kgToLb resolves
  • Boundary — BMR rounds to nearest whole calorie
  • Boundary — roundToTen(2464) = 2460
  • Boundary — roundToTen(2466) = 2470
  • Boundary — roundToHundred(12340) = 12300
  • Boundary — missing equation reference rejected
  • Boundary — age below 18 rejected with an explicit under-18 message
  • Boundary — age above max rejected
  • Boundary — age exactly at min is valid
  • Boundary — age exactly at max is valid
  • Boundary — height below min rejected
  • Boundary — height above max rejected
  • Boundary — height boundaries are accepted
  • Boundary — weight below min rejected
  • Boundary — weight above max rejected
  • Boundary — weight boundaries are accepted
  • Boundary — missing height rejected

8 of 8 golden cases shown; 16 of 20 boundary cases shown. The test file is scripts/validate-tdee-engine.mjs.

Clinical units engine

45 passing cases behind mg/dL to mmol/L Converter: 4 independent cross-check, 10 golden, 6 boundary, 8 property and 17 structural.

  • Independent cross-check — every mmol divisor matches the published clinical factor
  • Independent cross-check — every µmol multiplier matches the published factor
  • Independent cross-check — 14 g/dL of haemoglobin is 8.69 mmol/L, the published figure
  • Independent cross-check — the urea-to-BUN ratio matches the published 2.14
  • Golden — the divisor is the molar mass over ten
  • Golden — 100 mg/dL of glucose is 5.5507 mmol/L
  • Golden — 200 mg/dL of cholesterol is 5.1726 mmol/L
  • Golden — 150 mg/dL of triglycerides is 1.6941 mmol/L
  • Golden — 1.0 mg/dL of creatinine is 88.40 µmol/L
  • Golden — 9.5 mg/dL of calcium is 2.3703 mmol/L
  • Golden — BUN 14 mg/dL is a urea of 30.01 mg/dL
  • Golden — which is 5.00 mmol/L of urea
  • Golden — 14 g/dL of haemoglobin is exactly 140 g/L
  • Golden — 2.4 mmol/L of calcium is 4.8 mEq/L
  • Boundary — a zero or negative molar mass is refused
  • Boundary — a negative concentration is refused — it has no meaning
  • Boundary — zero converts to zero
  • Boundary — a non-finite value is refused
  • Boundary — an unknown analyte or haemoglobin unit returns nothing
  • Boundary — a zero or negative valence is refused
  • Property — every analyte round-trips through both SI units
  • Property — every conversion is linear through the origin
  • Property — milliequivalents and millimoles invert at every valence
  • Property — and for a monovalent ion they are the same number

4 of 4 independent cross-check cases shown; 10 of 10 golden cases shown; 6 of 6 boundary cases shown; 4 of 8 property cases shown. The test file is scripts/validate-clinical-units-engine.cjs.

A documents folder, reading glasses and papers on a desk
Photo: Leeloo The First / Pexels
Questions about this policy?Published by Calculator Matters (calculatormatters.com). Last reviewed 16 September 2026. Built and maintained by Jay Sudha (about Calculator Matters). These pages are reviewed regularly, and questions are always welcome.
Contact us
Calculator Matters=

Formula-backed calculators with clear assumptions, practical interpretation, and workbook support.

Calculators are educational estimates, not professional advice.

  • Instagram
  • Pinterest
  • Facebook
  • X

Popular calculators

  • Mortgage Calculator
  • Compound Interest Calculator
  • Investment Calculator
  • Regular Investment Calculator
  • Retirement Withdrawal Calculator
  • Standard Deviation Calculator

Browse by category

  • Finance
  • Investing
  • Budget & Credit
  • Business
  • Tax
  • Economics
  • Math
  • Health
  • Time & Date
  • Home & Energy
  • Everyday
  • Conversion

Explore

  • All Calculators
  • Calculator Guides
  • Glossary
  • Embed a calculator
  • Verified Formula badge
  • API for developers
  • Changelog
  • Sitemap

Company

  • About
  • Methodology
  • Formula Verification
  • Transparency
  • Editorial Policy
  • Corrections
  • Accessibility
  • Contact

Legal & privacy

  • Privacy Policy
  • Privacy Rights
  • Cookie Policy
  • Terms of Use
  • Disclaimer
  • Advertising Disclosure
  • Affiliate Disclosure
  • Copyright & DMCA Policy

© 2026 Calculator Matters · calculatormatters.com.

Educational estimate — not financial, tax, legal, or professional advice. Formulas and assumptions are shown on the page above.