How to Check AI Math Before You Trust It
A language model writes numbers the way it writes words, so a confident figure is not a checked one. Four quick tests to catch wrong arithmetic before it reaches a client.
To check AI math before you trust it, treat every number as a draft until one of four tests passes: estimate it, reverse it, recompute it elsewhere, or have the model write code to calculate it. Language models produce numbers the same way they produce sentences, by predicting what text should come next, so a figure can look right, be formatted perfectly, and still be wrong. The tests below take under a minute and catch most errors.
Why a fluent answer can still be wrong
A calculator follows rules. A language model predicts text. For small, common sums it usually lands on the right answer because it has seen similar patterns many times. For longer chains, unusual numbers or several steps in a row, the chance of a slip rises, and the model has no built-in alarm that fires when it slips. Newer models are better at this and many can call a calculator or run code when the tool is available, but you cannot always tell whether that happened in a given answer. So the safe habit is to check, not to assume.
The related problem of confident invention is covered in what an AI hallucination is. Wrong arithmetic is the numeric version of the same thing.
Test 1: Estimate it
Round the inputs and do the sum in your head. The answer should be in the same neighborhood.
Suppose a model tells you that 18 hours at 47.50 an hour, plus 20 percent VAT, comes to 1,206.00. Round to 18 times 50, which is 900, and add a fifth, which is 1,080. The model's figure sits further above the estimate than rounding explains, so something is off. The correct figure is 1,026.00: 18 times 47.50 is 855, and 20 percent of 855 is 171.
Estimation does not prove a number right. It catches order-of-magnitude slips, extra zeros and misplaced decimals, which are the costly ones.
Test 2: Reverse it
Run the operation backwards. If a model says a 15 percent discount takes a 862 price down to 732.70, check by dividing: 732.70 divided by 0.85 gives 862. That works out, so the answer holds. The reverse path uses different arithmetic than the forward one, which makes a coincidental match unlikely.
Test 3: Recompute somewhere else
Put the inputs into a spreadsheet or calculator and compare. It sounds obvious, but the trick is to use the inputs from your own source, not from the model's restatement. Models sometimes quietly change a number while repeating it, for example turning 47.50 into 47.05. Look at the numbers it says it used, not only at the final figure.
Test 4: Have it write code, then run the code
If the calculation matters, ask the model to write a short script and run it yourself, or to use a code tool if your product provides one. Code is deterministic. The model is good at writing a formula and poor at being one.
Write a Python snippet that takes hours, rate and VAT percentage and
prints the net, VAT and gross amounts to two decimal places.
Do not give me the result, give me the code.Run it with your numbers. If you are unsure what the script does, ask the model to explain it line by line and check that it matches what you meant.
Where computers get it wrong too
Not every error is the model's fault. Plain computing has quirks as well. In Python, 0.1 + 0.2 prints 0.30000000000000004, because decimal fractions cannot always be stored exactly in binary. The Python documentation on floating point explains why. For money, use decimal types or whole cents, and round only at the end. This is one reason to check what code does, not only whether it runs.
Percentages: the classic trap
Percent changes do not undo each other. A 40 percent increase on 100 gives 140. A 40 percent decrease from 140 gives 84, not 100. If you ask a model for "the original price before a 40 percent rise", it needs to divide by 1.4, not subtract 40 percent. Always ask which base a percentage applies to, and write that base into your prompt.
A habit that fits any workflow
Ask the model to show each step, so you can check the steps and not just the end.
Give it the numbers once, in a table, and tell it to use only those.
Tell it to say "cannot compute reliably" when a task needs many chained operations.
Keep the final calculation in a spreadsheet or script that you own.
For client work, the point of all this is evidence. If you send a quote or a report, you should be able to show how the numbers were checked, and proving AI-generated work is correct to a client covers how to present that. If you want to read more about why models behave this way, start with how AI models work, and for catching invented facts in general see how to tell if an AI answer is hallucinated. Tokenization plays a part too, as covered in what a token is in AI, since a model sees a long number as pieces of text, not as a single value.
FAQ
Is AI good at math?
It is good at explaining math and at writing code that does math. It is less reliable at long calculations done directly in text, so verify them.
Why does ChatGPT get simple sums wrong sometimes?
The model predicts text, it does not run arithmetic rules. Short sums are usually right, long or multi-step ones are more error-prone. Tools that let the model call a calculator or run code reduce this.
Can I trust AI with spreadsheet formulas?
Often yes, but test the formula on two or three rows where you know the right answer before you apply it to the whole sheet.
What is the fastest check?
Estimate. Round the inputs, do the sum in your head, and see whether the model's figure is in the right place.
How did this land?
About the author

Staff Engineer, Platform
Carlo works on the platform that turns prompts into running apps. He writes the engineering deep dives and the changelog notes worth reading.


