Count tokens
Show how the text is split into tokens (o200k_base)
API cost calculator
Prices are per 1 million tokens. Pre-filled from each provider's public pricing page on 2026-11-09. Always check the source before budgeting.
Base per-token prices only. Prompt caching, batch discounts, long-context tiers, tools and regional uplifts can change the real bill. You can type your own prices above.
Compare models for your usage
Ranks models by what your usage would cost, using the input tokens, output tokens and requests per month from the calculator above.
| Model | Context | Input $/1M | Output $/1M | Per request | Per month |
|---|
Prefer a plain list? Browse all model prices or a single provider such as OpenAI, Anthropic or Google.
How accurate are these counts?
- OpenAI encodings (o200k_base, cl100k_base): exact for those encodings. Which encoding a specific newer OpenAI model uses isn't something this tool can confirm, so treat model-specific counts as close, not guaranteed.
- Claude: Anthropic's tokenizer isn't published for offline use, so the figure above is an estimate based on a public tokenizer and can differ from the real count. For billing-grade numbers use the token counting feature of the Claude API.
- Other models (Gemini, Llama, Mistral…): each has its own tokenizer. Use these numbers as a rough guide only.
- Overhead: chat formatting, system prompts, tool definitions and images add tokens that aren't in your pasted text.
FAQ
What is a token?
A token is a chunk of text, often a word, part of a word, or a punctuation mark, that a language model reads and writes. Models have limits and prices measured in tokens, not characters or words.
How many words is a token?
For typical English a token is about three quarters of a word, or around four characters. Code, numbers and many non-English languages use more tokens for the same amount of text.
Why do token counts differ between models?
Each model family has its own tokenizer and vocabulary, so the same text can produce different counts. That is why this page shows several counts side by side.
Is my text sent anywhere?
No. Counting runs entirely in your browser using a JavaScript tokenizer. Nothing you paste is uploaded or stored.