Claude Token Counter, now with model comparisons

· Source: Simon Willison's Weblog · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Data Science & Analytics · Depth: Intermediate, quick

Summary

The Claude Token Counter tool has been updated to allow direct comparison of token counts across different Claude models, specifically highlighting changes introduced with Claude Opus 4.7. Anthropic's Opus 4.7 utilizes an updated tokenizer, leading to an increase in token consumption for the same input, ranging from 1.0x to 1.35x for text. Testing revealed that the Opus 4.7 system prompt consumed 1.46x more tokens with the new tokenizer compared to Opus 4.6. Despite maintaining the same pricing ($5/million input, $25/million output), this token inflation effectively makes Opus 4.7 approximately 40% more expensive for text. For images, Opus 4.7 supports higher resolutions up to 2,576 pixels on the long edge, which can lead to a 3.01x increase in tokens for high-resolution images, though smaller images show negligible difference. A 30-page PDF showed a 1.08x token multiplier for Opus 4.7.

Key takeaway

For AI/ML teams evaluating Claude models, you should use the updated Claude Token Counter to precisely assess the cost implications of migrating to Opus 4.7. Be aware that while pricing per token remains constant, the new tokenizer in Opus 4.7 can increase effective costs by up to 40% for text and significantly more for high-resolution images. Factor these increased token counts into your budget and model selection decisions, especially for vision-intensive applications.

Key insights

Claude Opus 4.7's new tokenizer increases token counts and effective cost for text and high-resolution images.

Principles

Method

The updated Claude Token Counter tool enables direct comparison of token counts for text and images across different Claude models, particularly between Opus 4.7 and prior versions, to assess cost implications.

In practice

Topics

Code references

Best for: CTO, VP of Engineering/Data, Director of AI/ML, AI Engineer, MLOps Engineer, Prompt Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Simon Willison's Weblog.