Claude essentials

How Many R's in Strawberry? Why AI Famously Said Two

How many r's in strawberry? Three. Here's why AI chatbots famously said two, what tokens have to do with it, and how to get a correct answer every time.

Claude essentials

On this page

There are three r's in "strawberry": s-t-r-a-w-b-e-r-r-y. One comes after the "st", and the other two are the double "rr" in "berry". So why did so many AI chatbots famously answer two? Because a chatbot doesn't read words letter by letter the way you do. It reads chunks of text called tokens, and when you ask the question in a normal sentence, "strawberry" usually arrives as one single chunk with no letters inside it at all. On top of that, research shows language models are weak at counting repeated letters even when they can see them. This post explains both problems in plain English and shows you how to get the right answer every time.

TL;DR

QuestionShort answer
How many r's in strawberry?Three: s-t-r-a-w-b-e-r-r-y.
Why did AI say two?It reads tokens, not letters. In a sentence, "strawberry" is one token, so the model never sees the individual r's.
Is it only tokens?No. A 2024 study found models can recognize letters but struggle to count them, especially when a letter appears more than twice.
What was OpenAI's "Strawberry"?The reported codename for its o1 reasoning model, released September 12, 2024. No confirmed link to the meme.
Do models get it right now?Newer models usually do, because they spell the word out or run code first.
How do I get correct answers?Ask the AI to spell the word letter by letter before counting, or to count with code.

If you're new to AI tools and want the basics without the jargon, the free Claude Cowork course walks you through it step by step.

The answer: three r's in strawberry

Write it out and count:

Position12345678910
Letterstrawberry

That's 10 letters and three r's, at positions 3, 8 and 9. The double "rr" in "berry" is where most people (and most chatbots) slip up. It's easy to hear "straw" plus "berry" and count one r in each half.

Why AI chatbots said two: tokens, not letters

In 2024, "how many r's in strawberry" became a meme because many chatbots confidently answered two. The reason starts with how these models read.

A language model doesn't see letters. Before your message reaches the model, a tokenizer chops the text into pieces called tokens and turns each piece into a number. Common words often become one token. Rarer words get split into a few pieces. The model only ever sees the numbers. (For the full explanation, read what are tokens in AI.)

Here's what happens to "strawberry" in OpenAI's tokenizers. We ran these ourselves with OpenAI's open-source tokenizer, and you can reproduce them:

What you typeGPT-4o / GPT-5 tokenizer (o200k_base)Older GPT-4 tokenizer (cl100k_base)
strawberry on its own3 tokens: st · raw · berry3 tokens: str · aw · berry
How many r's are in strawberry?8 tokens: How · many · r · 's · are · in · strawberry · ?the same 8 tokens

Look at the bare word first. In the newer tokenizer it becomes st, raw and berry. The model receives three numbers. It doesn't get "r, r, r". It gets an ID that means raw and another that means berry, and it has to remember from training that those pieces contain r's. One r is buried inside raw, and two are buried inside berry. Nothing about the number for berry says "two r's in here".

The twist: in a real question, strawberry is one token

Most explanations online stop at the "str / aw / berry" split. But that split only happens when "strawberry" is typed on its own. In a normal sentence, the word has a space in front of it, and " strawberry" (with the space) is a single token in both tokenizers.

So when you actually ask "How many r's are in strawberry?", the model gets one ID for the whole word. Not three pieces. Not ten letters. One number. To answer, it has to recall how that word is spelled from patterns it learned in training, then count letters it never directly saw. That's a bit like asking someone how many times a letter appears in a word they've only ever heard spoken, never seen written down.

You can see this yourself. Open our free token counter, type strawberry and watch it split. Then type a full sentence with strawberry in it and watch the word turn into one token.

It's not only tokens: AI is bad at counting repeats

Tokens are the famous explanation, but they're not the whole story. Researchers tested this directly.

In a December 2024 paper, "Why Do Large Language Models (LLMs) Struggle to Count Letters?" (Fu et al., arXiv:2412.18626 (opens in a new tab)), the authors found that models are able to recognize the letters in a word but not count them. Two findings stand out:

  • Repeats are the hard part. Most models they tested couldn't correctly count letters that appear more than twice in a word. Strawberry's r appears three times, right in that danger zone.
  • Errors grow with word length. Mistakes went up with the number of letters and tokens in the word. How common the word was made no significant difference.

So the honest explanation has two parts. Tokenization hides the letters from the model. And even when the letters are visible, counting repeated items is a separate weakness. It's the same reason AI can miss an exact word count or character limit: it produces tokens, not words or characters.

OpenAI's "Strawberry": the o1 codename

There's a second reason people search "strawberry AI" and "ChatGPT strawberry", and it has nothing to do with spelling.

In July 2024, Reuters reported that OpenAI was developing new reasoning technology under the code name "Strawberry". On September 12, 2024, OpenAI released it as o1-preview and o1-mini, models built to spend more time thinking before they respond. Headlines at launch called it the "Strawberry" model (Axios (opens in a new tab)). Both o1-preview and o1-mini have since been retired from OpenAI's API.

