How we test
How we test Tolvi’s tax calculations against HMRC’s own cases
HMRC publishes workbooks with stored test cases for its tax calculations. Tolvi replays them, every case, on every change. This is Tolvi’s own replay, and it isn’t HMRC’s verdict.
The SA100 calculation
- 273
- HMRC’s stored SA100 cases replayed: all of them
- 232
- equal HMRC’s stored figure exactly
- 41
- on a reasoned list, each still tested to its exact figure
Of the 41, 40 differ from the stored figure by at most 3p. The workbook’s own formulas, worked in exact arithmetic, give Tolvi’s figure: the stored one has picked up Excel’s floating point. The other, case 134, has a stale row in the workbook’s index. On all 273, Tolvi equals the workbook’s formulas in exact arithmetic.
The SA900 calculation
All 51 of HMRC’s stored SA900 cases pass, on both tax due and payment on account, with nothing on a reasoned list. That’s 51 of 51.
Rules the code can’t break
Money is integer pence
No floating point anywhere an amount is held. Tax is worked to the penny and profits to whole pounds, as the rules say.
Trial balances are immutable versions
Every import is kept as it came in. A final balance is the draft trial balance plus posted journals, worked out each time and never stored.
Worked examples that cite the law
Each rule in the tax engines has worked-example tests citing the legislation or the HMRC manual reference. Rates and thresholds are data, keyed by year.
Blockers that refuse
Where Tolvi can’t carry a position, it names it on the return. Accounts with open review points or changed figures can’t be approved.
What this doesn’t prove
What’s live and what’s coming- These are Tolvi’s own tests against HMRC’s published cases. They haven’t been run on HMRC’s test service, and no outside accountant has reviewed them.
- Stored cases test the calculation. They don’t test whether the facts typed into a return are right: that’s for you.
- HMRC publishes no test for the SA800, so it’s checked against worked examples and HMRC’s schema and rules.