BedrockCalculator
Back to Methodology

How We Test Our Calculators

The strongest check on a tax calculator is the tax authority's own arithmetic. Where an authority publishes a worked example, we put the same inputs through the same engine function the calculator uses and compare the answer with the printed figure. This page lists every such comparison in the repository: 21 examples from 8 authorities, 39 figures in all. All of them match.

By Aapt Dubey. Last updated .

How the comparison works

Each figure in the table below is computed when the site is built, by calling the engine function the linked calculator calls. Nobody types the "our figure" column in. If an engine change moved one of these numbers, the page would show the new number and a cross.

It would not get that far. Every row names a test in the repository that asserts the same figures, and a separate test, lib/officialExamples.test.ts, recomputes every row, checks it against the printed figure, and fails if the named test has been renamed or deleted. Both run in the test suite that must pass before a change is merged.

Authorities round. The IRS prints whole dollars, Skatteetaten whole kroner. The engine keeps cents, so where the official figure is whole we compare at the precision the authority printed and show our unrounded figure beside it. The match rule is stated on every row: exact means equal as printed, rounded means equal after rounding ours to whole units, and truncated means equal after dropping the fraction, which is what Skatteetaten does.

Official worked examples against our output

Sources were read on the date shown under each one. Follow the link to see the example in the authority's own words.

