How AI models read numbers, and why they sometimes get maths wrong
AI and numbers. 7-minute read. Updated 2026-10-10.
Large language models can explain calculus, yet occasionally fumble a long multiplication. The reason lies in how they see numbers in the first place.
Numbers become tokens
Before a model reads text, a tokenizer splits it into pieces called tokens. Common words are often single tokens; numbers are usually split into chunks of one to a few digits, depending on the tokenizer. The model never sees 36118 as a quantity. It sees a short sequence of symbols, much as it sees the letters of an unfamiliar word.
Pattern-matching versus calculation
A language model predicts the next token from patterns learned in training. For familiar facts and small sums those patterns are reliable. For long arithmetic, each digit depends on carries from other digits, and one wrong step propagates. Newer models are far better at this than early ones, but exact arithmetic is still a place where a calculator is the right tool.
Why tool use fixes it
Modern AI assistants can call tools: a code interpreter, a calculator, a database. When a model writes a short program to compute an answer and reads back the result, the arithmetic is done by ordinary software. That is the same principle behind our tools, which compute every property of a number exactly in your browser rather than estimating it.
Numbers inside the model
A neural network is itself made of numbers: weights, often counted in billions, that are multiplied and added in layer after layer. The videos below explain the mechanics clearly, without heavy maths.
Getting reliable numbers from AI
- Ask the assistant to compute with code or a calculator when exactness matters.
- Ask for intermediate steps; errors are easier to spot.
- Check headline figures against a primary source, especially statistics and prices that change over time.
- Be explicit about units, currencies and dates.
Frequently asked questions
Why do AI chatbots make arithmetic mistakes?
Language models predict text from patterns and see numbers as token sequences, so long exact calculations can go wrong unless the model uses a calculator or code tool.
What is a token?
A chunk of text, such as a word, part of a word or a few digits, that a language model processes as one unit.
How can I get accurate maths from an AI assistant?
Ask it to use a code or calculator tool and to show its steps, then verify key results.