How we build our calculators
How ToolkitHQ calculators are built, which formulas and sources we use, how results are checked, and how to report an error.
How we build our calculators
Every calculator on ToolkitHQ is built by hand as a small piece of JavaScript that runs entirely in your browser. There is no server-side processing of your numbers, no account, and no hidden formula. This page explains where the maths comes from, how we check it, and how to get a number corrected if it looks wrong.
What runs under the hood
- The calculation is written in plain JavaScript, one self-contained file per tool. We implement the formula directly rather than calling a third-party service, so a result can always be traced back to visible inputs.
- Your inputs never leave the device. State is held in the page URL and, for recent results, in your browser’s local storage.
- Rounding happens only at the display step — currency to the cent, percentages to one or two decimals, physical quantities to a sensible precision. The underlying arithmetic keeps full precision.
- Assumptions are stated in the tool itself and in the explanation below it. A loan calculator that ignores trade-in, for example, says so rather than quietly estimating.
Where the formulas come from
We use recognised, published formulas rather than invented ones, and we name them on the page that uses them:
- Finance. Loan and mortgage tools use the standard amortisation formula; savings and investment tools use compound interest with compounding periods; payoff tools allocate each payment to accrued interest first, then principal.
- Health and fitness. Basal metabolic rate uses the Mifflin–St Jeor equation, the formula most widely validated in clinical settings. BMI uses the standard weight-over-height-squared calculation with the World Health Organization’s category bands. Heart-rate zones use the Karvonen method (heart-rate reserve).
- Tax and payroll. Sales tax and payroll tools apply the rate you enter or the published rate for the region shown. They do not model every allowance, deduction, or local surcharge, because those vary by jurisdiction and by person.
- Construction. Material estimators use standard coverage rates and waste allowances for the product in question, then round up to whole units because you cannot buy part of a bag or sheet.
- Maths and conversion. Deterministic operations and fixed conversion factors — these either match exactly or they are wrong, and we treat them accordingly.
How we check the numbers
- Each calculator is tested against worked examples with known answers before it ships.
- Edge cases are exercised deliberately: zero, negative values, very large inputs, and empty fields.
- Results are compared against an independent calculation — a spreadsheet or a second implementation of the same formula — not just re-run through the same code.
- The explanatory copy is checked against the calculator’s actual behaviour, so the text never claims a feature the tool does not have.
What these calculators are not
They are estimates for planning and reference, not financial, medical, legal, or construction advice. Where a result depends on local rates, your personal circumstances, or a professional’s judgement, the calculator gives you a defensible starting point — not a final answer. Treat a tax figure as an estimate to check with an accountant, a macro target as a starting point to adjust, and a material estimate as a number to confirm before you order.
Who writes and checks this
ToolkitHQ is written and maintained by Thomas Asenjo. Calculators are built and reviewed in-house; explainer pages are researched, drafted, and then checked against the formula and source they cite before publishing. When a formula or a rate changes, the affected pages are updated and their review date is bumped.
Found an error?
Tell us. Email [email protected] with the tool, the numbers you entered, and the result you expected. A reproducible error in a calculation is fixed as a priority, and the review date on the page is updated when we do. If you want to know what each term in a result means, the glossary defines them in plain language.