Estimate only — not a real tokenizer. Blends a character-based and a word-based heuristic and shows the spread between them, rather than a single falsely precise number.
| Model | Input cost | Est. total |
|---|
Rates as of September 17, 2026, per-million-token list pricing from Anthropic, OpenAI, and Google. Verify current pricing on the provider’s own pricing page before committing to production spend — token pricing has moved at least once per lab since mid-2026.
Why not just show one exact number?
Because there isn’t one. Claude, GPT, and Gemini each tokenize text with their own vocabulary — trained on different data, split with different rules, and kept proprietary by each lab. The same paragraph can come out to 210 tokens on one model and 245 on another, and neither number is wrong. They’re just different tokenizers doing their job.
A browser tool could load one provider’s real tokenizer and give you an exact count — for that one model. It would then be quietly wrong for the other two, while looking exactly as confident as the correct number. That’s a worse outcome than an honest estimate: it trades a visible approximation for an invisible one. This tool shows a range instead, built from a heuristic you can inspect, so you know exactly how much to trust it.
How the estimate is calculated
The estimator runs two independent heuristics on your text and shows you the spread between them, rather than averaging away the uncertainty:
Word-based: tokens ≈ words ÷ 0.75 (prose)
Both are long-standing rules of thumb for English text on modern byte-pair-encoding tokenizers: roughly four characters per token, or roughly 0.75 words per token. They rarely agree exactly, and that disagreement is useful — it’s the honest margin of error, not a bug to hide.
Content-type adjustments
Plain English prose, source code, and CJK text tokenize at meaningfully different densities, so the tool adjusts both ratios based on what you tell it you pasted:
- Prose — the defaults above. Natural-language words are split less aggressively than symbols.
- Code — roughly 3.2 characters per token and 0.5 words per token. Punctuation, brackets, and indentation each tend to consume their own token, so code reliably runs denser than prose of the same length.
- CJK / non-Latin script — roughly 1.8 characters per token, using the character-based estimate alone. Word-splitting on whitespace doesn’t apply to Chinese, Japanese, or Korean text, and these scripts pack far more meaning per character than English does.
None of these ratios are universal constants — they’re averages across typical text. A prompt that’s mostly punctuation, rare tokens, or a mix of languages will estimate less accurately than plain conversational English. Treat the range as a planning number, not a billing number.
Reading the cost table
Every model bills input tokens (what you send) and output tokens (what it generates) at different rates — output is typically five to six times more expensive than input across every lab in this table. The “Input cost” column prices only what you pasted; “Est. total” adds an expected reply length on top, so you can see what a realistic round trip actually costs rather than just the half of the bill you’re looking at.
The rates behind this table were checked against each provider’s own pricing documentation on September 17, 2026. All three labs have changed at least one pricing tier since mid-2026, and Anthropic’s introductory Sonnet rate became the permanent list price only weeks before this was written — so treat “current pricing” as a moving target, not a fixed fact, and re-check before any spend decision that matters.
When this actually matters
- Before you send a large prompt. A 50-page PDF pasted into a chat window can blow past a smaller model’s context window before you find out the hard way.
- Routing requests by cost. If you’re building an app that sends easy queries to a cheap model and hard ones to a flagship model, you need a fast way to eyeball token counts across the whole lineup — not just one.
- Chunking documents for retrieval. RAG pipelines split source documents into chunks sized to a token budget, not a character count. Getting the ratio wrong means chunks that are too small (wasted calls) or too large (truncated context).
- Forecasting a batch job. Multiply an estimated per-item token count by the number of items before you queue ten thousand API calls, not after.
- Comparing providers honestly. Sticker price per million tokens is meaningless without knowing how many tokens your actual content produces on that model’s tokenizer — a “cheaper” model that tokenizes less efficiently can cost more in practice.
Frequently asked questions
Is this token estimator exact?
No, and it’s built to never pretend otherwise. It typically lands within about 10 to 15 percent of what a real tokenizer counts on ordinary English prose, and further off on code-heavy or multilingual text. For an exact number, use the token count a provider’s own API returns in the response, or their published tokenizer library.
Why do different AI models count tokens differently?
Each lab trains its own byte-pair or sentencepiece vocabulary on its own data mix, then splits new text against that vocabulary. There’s no shared standard — a sentence that’s 40 tokens on one model can be 46 or 35 on another, and all three counts are “correct” for their respective tokenizer.
Does code really use more tokens than prose of the same length?
Generally, yes. Indentation, brackets, operators, and short variable names each tend to become their own token or close to it, while natural-language words are often split less aggressively. Two blocks of text with an identical character count can differ noticeably in token count depending on how much of that text is code versus prose.
What about CJK, Arabic, or other non-Latin scripts?
Chinese, Japanese, and Korean text typically runs far fewer characters per token than English — often close to one or two characters per token instead of roughly four — because these scripts carry more meaning per character. Text in Arabic, Cyrillic, and other non-Latin scripts also tends to tokenize less efficiently than English on most current vocabularies, though not as extremely as CJK. If most of your prompt isn’t English, lean toward the CJK / non-Latin mode and treat the number as a looser estimate than usual.
Do images, audio, or file uploads use tokens too?
Yes, on multimodal models — but not through this calculator. Image and audio inputs are converted to tokens using separate, provider-specific formulas based on resolution or duration rather than character count, so this text-based heuristic doesn’t apply to them. Check the relevant provider’s multimodal pricing page for those conversions.
Why does the estimate show a range instead of one number?
Because a single number would imply precision this method doesn’t have. The character-based and word-based heuristics rarely agree exactly, and showing both bounds is more honest — and more useful for budgeting — than collapsing them into an average that hides how uncertain the estimate really is.