Free tool
Token Counter.
Paste any text, get exact token counts across Claude, GPT-5, and Gemini. Plus the input cost for that single message, side-by-side.
Tokens (Claude Sonnet 4.6)
0
~0.0 USD input · just this message
Anthropic
Claude Opus 4.7
0
0% of 200K
Claude Sonnet 4.6
0
0% of 200K
Claude Haiku 4.5
0
0% of 200K
Google
Gemini 2.0 Pro
0
0% of 2000K
Gemini 2.0 Flash
0
0% of 1000K
Input cost for this exact message
What you'd pay just for the input tokens above. Output cost depends on your response length.
Claude Opus 4.7Anthropic
$0
Claude Sonnet 4.6Anthropic
$0
Claude Haiku 4.5Anthropic
$0
How accurate is this?
For OpenAI models, we use the actual cl100k_base tokenizer (the one GPT-4o and GPT-5 use internally), accurate to within 1%.
For Claude and Gemini, we use the industry-standard approximation: chars ÷ 3.8 for Claude and chars ÷ 4 for Gemini. These match the actual tokenizers within ~5% for English text. For exact counts, use the provider's tokenizer API.
Why count tokens?
- Cost forecasting, every token costs money. Knowing the input size before you ship saves invoices later.
- Context window planning: Claude has 200K tokens, Gemini 2M. Big difference, real implications.
- Prompt optimization, most prompts are 30-50% longer than they need to be. Cut tokens, cut cost.
- Eval calibration, when comparing models on the same task, knowing exact token counts removes confounds.
What's NOT counted here
- Image / audio / video tokens (priced differently by every provider)
- Conversation history tokens (we count one message at a time)
- System prompt tokens (paste them in to include)