Official worked examples against our output
Source documentInputsFigureOfficialOursMatch
US Department of Veterans Affairs: 38 CFR 4.25(a), combined ratings tableRead 2026-10-15engine/vectors/veterans-benefits.test.tsTwo disabilities rated 50% and 30%Open the calculatorCombined value65%65%Yes(exact)
Combined rating70%70%Yes(exact)
US Department of Veterans Affairs: 38 CFR 4.25(a), combined ratings tableRead 2026-10-15engine/vectors/veterans-benefits.test.tsTwo disabilities rated 40% and 20%Open the calculatorCombined value52%52%Yes(exact)
Combined rating50%50%Yes(exact)
US Department of Veterans Affairs: 38 CFR 4.25(a), combined ratings tableRead 2026-10-15engine/vectors/veterans-benefits.test.tsThree disabilities rated 60%, 40% and 20%Open the calculatorFirst two combined76%76%Yes(exact)
All three combined81%81%Yes(exact)
Combined rating80%80%Yes(exact)
US Department of Veterans Affairs: About VA disability ratings (va.gov)Read 2026-10-15engine/vectors/veterans-benefits.test.tsThree disabilities rated 50%, 30% and 10%Open the calculatorCombined value69%69%Yes(exact)
Combined rating70%70%Yes(exact)
Internal Revenue Service: Self-employed individuals: calculating your own retirement plan contribution and deductionRead 2026-10-15engine/vectors/self-employed-retirement.test.ts$100,000 Schedule C net profit, 10% plan contribution rateOpen the calculatorSelf-employment tax$14,130$14,129.55$14,130 as printedYes(rounded)
Half of SE tax deducted$7,065$7,064.78$7,065 as printedYes(rounded)
Net profit less half SE tax$92,935$92,935.22$92,935 as printedYes(rounded)
Contribution at 9.0909%$8,449$8,448.66$8,449 as printedYes(rounded)
Illinois Attorney General: Illinois Estate Tax fact sheet, computation examplesRead 2026-10-15calculators/illinois-estate-tax-calculator/vectors.test.ts$5,000,000 estate, all Illinois propertyOpen the calculatorIllinois estate tax$285,714$285,714.29$285,714 as printedYes(rounded)
Illinois Attorney General: Illinois Estate Tax fact sheet, computation examplesRead 2026-10-15calculators/illinois-estate-tax-calculator/vectors.test.ts$4,000,000 estate, all Illinois propertyOpen the calculatorIllinois estate tax$0$0Yes(exact)
HM Revenue & Customs: Marginal Relief for Corporation Tax (gov.uk guidance)Read 2026-10-15engine/vectors/uk-business-tax.test.tsA company with 3 other associated companiesOpen the calculatorLower limit£12,500£12,500Yes(exact)
Upper limit£62,500£62,500Yes(exact)
Skatteetaten (Norwegian Tax Administration): Car rates: company cars, example with list price under NOK 370,300Read 2026-10-15calculators/norway-company-car-tax-calculator/vectors.test.tsCompany car with a list price of NOK 279,000, 2026Open the calculatorTaxable benefit per monthNOK 6,975NOK 6,975Yes(exact)
Skatteetaten (Norwegian Tax Administration): Car rates: company cars, example with list price over NOK 370,300Read 2026-10-15calculators/norway-company-car-tax-calculator/vectors.test.tsCompany car with a list price of NOK 660,000, 2026Open the calculatorTaxable benefit per monthNOK 14,085NOK 14,085.83NOK 14,085 as printedYes(truncated)
Inland Revenue Authority of Singapore (IRAS): Property tax rates, Example 1Read 2026-10-15engine/vectors/singapore-property-tax.test.tsOwner-occupied home, annual value S$36,000Open the calculatorProperty taxS$960S$960Yes(exact)
Inland Revenue Authority of Singapore (IRAS): Property tax rates, Example 2Read 2026-10-15engine/vectors/singapore-property-tax.test.tsOwner-occupied home, annual value S$84,000Open the calculatorProperty taxS$5,480S$5,480Yes(exact)
Inland Revenue Authority of Singapore (IRAS): Property tax rates, Example 3Read 2026-10-15engine/vectors/singapore-property-tax.test.tsHome not occupied by the owner, annual value S$36,000Open the calculatorProperty taxS$4,800S$4,800Yes(exact)
Inland Revenue Authority of Singapore (IRAS): Property tax rates, Example 4Read 2026-10-15engine/vectors/singapore-property-tax.test.tsHome not occupied by the owner, annual value S$84,000Open the calculatorProperty taxS$19,440S$19,440Yes(exact)
Inland Revenue Authority of Singapore (IRAS): Property tax rates, Example 5Read 2026-10-15engine/vectors/singapore-property-tax.test.tsCommercial property, annual value S$54,000Open the calculatorProperty taxS$5,400S$5,400Yes(exact)
Inland Revenue Authority of Singapore (IRAS): Buyer's Stamp Duty (BSD), Example 1Read 2026-10-15engine/vectors/singapore-stamp-duty.test.tsResidential property bought at S$4,500,100Open the calculatorBuyer's stamp dutyS$209,606S$209,606Yes(exact)
Inland Revenue Authority of Singapore (IRAS): Additional Buyer's Stamp Duty (ABSD), exampleRead 2026-10-15engine/vectors/singapore-stamp-duty.test.tsForeigner buying a home at S$2,000,000Open the calculatorAdditional buyer's stamp dutyS$1,200,000S$1,200,000Yes(exact)
Inland Revenue Authority of Singapore (IRAS): Corporate income tax rate, rebates and tax exemption schemes, Example 3Read 2026-10-15engine/vectors/singapore-business-tax.test.tsYA 2026, S$17,500 chargeable income at 17%, eligible for the S$2,000 cash grantOpen the calculatorGross tax payableS$2,975S$2,975Yes(exact)
CIT rebate givenS$0S$0Yes(exact)
Net tax payableS$2,975S$2,975Yes(exact)
Inland Revenue Authority of Singapore (IRAS): Income from property rented out, sublet room exampleRead 2026-10-15engine/vectors/singapore-tax.test.tsRoom sublet for S$600 a month, 15% deemed expensesOpen the calculatorDeemed expensesS$1,080S$1,080Yes(exact)
Net rentS$6,120S$6,120Yes(exact)
Government of Indonesia: Peraturan Pemerintah 58/2023, explanatory note to Article 2(1), the "Tuan R" exampleRead 2026-10-15engine/vectors/indonesia-pph21.test.tsRp10,000,000 monthly salary, Rp100,000 monthly pension contribution, married with no dependants (K/0)Open the calculatorWithholding, January to NovemberRp 200,000Rp 200,000Yes(exact)
Tax for the yearRp 2,715,000Rp 2,715,000Yes(exact)
Withholding in DecemberRp 515,000Rp 515,000Yes(exact)
New Zealand Department of Internal Affairs: Rates rebate application form 2026/27, "How much will my rebate be?" tableRead 2026-10-15engine/vectors/nz-property-tax.test.tsNo dependants, no SuperGold Card; five household income and rates combinationsOpen the calculator$50,000 income, $4,000 ratesNZ$462NZ$462Yes(exact)
$53,000 income, $4,000 ratesNZ$87NZ$87Yes(exact)
$59,000 income, $6,000 ratesNZ$670.33NZ$670.33Yes(exact)
$62,000 income, $6,000 ratesNZ$295.33NZ$295.33Yes(exact)
$71,000 income, $8,000 ratesNZ$503.67NZ$503.67Yes(exact)

