WordMeasure

Can AI count words? We tested Claude on 42 real texts

We gave two of Anthropic's Claude models 42 passages from classic books and asked them to count the words and the characters in each one. They were close every time, and exactly right less often than you might expect, especially with long texts and character counts.

Tested on 5 December 2026 with Claude Opus 5.5 and Claude Haiku 5.5, through Anthropic's API with each model's default settings. AI models change often, so newer versions may do better or worse. You can download every text and every answer at the end of this page.

The short answer

Yes, roughly. Claude's word counts were never more than 3% out, and on texts of 250 words or fewer the larger model was exactly right every time. On longer texts both models were often a few words out, and the smaller model got character counts exactly right only 10 times out of 42. If a limit really matters, check with a word counter.

Who countedWord counts exactly rightCharacter counts exactly rightWrote exactly the length asked
Claude Opus 5.535 of 4229 of 429 of 9
Claude Haiku 5.537 of 4210 of 428 of 9
WordMeasure42 of 4242 of 42Not tested

How we tested

We took 42 passages from six books in Project Gutenberg's free library: Pride and Prejudice, Frankenstein, Great Expectations, The Adventures of Sherlock Holmes, A Christmas Carol and Shakespeare's sonnets. They range from 22 to 2,009 words, in three styles: ordinary prose, dialogue full of quotation marks and short forms such as "don't", and verse with one line of poetry per line.

We changed dashes to commas and removed the underscores Gutenberg uses for italics, so that every passage has one right answer. Then we asked each model two questions about every passage:

  • How many words are there? The question gave the rule Microsoft Word uses: anything with a space or a line break either side is one word, so a hyphenated word counts once.
  • How many characters are there, counting spaces and line breaks?

We also asked each model to write nine short pieces of exactly 100, 250 and 500 words, on three everyday topics. Each question was asked once, and the models were free to think before answering, which they do by default. WordMeasure's own counter, the one on our home page, gave the right answer for all 84 counts.

Word counts: close, but not always exact

Both models were good with short texts. Claude Opus 5.5 counted every passage of 250 words or fewer exactly right, 24 out of 24. Claude Haiku 5.5 was exactly right on all 18 passages of up to 100 words.

Longer passages were a different story. On the 12 passages of about 1,000 and 2,000 words, Opus was exactly right only half the time, though never more than three words out. Haiku's biggest miss was a 2,009-word passage from Pride and Prejudice, which it counted as 2,042 words. That is 33 words too many, enough to matter if you are writing to a strict limit.

Verse caused the most slips for both models. Shakespeare's sonnets accounted for 5 of Opus's 7 misses and 3 of Haiku's 5.

Character counts are much harder

Character counts went wrong far more often, and this is where the two models split.

  • Claude Opus 5.5 was exactly right 29 times out of 42, and right every time for passages of up to 100 words. Its worst answer was 47 characters short on a sonnet passage of 2,662 characters, under 2% out.
  • Claude Haiku 5.5 was exactly right only 10 times out of 42, and never once on a passage of 250 words or more. Its worst answer was 2,078 for a Sherlock Holmes passage of 2,484 characters, 406 short or 16% out. On two of the longest passages it used up all the room it had to think and gave no answer at all.

This matters if you write for sites with a character limit, such as X, LinkedIn or Google Ads. Being 10 characters out can mean a post is cut off or rejected. Our guide to social media character limits lists the limits for each site.

Writing to an exact length went better

The surprise was how well both models wrote to a set length. Asked for exactly 100, 250 or 500 words, Opus hit the number all nine times. Haiku hit it eight times and wrote 495 words when asked for 500. Writing gives a model more control than counting, because it can build the text to fit, but it is worth checking the result before you rely on it.

Check any count in secondsOpen the word counter

Why AI models miscount

AI language models do not read text one word or one letter at a time. They read it in chunks called tokens, which are often parts of words, whole short words or a word with its space attached. To count words or letters, a model has to work out where each word starts and ends, and a long text gives it many chances to slip. Characters are harder still, because every space, comma and line break counts, and models are not built to see each one.

Thinking helps. Both models spent time working before they answered, a median of 14 seconds per question for Opus and 10 for Haiku. A word counter gives the answer as you type, and it counts the same way every time.

What this means for you

  • For a rough idea, AI is fine. On short texts the counts were usually right, and they were always close.
  • For a strict limit, use a counter. Essays, applications, ads and social posts can be marked down, cut off or rejected for going over. Paste the final text into a word counter before you submit it.
  • Be extra careful with characters. If the limit is in characters, do not rely on an AI's count at all, especially from a smaller, cheaper model.
  • Use an AI assistant with an exact counter. You can connect WordMeasure to ChatGPT or Claude so your assistant checks its work with a real counter instead of estimating.

The limits of this test

This round covers two Claude models only. We have not tested ChatGPT or Gemini, so these figures say nothing about how they count. We used the developer API rather than the Claude app, asked each question once and used each model's default settings, so results in a chat app may be a little different. The test is small, 93 questions per model, so treat the percentages as a guide rather than a precise measurement.

You can check our work. Download the texts, the right answers and every answer each model gave (JSON file). See how our counter works for the exact rules it follows.

Questions about AI and word counts

Can AI count words accurately?

Mostly, but not reliably. In our test Claude's word counts were never more than 3% out, but they were exactly right only 83% to 88% of the time, and less often on long texts. For anything with a strict limit, check with a word counter.

Why does AI get character counts wrong?

AI models read text in tokens, chunks that are often parts of words, so they do not see each letter, space and punctuation mark on its own. Counting every character means rebuilding all of that, and long texts give more room for mistakes. The smaller model we tested was exactly right on fewer than a quarter of its character counts.

Can I ask AI to write exactly 500 words?

You can, and in our test Claude often managed it: 17 of 18 pieces were exactly the length asked for, and the other was five words short. Different counters can disagree by a few words on the same text, so check the final version with the counter your teacher, client or site uses.

Does ChatGPT count words accurately?

We did not test ChatGPT in this round, so we cannot give you figures for it. It reads text in tokens in the same way, so it is worth checking its counts with a word counter too.

Related guides

Sign in to keep your work

Signing in is optional. It keeps your draft, saved documents, versions, goals, activity and settings in your account, so they are there on any device.

We only keep your email address, and your first name if you use Google. See our privacy notice.