Why your AI assistant should never do the maths

An income tracker dashboard with an AI assistant chat window answering questions about totals, shown on an indigo background (demo data)
Every number in that chat window was worked out by Python, not by the AI. Demo data.

Ask an AI chatbot "how much do I owe?" or "what's the total?" and it will give you a number. It will sound sure of itself. The number may well be right. The problem is that nothing in how the answer was produced made it right — and for prices, totals and tax, "probably right" is not good enough.

Why an AI guesses numbers

A large language model — the engine behind ChatGPT, Gemini and Claude — writes its reply one piece at a time, choosing what is most likely to come next. That is why it is so good at sounding natural. It is also why a figure it writes is a prediction of what the answer looks like, not the result of adding anything up.

Often the prediction is correct. Sometimes it is a perfectly reasonable-looking number that is wrong, and it arrives in exactly the same confident tone. For a business, that second case is the one that matters:

  • a quote that is £40 too low, sent to a customer in your name;
  • a running total that drifts away from what is actually in your records;
  • a tax estimate that nobody can trace back to where it came from.

You cannot fix this by asking the AI to "be careful" or "double-check". You fix it by not asking the AI to do the sum at all.

The fix: the AI picks, the code calculates

The pattern is called tool calling, and it splits the job in two. The AI is given a short list of things it is allowed to do — "show this week's totals", "add a day's takings", "check Thursday's diary". When someone asks a question, the AI's only job is to pick the right tool and fill in the details. Ordinary code then runs that tool against your real data, does the arithmetic, and hands the result back. The AI just puts it into a friendly sentence.

Flow diagram: a question goes to the AI, which picks a tool; code calculates from saved data; the AI words the answer using that result Question "What did I earn in week 23?" AI picks a tool "show week totals" for week 23 Code calculates reads your saved data, adds it up exactly AI words it "Week 23: income £1,732…" Your records (database) The AI decides what to do Code decides what the number is
The AI never touches the arithmetic. It chooses the action and words the reply; the number comes from code and your data.
The point

An AI is good at understanding what someone means. Code is good at being exactly right, every time. A well-built assistant uses each for the job it is good at — and never asks the AI to be a calculator.

A worked example from my own build

I built this pattern into an open-source income and tax tracker for UK self-employed workers — my own project, not a client one. You log each day's income and expenses, and it keeps a running estimate of what you will owe at the Self Assessment deadline. It also has an AI assistant you can simply ask: "what are my totals so far?", "what did I earn in week 23?"

The income tracker dashboard with the AI assistant chat open, answering a totals question and a week 23 question (demo data)
The assistant answering two questions. Both answers are built from figures Python calculated. Demo data for a made-up person.