$100,000 Schedule C net profit, 10% plan contribution rate. The IRS example is for tax year 2019. The rule behind its $14,130 (15.3% on 92.35% of net profit) is the same in 2026, and $92,350 of earnings is below both years’ Social Security wage base. The IRS rounds to the dollar; the engine keeps cents (SE tax $14,129.55).

$5,000,000 estate, all Illinois property. The engine gives $285,714.29; the fact sheet prints whole dollars.

Company car with a list price of NOK 660,000, 2026. The engine gives NOK 14,085.83. Skatteetaten prints whole kroner and drops the 83 øre rather than rounding up.

Where there is no official example yet

The table is short compared with the catalog, and that is deliberate: a row goes in only when the authority prints inputs and an answer we can reproduce. Some obvious candidates are missing, and it is better to say why than to imply they are covered.

  • IRS Publication 15-T. Its percentage-method examples compute withholding from a single paycheck. No calculator on this site implements that method; the W-4 withholding calculator estimates the year's tax and compares it with what you are having withheld. Testing it against 15-T would test something it does not do.
  • IRS tax tables. For taxable income under $100,000, the tax table in the Form 1040 instructions taxes the midpoint of each income band, most of them $50 wide. Our federal calculators apply the rate schedule to your exact income, so they can differ from the table by a few dollars by design.
  • Social Security, HMRC income tax, the ATO and the CRA. These calculators are tested against rates and thresholds taken from the primary documents, with expected answers derived by hand. None of their tests yet reproduces a worked example those agencies print, so none appears above.

Building this page also turned up two tests whose names claimed more than their sources show. One said it reproduced a gov.uk worked example for the High Income Child Benefit Charge at £67,600; the current gov.uk guidance states the rule but prints no such example. The other described NOK 137,030 as Skatteetaten's own example; Skatteetaten's examples use list prices of NOK 279,000 and NOK 660,000. Both tests were renamed to say what they check, and the two real Skatteetaten examples were added as new tests and appear in the table.

The rest of the test suite

The official examples sit on top of a much larger suite. It has three layers.

  1. Engine vectors. 257 test files in engine/vectors/ exercise the shared calculation modules directly: amortization, time value of money, tax brackets, day counts, and each country's tax rules. Many expected values are worked by hand in a comment above the assertion, so a reviewer can check the arithmetic without running anything.
  2. Calculator vectors. Each of the 1,236 calculators has its own vectors.test.ts, which imports the page's real configuration and checks its output for specific inputs. The names of those tests are listed near the foot of each calculator page.
  3. Guards. Tests that check the pages rather than the maths: that each page's Quick Answer states the figure its engine computes, that a percentage label was not left behind when a rate was corrected, and that no statutory table has fallen behind the calendar year or gone more than 18 months without being re-verified.

On 15 October 2026 the full suite ran 8,274 tests in 1,327 files, all passing. The count rises as calculators and examples are added; the figure here is updated whenever this page is.

What must pass before a change ships

The same checks run on every push to the main branch, on every pull request, and once a week on a schedule so that a table going stale is caught even when nobody has touched the code:

  1. Type checking of the whole codebase.
  2. The full test suite described above.
  3. Registry validation: the catalog schema, duplicate and collision checks, a 1,200-word floor on each calculator page, and a check that every calculation module a page declares is one its code calls, and the reverse.
  4. A count of em and en dashes in calculator content, which must be zero.
  5. A production build of every page.
  6. An output audit that runs every calculator and fails if a promised result is missing.
  7. A mechanism audit that flags a "How this is calculated" step describing something with no trace in the code it is bound to.

The last of these exists because of a real failure. In August 2026 about 150 pages described calculation steps no code performed. No numeric test caught it, because a made-up step contains no number. The fix and the reasoning are on the About page and in the methodology.

What a passing test does not prove

A test shows the engine gives the expected answer for the inputs in the test. It does not show the calculator suits your situation, that a law has not changed since the source was read, or that the inputs you enter are the right ones. Each calculator page has a section on what it does not account for. Read it before relying on a result.

If you find a published example we get wrong, send it through the contact page with a link to the document. If it is a fair test of what the calculator does, it will be added to this table, whether it passes or not.