Claude Token Counter
Estimates for Anthropic's Claude models, from Anthropic's own figures, in your browser.
How do you count Claude tokens? Anthropic does not ship a tokenizer you can run locally, so this page estimates from Anthropic's own figures: about 3.5 English characters per token on Claude 4.6 and earlier, and about 30% more tokens for the same text on Claude 4.7 and later. For an exact count, Anthropic's count_tokens endpoint is free, but it needs an API key on an account with credit.
$2 input · $10 output per 1M tokens
- Input tokens (est.)
- 0 · $0.00000
- Output cost
- $0.0050
Same text on other models
Runs in your browser. OpenAI models show exact counts from the official tiktoken tokenizer (o200k_base). Other providers are estimates from characters-per-token ratios, so treat them as a guide; for exact counts use Anthropic's count_tokens endpoint or Gemini's countTokens method. Prices shown are standard rates; some models charge more for very long prompts (for example OpenAI GPT-5.5 and later above 272K input tokens, xAI above 200K, Claude Haiku 5.5 above 100K).
Why do Claude 4.7 and later models use more tokens?
Anthropic changed tokenizers with Claude Opus 4.7. Its glossary says the newer one produces approximately 30 percent more tokens for the same text than earlier models, where a token is about 3.5 English characters. The counter applies that: 3.5 characters per token for Claude 4.6 and earlier, and 2.7 for Claude 4.7 and later, which is why the same paste shows a higher count on Claude 5.5 than on Claude 4.6.
This changes how to compare prices. Per million characters of input, Claude Sonnet 4.6 works out to $0.857 and Claude Sonnet 5.5 to $0.741, so the newer model costs less per character. Claude Opus 5.5 comes to $1.48 against $1.43 for Claude Opus 4.6: more per character, even though its price per token is lower. Compare on characters, or on your own prompt, before you switch.
How do you get an exact Claude token count?
Call Anthropic's count_tokens endpoint with the model ID you plan to use. Anthropic says token counting is free, with its own rate limits by usage tier: 5,000 requests a minute on Start, 10,000 on Build and 20,000 on Scale, separate from your message limits. It needs an API key, and the account must have credit: when we called it from an account with a zero balance on 6 Nov 2026, it refused with "Your credit balance is too low". Anthropic notes the result is itself an estimate that can differ from the billed count by a small amount.
Do not reuse counts from an older Claude model when you price a newer one. Anthropic's docs warn against exactly that, because the tokenizer change moves the count. The usage block in each Messages API response is the final word for billing.
What does a Claude prompt cost?
Multiply the estimated input tokens by the model's input price and add the reply at the output price. The counter does this per call and per day for each Claude model you select, and the LLM cost calculator carries it to a monthly bill with caching. Current rates, including cached input and the 50% batch discount, are in our Claude API prices table, and the Claude API pricing page ranks every model by price per character. New accounts only get a small trial credit, so check is the Claude API free before you plan around it.
Frequently asked
Is there an official Claude tokenizer I can download?
Not for current Claude models. Anthropic's docs point to the count_tokens endpoint and to the usage numbers in each API response instead. That is why this page shows estimates, marked with a tilde, rather than exact counts.
Does Anthropic charge for count_tokens?
No. Anthropic says token counting is free to use. It has its own requests-per-minute limit by tier (5,000 on Start, 10,000 on Build, 20,000 on Scale) that does not eat into your message limits. It needs an API key, and in our test it refused accounts with a zero credit balance, so add a small amount of credit first.
Can the Claude estimate be wrong?
Yes, by a margin. Anthropic's 3.5-characters figure is for English prose. Code, tables, JSON and non-English text usually take more tokens per character: when we measured how many tokens a word is on OpenAI and Gemini, JSON took three to four times as many tokens per word as English fiction. Treat the estimate as a planning number and confirm large jobs with count_tokens.