Was the codename picked because of the r-counting meme? Nobody has confirmed that. The name fit the joke perfectly, but as far as anyone has verified, it's a coincidence. Treat any story that says otherwise as rumor.

Do AI models get it right now?

Newer models usually get "how many r's in strawberry" right. There's no official benchmark tracking this one question across models, so we won't name which ones pass or fail. But the reason they improved is well understood, and it's worth knowing because it tells you how to get better answers from any AI.

Reasoning helps. Reasoning models (like the o1 family that started as "Strawberry") work through a problem step by step before answering. For a letter-counting question, that often means writing the word out letter by letter first. Once the letters are written out separately, each one becomes its own token, and the counting problem gets much easier.

Tool use helps even more. Many chatbots can now write and run a little code. A line of Python counts letters perfectly every time, because the computer is actually counting, not predicting.

The underlying limit hasn't gone away. The tokenizer still hands the model chunks, not letters. So similar questions, like letters in long or rare words, or counting items in a long block of text, can still trip models up. Don't assume a model is right just because it got strawberry right.

How to get correct letter counts from AI

You don't need to wait for a smarter model. Two simple prompts fix this.

Option 1: ask it to spell the word first

Make the model write out each letter separately before it counts. When the word is spelled with spaces or dashes, every letter becomes its own token. We checked: s t r a w b e r r y becomes 10 separate tokens, one per letter, with the r's as their own pieces.

Spell the word "strawberry" one letter at a time, with a number
next to each letter. Then count how many times the letter r appears,
and list the positions where it appears.

Option 2: ask it to count with code

If your chatbot can run code, ask it to. In Claude, that feature is called "Code execution and file creation", and it's available on every plan, including Free. Turn it on in Settings, then Capabilities (Anthropic help center (opens in a new tab)). ChatGPT has a similar data analysis feature that runs Python, depending on your plan and model.

Use code to count how many times the letter "r" appears in the
word "strawberry". Show me the code and its output.

The code it writes will look something like this, and it will always return 3:

"strawberry".count("r")

The bigger principle: AI reads, code counts

This is the same lesson as AI and arithmetic. Language models are great at reading and writing, but they predict the next token instead of actually calculating. Whenever an exact number matters, whether that's letters, words, a character limit or a sum, let the AI set up the work and let code or a spreadsheet do the counting. We go deeper on this in why is AI bad at math.

Other words built the same way

Strawberry isn't special. Any word that has a letter repeated three or more times, or a double letter, has the same shape of problem that Fu et al. found hard. Here are a few we ran through the GPT-4o tokenizer:

WordLetter countBare word splits intoIn a sentence
raspberry3 r's (r-a-s-p-b-e-r-r-y)ras · p · berryone token
Mississippi4 s's and 4 i'sMiss · issippione token
bookkeeper3 e's, plus double o, k and ebook · keepertwo tokens: book · keeper

Notice that raspberry has the exact same berry token hiding two of its r's. Mississippi is an even tougher case: four of the same letter, split across chunks that don't line up with the letters at all. We're not claiming any particular model gets these wrong today. The point is that the model sees chunks, not letters, so the spell-it-out or use-code prompts above are the safe way to ask.

Frequently asked questions

How many r's are in strawberry?

There are three r's in strawberry: s-t-r-a-w-b-e-r-r-y. One r comes right after the st, and the other two are the double rr in berry. The word has 10 letters in total.

Why did ChatGPT say strawberry has 2 r's?

Chatbots like ChatGPT read tokens, which are chunks of text, not individual letters. In a normal question, strawberry is a single token, so the model never sees its letters and has to recall the spelling from training. Research also shows models struggle to count a letter that appears more than twice, even when they can recognize it.

Why can't AI count letters?

Two reasons. First, the tokenizer turns text into chunks before the model sees it, so letters are hidden inside tokens. Second, a December 2024 study by Fu et al. found that models can recognize letters but struggle to count them, especially repeated ones. Asking the model to spell the word out first, or to count with code, fixes most of these errors.

What is Strawberry AI?

Strawberry was the reported codename for OpenAI's o1 reasoning model, first covered by Reuters in July 2024. OpenAI released it as o1-preview and o1-mini on September 12, 2024. There's no confirmed link between the codename and the r-counting meme.

Can AI count the r's in strawberry now?

Newer models usually get it right, mostly because reasoning models spell the word out letter by letter before counting, or run code to count. The token limit hasn't gone away, though, so similar questions about long or rare words can still trip them up. When accuracy matters, ask for a letter-by-letter spelling or a code-based count.

Get better answers from AI, starting today

The strawberry meme is funny, but the lesson is useful: AI is a reader and writer, not a counter or calculator. Ask it to spell things out, let code do the exact counting, and you'll get reliable answers. Try it in the free token counter to see how AI reads your own text.

If you want to learn how to use Claude for real work, with prompts like these built into everyday tasks, the free Claude Cowork course walks through it step by step, with no coding required.

Turn a good idea into a useful skill.

Practice what you’ve read with 12 interactive AI courses, from better prompts to real business workflows.

Explore the bundle — $39.99 →

← All guides


MIT 2026 © Nextra.