LLM Token Counter
Count tokens for Claude, GPT-4, and Gemini side-by-side with live cost estimates.
Token counts across models
Cost projections assume the entire text is sent as input. Toggle the switch below to project as output, or use the slider for monthly-volume math.
| Model | Tokens | Cost / call | Cost / month |
|---|---|---|---|
| Claude 3.5 Sonnet anthropic · 200,000 ctx
| — | — | — |
| Claude 3 Opus anthropic · 200,000 ctx
| — | — | — |
| Claude 3 Haiku anthropic · 200,000 ctx
| — | — | — |
| GPT-4o openai · 128,000 ctx
| — | — | — |
| GPT-4o mini openai · 128,000 ctx
| — | — | — |
| GPT-3.5 Turbo openai · 16,385 ctx
| — | — | — |
| Gemini 1.5 Pro google · 2,000,000 ctx
| — | — | — |
| Gemini 1.5 Flash google · 1,000,000 ctx
| — | — | — |
FAQ
How is the token count calculated?
For OpenAI models we run the official BPE tokenizer (cl100k_base for
GPT-3.5/4, o200k_base for GPT-4o) via js-tiktoken — same exact algorithm
OpenAI uses. For Claude we use Anthropic's published Claude 2 tokenizer, which
matches Claude 3+ within ~5% for English text. For Gemini we approximate at ~4
chars/token because no public Gemini tokenizer exists.
Does my text leave the browser?
No. All tokenization is client-side. Nothing is sent to any server — not ours, not OpenAI's, not Anthropic's. Open your network tab and verify if you like.
Why are input and output prices different?
Providers charge more for tokens the model generates than for tokens you supply. Output tokens are computationally more expensive because the model decodes them autoregressively. The toggle above lets you project either side of the cost.
How much does 1M tokens cost in May 2026?
Roughly: Claude 3.5 Sonnet is $3 in / $15 out per 1M tokens. GPT-4o is $2.50 / $10. Claude Haiku is $0.25 / $1.25. GPT-4o-mini is $0.15 / $0.60. Gemini 1.5 Flash is $0.075 / $0.30. The cheap models are 20-100x cheaper than the flagship models — a big lever for high-volume apps.
Related
- → AI Cost Calculator (coming soon)
- → Claude System Prompt Analyzer (coming soon)
- → Anthropic Console — $5 free credit