Large Programs

Home / How LLMs Work

How LLMs Work

Why Do Language Models Make Maths Mistakes?

LLMs predict text, they do not calculate by default. When to trust them and when to use a calculator.

26 November 2026 · 1 min read

A language model is trained to predict plausible text. A maths answer is just text to it, so a smooth-looking answer can have a wrong number.

A calculator follows exact rules, a language model predicts likely next words, so check chatbot maths.

Why it can still do some maths

Models have seen many worked examples and can follow steps. Showing step-by-step reasoning often helps. In a 2022 paper, researchers described "chain-of-thought prompting", where a model is shown a few worked examples with the intermediate steps. They report it improved results on arithmetic, commonsense and symbolic reasoning tasks. For example, a very large model (PaLM 540B) prompted with just eight such examples reached the best reported accuracy on GSM8K, a set of maths word problems, at the time of the paper. It still does not guarantee a correct answer.

What research says about harder sums

A 2023 paper called "Faith and Fate" tested transformer models on multi-digit multiplication, logic puzzles and a dynamic programming problem. The authors say the models fail on some surprisingly simple problems and seem to solve these tasks by matching patterns from the parts they have seen, rather than by developing systematic problem-solving skills. They also argue that the chance of an error grows quickly as the task needs more steps.

Safer habits

  • Use a calculator for important sums.
  • Ask the model to show steps, then check each one.
  • Use tools that run real code for exact results.

Sources