AI Token Counter
Paste your text, see token counts across every frontier model. Plus a monthly cost calculator so you can budget before shipping that workload to production.
Tokens per model
| Model | Provider | Tokens | vs cheapest |
|---|---|---|---|
| GPT-5 / GPT-4.1 / o-series | OpenAI | 20 | — |
| GPT-5 Mini | OpenAI | 20 | — |
| Gemini 3 Pro | 20 | — | |
| Gemini 3 Flash | 20 | — | |
| Grok 4 | xAI | 20 | — |
| DeepSeek V4 | DeepSeek | 20 | — |
| Claude 4.7 Opus | Anthropic | 21 | +1 |
| Claude 4.6 Sonnet | Anthropic | 21 | +1 |
| Claude 4.5 Haiku | Anthropic | 21 | +1 |
Estimated monthly cost
| Model | Input price / 1M | Output price / 1M | Monthly cost |
|---|---|---|---|
| DeepSeek V4 | $0.27 | $1.1 | $0.016 |
| Gemini 3 Flash | $0.35 | $1.4 | $0.021 |
| Claude 4.5 Haiku | $0.8 | $4 | $0.059 |
| GPT-5 Mini | $1.5 | $6 | $0.090 |
| Gemini 3 Pro | $3.5 | $14 | $0.210 |
| Claude 4.6 Sonnet | $3 | $15 | $0.221 |
| Grok 4 | $5 | $15 | $0.250 |
| GPT-5 / GPT-4.1 / o-series | $12.5 | $50 | $0.750 |
| Claude 4.7 Opus | $15 | $75 | $1.10 |
Token counts are estimates calibrated against actual model tokenizers (cl100k_base for GPT, the Claude tokenizer for Anthropic, etc.) and accurate within 5-8% for typical English text. Code, non-Latin scripts, and highly-formatted text may diverge more. For exact production accounting, use each provider's official tokenizer library.
Frequently asked questions
What is a token?
A token is the smallest unit of text an AI model processes. Models don't read characters or words directly — they break text into tokens, each typically 3-5 characters of English. The word 'happiness' is one token; 'antidisestablishmentarianism' is 4-5 tokens. AI providers bill per token, so understanding token counts is the basis of cost estimation.
How accurate is this counter?
Token counts are calibrated against the actual tokenizers each provider uses (cl100k_base for OpenAI, the Claude tokenizer for Anthropic, the Gemini tokenizer for Google). For typical English prose, accuracy is within 5-8% of the real count. Code, non-Latin scripts, and highly-formatted text can diverge more. For production cost accounting, use each provider's official tokenizer library directly.
Why do different models tokenize the same text differently?
Each model is trained with its own tokenizer that was optimised for the training corpus. OpenAI's cl100k_base and Anthropic's tokenizer have similar token counts for English text but differ on code, non-Latin scripts, and special tokens. Gemini's tokenizer is slightly more efficient for English; DeepSeek's is optimised for Chinese and English jointly.
How do I reduce token costs?
Three main levers: (1) shorter prompts — every token in the system message is sent on every request, so trim aggressively, (2) use cached prompts where supported — re-sent prompts cost ~10% of fresh prompts on Anthropic, OpenAI, and Google, and (3) pick the right model — Claude Haiku, Gemini Flash, and DeepSeek V4 are 10-50x cheaper than frontier models for most tasks.
Does the counter include system prompts?
No — paste only the text you're sending to the model. If you have a system message, add it to the count separately (system messages count as input tokens on every request).
Related on Meridian48
The week in AI, Pakistan tech, and global business.
One email, every Friday morning. Curated and written by Faizan Khan. No filler. No tracking pixels. Unsubscribe in one click.