The AI in that chat window (Google's Gemini) never adds anything up. It reads the question, picks one tool from a short list, and Python does the rest: it reads the saved entries from the database, works out income, expenses, profit and the tax estimate, and passes those exact figures back to be put into a sentence. If the AI wanted to make up a number, there is nowhere in the flow for it to put one.

That does not make it perfect, and it is worth being honest about where it went wrong. During testing, an early version treated money paid out as income — the AI had picked the wrong tool for the sentence. Because the mistake was in the choice, not hidden inside a made-up sum, it was easy to spot and fix in the instructions. The tax maths itself sits in ordinary Python with automated tests that check it, including the awkward cases right at the edge of a tax band.

The kind of number you can't afford to guess

Tax is a good example of why this matters. The figure does not rise smoothly: in the 2026/27 tax year, a self-employed person in England, Wales or Northern Ireland pays nothing on the first £12,570 of profit, then 20% Income Tax plus 6% Class 4 National Insurance up to £50,270, then 40% plus 2% above that. The chart below shows the estimates the tracker's code produces at five profit levels.

Bar chart of estimated Income Tax plus Class 4 National Insurance for 2026/27: £1,931.80 at £20,000 profit, £4,531.80 at £30,000, £7,131.80 at £40,000, £9,802.00 at £50,270 and £13,888.60 at £60,000 Estimated Income Tax + Class 4 NI, 2026/27 Worked out by the tracker's Python code, not by the AI £1,931.80 £20,000 £4,531.80 £30,000 £7,131.80 £40,000 £9,802.00 £50,270 £13,888.60 £60,000 Annual profit Higher band starts: 26p → 42p per £1
The last £9,730 of profit costs more tax than the £10,000 before it. A guessed figure is unlikely to get that step right; code gets it right every time.

Notice the jump in the last bar. Going from £50,270 to £60,000 adds £4,086.60 of tax on £9,730 of profit, because every pound above the line is taxed at 42p instead of 26p. That is exactly the sort of step an AI writing a plausible-looking number can smooth over without anyone noticing. Two of these figures (£9,802.00 and £13,888.60) are checked by the tracker's automated tests on every change.

Where this matters in your business

You may never build a tax tracker, but the same split applies anywhere an AI talks to your customers about money, time or availability:

Customer asksWhat the AI should doWhere the answer must come from
"How much for a boiler service?" Recognise it as a pricing question Your actual price list
"Can I book Thursday at 3pm?" Pick the "check diary" action Your live calendar
"What's my total for three nights?" Fill in the dates and guests Your rates, worked out by code
"Have I been refunded?" Look up the right order Your payment records

In every row, the AI's job is understanding the question. The answer itself comes from something you control and can check. This is how our own AI receptionist handles bookings: it works from your real availability rather than guessing a free slot.

Three questions to ask before you buy

  1. "Where do the numbers in its answers come from?" The answer you want is "your price list / your calendar / your records, through code". "The AI knows your prices" is not it.
  2. "What does it do when it can't find the answer?" It should say so, or pass the customer to a person — never fill the gap with a likely-sounding figure.
  3. "Does it confirm before it saves or sends anything?" A booking, a quote or a refund should be checked by the customer or by you before it becomes real.

None of this needs you to be technical. It only needs the vendor to have decided, on purpose, which parts of the job the AI is allowed to do. If you want to talk through which parts of your own customer conversations are safe to automate, that is a good first conversation to have.


Method note: the tax figures are the tracker's own estimates using 2026/27 rates for England, Wales and Northern Ireland (personal allowance £12,570; Class 4 National Insurance 6% and 2%, per GOV.UK). They ignore other income, the personal allowance taper above £100,000 and Scottish rates. They illustrate the calculation and are not tax advice. The screenshots use demo data for a made-up person.

Mohsan Abasi

Founder, Pivot Bureau

Mohsan builds done-for-you AI assistants and automation for UK small businesses — AI receptionists, WhatsApp self check-in and AI-ready websites. Connect on LinkedIn.

FAQ

Can an AI chatbot get a price or total wrong?

Yes. A language model writes its answer one word at a time, choosing what is likely to come next. That makes it very good at sounding right, but a figure it produces is a prediction, not a calculation. It can be correct, or it can be a confident, plausible number that is wrong. For prices, totals, tax and availability, the number should come from code and your own data instead.

What is tool calling in an AI assistant?

Tool calling means the AI is given a short list of actions it is allowed to take, such as 'look up this week's totals' or 'check the diary for Thursday'. When a question comes in, the AI picks the right action and fills in the details. Ordinary code then runs that action against your real data and hands the result back, and the AI only puts it into a friendly sentence.

Does tool calling stop an AI from making mistakes?

No. It moves the mistakes somewhere you can see and fix them. The AI can still pick the wrong tool or misread what someone meant, so a well-built assistant confirms before it saves or sends anything and has tests that check the calculations. What it removes is the AI inventing a number that nobody can trace back to your data.

What should I ask an AI vendor about prices and numbers?

Ask where the numbers in its answers come from, what it does when it cannot find the answer in your data, and whether it confirms with a person before saving a booking, a quote or a payment. A vendor whose assistant works out figures from your own price list and records will answer all three directly.

Want an AI assistant that never makes up a number?

We build assistants that understand your customers and work every figure out from your own prices, diary and records. Tell us what your customers ask most and we will show you which parts are safe to automate.

See the AI Receptionist Book a free 30-min call