Claude Token Counter
Paste a prompt to estimate its Claude tokens and what it costs on each Anthropic model.
count_tokens endpoint.1.00× your input length — drag to model a shorter reply or a long generated response.
Anthropic prices per 1M tokens
| Model | Input | Cached input | Output |
|---|---|---|---|
| Claude Fable 5.1 | $10 | $0.25 | $50 |
| Claude Opus 5.5 | $4 | $0.2 | $20 |
| Claude Sonnet 5.5 | $2 | $0.1 | $10 |
| Claude Haiku 5.5 | $0.1 | $0.01 | $0.5 |
Standard rates from Anthropic's pricing page, checked 2026-10-31. Batch requests cost half. Estimate a monthly bill →
Counting Claude tokens
For an exact count, call Anthropic's free count_tokens endpoint (POST /v1/messages/count_tokens) with the same model ID you'll use — counts are model-specific.
- →Anthropic doesn't publish Claude's tokenizer, so any offline counter (this one included) is an estimate.
- →OpenAI's tiktoken undercounts Claude by roughly 15–20% on typical text, and more on code and non-English text — don't use it for Claude budgets.
- →Newer Claude models (Sonnet 5 and later, Haiku 5.5) use a newer tokenizer that counts about 30% more tokens for the same text than the models before them.
Frequently asked
How do I count Claude tokens exactly?
Send the request to the Messages API's count_tokens endpoint with your model ID; it returns input_tokens without running the model. Tokens differ between Claude generations, so count with the model you'll actually use.
Why does my Claude bill show more tokens than tiktoken said?
tiktoken is OpenAI's tokenizer. Claude splits text differently, typically into 15–20% more tokens, and newer Claude models count about 30% more than older ones.