---
title: Why Do Chatbots Struggle to Count Letters in a Word? | Large Programs
description: Researchers have several ideas for why chatbots miscount letters, and they have not settled on one. A look at the evidence.
canonical: https://www.largeprograms.com/why-ai-is-bad-at-counting-letters/
---

[Home](/) / [How LLMs Work](/category/how-llms-work/)

How LLMs Work

# Why Do Chatbots Struggle to Count Letters in a Word?

Researchers have several ideas for why chatbots miscount letters, and they have not settled on one. A look at the evidence.

26 November 2026 · 1 min read

Ask some chatbots how many times a letter appears in a word and they may get it wrong. A famous example is counting the letter "r" in "strawberry".

![The word strawberry shown as letters, and then as made-up chunks that a model might read instead.](/img/letters-tokens.svg)

*The word strawberry shown as letters, and then as made-up chunks that a model might read instead.*

## Scientists are still working out why

Researchers have suggested several reasons, and they have not settled on one.

- **Tokens.** A model reads [tokens](/what-is-a-token/), not single letters, so it has little direct view of the letters inside a word. A 2024 study of counting and tokenization found that how the text is split into tokens changes how well models count.
- **How the model is built.** The same study points to limits in how a Transformer works through a problem in a fixed number of steps.
- **Not enough letter-level practice.** Another suggestion is that models see little training text that works at the level of single letters.

A separate 2024 experiment tested many models on many words. It found that models could recognise the letters but not count them, and that mistakes went up when a letter appeared more than once in the word. That study found the frequency of the word in training data did not have a significant effect.

## What helps

Asking for step-by-step working can help in some cases, but the 2024 tokenization study still saw failures on short words even with step-by-step reasoning. Using a tool that runs code to count is the dependable way, because a program counts letters exactly.

## Lesson

AI can be strong at some hard things and weak at what seems easy to us. Its strengths and weaknesses are not the same as a person's.

## Sources

- [https://arxiv.org/abs/2412.18626](https://arxiv.org/abs/2412.18626)
- [https://arxiv.org/abs/2410.19730](https://arxiv.org/abs/2410.19730)

[Read this page as Markdown (.md)](/why-ai-is-bad-at-counting-letters.md)

## Keep reading

[![](/img/hero/art-ai-art-and-music-basics.svg)](/ai-art-and-music-basics/)

How LLMs Work

### [How AI Makes Music: A Beginner's Look](/ai-art-and-music-basics/)

Models can generate melodies and songs by learning patterns in sound. What that means for musicians.

[![](/img/hero/art-backpropagation-how-neural-networks-learn-from-mistakes.svg)](/backpropagation-how-neural-networks-learn-from-mistakes/)

How LLMs Work

### [Backpropagation: How a Network Learns From Its Mistakes](/backpropagation-how-neural-networks-learn-from-mistakes/)

Backpropagation is the method that works out how to adjust each weight in a neural network after it makes an error. A simple explanation with a team analogy.

[![](/img/hero/art-chain-of-thought-prompting-showing-your-working.svg)](/chain-of-thought-prompting-showing-your-working/)

How LLMs Work

### [Chain-of-Thought Prompting: Showing the Steps](/chain-of-thought-prompting-showing-your-working/)

Asking a language model to show intermediate steps can improve its answers to hard problems. What the research found and how it is like showing your working in maths.
