What is a token?
A token is the unit an LLM processes when it reads your prompt or writes a response. Tokens can be complete words, word pieces, punctuation, whitespace, numbers, emoji, or fragments of code.
Count tokens, estimate API cost, compare models, and check context-window limits for OpenAI, Claude, Gemini, Llama, Mistral, DeepSeek, Grok, and more.
Private by default · No signup · Local token counting where supported · Exact and estimated results clearly labeled
Your text is processed in your browser for supported local tokenizers. We do not store pasted prompts.
Compare the current prompt, expected output, and monthly call volume across every supported model.
| Model | Accuracy | Prompt tokens | Per-call cost | Monthly cost | Context fit |
|---|---|---|---|---|---|
| OpenAI · GPT-5.5gpt-5.5 | Exact | — | — | — | — |
| OpenAI · GPT-5.4gpt-5.4 | Exact | — | — | — | — |
| OpenAI · GPT-5.4 minigpt-5.4-mini | Exact | — | — | — | — |
| OpenAI · GPT-5.4 nanogpt-5.4-nano | Exact | — | — | — | — |
| Anthropic · Claude Fable 5claude-fable-5 | Estimated | — | — | — | — |
| Anthropic · Claude Opus 4.8claude-opus-4-8 | Estimated | — | — | — | — |
| Anthropic · Claude Sonnet 5claude-sonnet-5 | Estimated | — | — | — | — |
| Anthropic · Claude Sonnet 4.6claude-sonnet-4-6 | Estimated | — | — | — | — |
| Anthropic · Claude Opus 4.6claude-opus-4-6 | Estimated | — | — | — | — |
| Anthropic · Claude Haiku 4.5claude-haiku-4-5-20251001 | Estimated | — | — | — | — |
| Google · Gemini 3.5 Flashgemini-3.5-flash | Estimated | — | — | — | — |
| Google · Gemini 3.1 Pro Previewgemini-3.1-pro-preview | Estimated | — | — | — | — |
| Google · Gemini 3.1 Flash-Litegemini-3.1-flash-lite | Estimated | — | — | — | — |
| Google · Gemini 3 Flash Previewgemini-3-flash-preview | Estimated | — | — | — | — |
| Google · Gemini 2.5 Progemini-2.5-pro | Estimated | — | — | — | — |
| Google · Gemini 2.5 Flashgemini-2.5-flash | Estimated | — | — | — | — |
| Google · Gemini 2.5 Flash-Litegemini-2.5-flash-lite | Estimated | — | — | — | — |
| Mistral · Mistral Largemistral-large-latest | Estimated | — | — | — | — |
| Mistral · Mistral Mediummistral-medium-latest | Estimated | — | — | — | — |
| Mistral · Mistral Smallmistral-small-latest | Estimated | — | — | — | — |
| Mistral · Ministral 14Bministral-14b-latest | Estimated | — | — | — | — |
| DeepSeek · DeepSeek V4 Flashdeepseek-v4-flash | Estimated | — | — | — | — |
| DeepSeek · DeepSeek V4 Prodeepseek-v4-pro | Estimated | — | — | — | — |
| xAI · Grok 4.3grok-4.3 | Estimated | — | — | — | — |
| xAI · Grok Build 0.1grok-build-0.1 | Estimated | — | — | — | — |
| Meta · Llama 4 Scoutmeta-llama/Llama-4-Scout-17B-16E-Instruct | Estimated | — | — | — | — |
| Meta · Llama 4 Maverickmeta-llama/Llama-4-Maverick-17B-128E-Instruct | Estimated | — | — | — | — |
Estimated rows use one local OpenAI-compatible proxy token count, so real provider counts can differ. Pricing estimate based on public model pricing. Check provider pricing before production use.
Dedicated pages for specific providers and for API cost planning.
Exact counting and OpenAI encodings
The honest Estimated method
Context-window planning and Estimated counts
Compare monthly cost and find the cheapest model
Tokens vs words vs characters, counts-first
Use the calculator for real prompts, then use these notes to understand why the numbers matter.
A token is the unit an LLM processes when it reads your prompt or writes a response. Tokens can be complete words, word pieces, punctuation, whitespace, numbers, emoji, or fragments of code.
Token counts affect whether a prompt fits inside a model's context window and how much an API call may cost. Planning tokens before production helps prevent over-limit prompts and surprise monthly bills.
Input tokens are the prompt, examples, documents, and instructions you send. Output tokens are the model response you expect back. Many providers price output tokens higher, so expected response length matters.
OpenAI encodings supported by gpt-tokenizer are labeled Exact. Other providers are labeled Estimated and counted with a local OpenAI-compatible proxy tokenizer because those providers do not offer an official tokenizer that runs locally in the browser.
General ways to lower the number of tokens you send and receive.
Beginner-friendly answers about token counting, pricing estimates, context windows, and privacy.
A token is a chunk of text a language model reads or writes. A token can be a whole word, part of a word, punctuation, whitespace, a number, or part of code.
No. Words are a human writing unit. Tokens are a model processing unit. One short word may be one token, while a longer word, code snippet, emoji, or non-English text may split into multiple tokens.
For ordinary English prose, 1,000 tokens often lands around 700 to 800 words. The real number changes with language, formatting, code, JSON, punctuation, and the tokenizer used by the selected model.
Different model families use different tokenizers. The same prompt can split into different token pieces for OpenAI, Claude, Gemini, Llama, Mistral, DeepSeek, or Grok models.
It is Exact only for supported OpenAI encodings counted locally with gpt-tokenizer. Other providers are labeled Estimated and use an OpenAI-compatible tokenizer as a proxy, so real provider counts can vary.
No. Pasted text is processed in your browser. This site has no accounts, saved prompt history, analytics scripts, ad scripts, or server-side text processing.
Yes. You can paste code, JSON, Markdown, prose, or mixed documents. The calculator also shows word and character counts so you can compare text shape alongside tokens.
Yes. Use Import file locally for .txt, .md, or .json files. Files are read in your browser and are not uploaded to our server.
Input tokens are the prompt and context you send to the model. Output tokens are the model's response. Providers often price output tokens higher because generating text costs more compute than reading input.
Some providers discount repeated input that can be reused from cache. When a model publishes cached-input pricing, the calculator shows it separately. If a model does not publish it, the row stays empty or unavailable.
A context window is the maximum number of tokens a model can consider across input and expected output. If your total exceeds that limit, you need to shorten the prompt, reduce output length, or choose a larger-context model.
Yes. Enter expected output tokens and calls per month. The calculator combines those values with the selected model's public pricing to estimate per-call and monthly cost.
Remove repeated instructions, shorten examples, reduce expected output length, use smaller models for simple tasks, use cached input when available, and avoid sending full documents when a retrieved excerpt is enough.
The cheapest model depends on your prompt size, expected output length, and monthly volume. Use the comparison table to price the same text across all supported models; models without first-party pricing show Pricing varies by host.