Claude Token Counter

Paste a prompt to estimate its Claude tokens and what it costs on each Anthropic model.

~0
estimated tokens
0
words
0
characters
This is a character/word-based approximation, not the real tokenizer each provider uses internally — expect it to land within roughly 10–15% of the actual count for plain English text. For an exact count against Claude's own tokenizer, use the Messages API's count_tokens endpoint.
0 tokens

1.00× your input length — drag to model a shorter reply or a long generated response.

Claude Fable 5.1
Anthropic
$0.00
$10/$50 per 1M
Claude Opus 5.5
Anthropic
$0.00
$4/$20 per 1M
Claude Sonnet 5.5
Anthropic
$0.00
$2/$10 per 1M
Claude Haiku 5.5
Anthropic
$0.00
$0.1/$0.5 per 1M
GPT-6 Astra
OpenAI
$0.00
$10/$50 per 1M
GPT-6.1 Sol
OpenAI
$0.00
$2/$10 per 1M
GPT-6.1 Terra
OpenAI
$0.00
$1/$5 per 1M
GPT-6 Luna
OpenAI
$0.00
$0.1/$0.5 per 1M
Gemini 4 Argon
Google
$0.00
$2/$10 per 1M
Gemini 3.8 Flash
Google
$0.00
$0.75/$3.75 per 1M
Gemini 3.1 Pro (preview)
Google
$0.00
$2/$12 per 1M
Gemini 3.5 Flash-Lite
Google
$0.00
$0.3/$2.5 per 1M
Standard list prices from the Anthropic, OpenAI and Google pricing pages, checked 2026-10-31. For a monthly budget with caching and batch discounts, use the LLM API Cost Calculator.

Anthropic prices per 1M tokens

ModelInputCached inputOutput
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.

ToolNinja