Enhancements in Claude Token Counter for Model Comparisons
By Simon Willison

AI Summary
I've enhanced the Claude Token Counter tool to facilitate comparisons between different Claude models, particularly focusing on the new Opus 4.7. This model introduces a revised tokenizer, making it the first to alter tokenization since its predecessors. While the API can process any Claude model ID, the most meaningful comparisons are between Opus 4.7 and 4.6. The Opus 4.7 tokenizer, as announced by Anthropic, processes text more efficiently but results in a higher token count, ranging from 1.0 to 1.35 times more tokens depending on the content. My tests showed Opus 4.7 using 1.46 times more tokens than Opus 4.6 for the same input.
Despite the increased token count, Opus 4.7 maintains the same pricing as Opus 4.6, which could lead to a 40% rise in costs due to token inflation. The tool also supports image token counting, with Opus 4.7 handling higher resolution images up to 2,576 pixels on the long edge, significantly more than previous models. A test with a 3456x2234 pixel image showed a 3.01x increase in token count compared to Opus 4.6, attributed to the model's enhanced image processing capability.
Further tests with a 15MB, 30-page PDF revealed a modest 1.08x increase in token count for Opus 4.7 over 4.6, a smaller multiplier than observed with raw text. This suggests that while Opus 4.7's tokenizer is more advanced, the impact on token count varies significantly with content type.
Key Concepts
Tokenization is the process of converting a sequence of text into smaller, manageable pieces called tokens, which can be words, characters, or subwords.
Model comparison involves evaluating different machine learning models to understand their performance, efficiency, and suitability for specific tasks.
Category
AIOriginal source
https://simonwillison.net/2026/Apr/20/claude-token-counts/More on Discover
Summarized by Mente
Save any article, video, or tweet. AI summarizes it, finds connections, and creates your to-do list.
Start free, no credit card