Type a tool name, for example "keyword density" or "transcript".
Count tokens with real AI tokenizers and calculate the API cost for GPT, Claude, Gemini, Grok, DeepSeek and Mistral.
Counting happens in your browser. Files: text, Markdown, CSV, JSON, code or .docx, up to 20 MB.
Loading the exact tokenizer...
Above 200,000 characters, the character and word counts use a faster method and can differ slightly.
The number of tokens the model writes back. Reasoning models also bill their thinking as output.
The share of each prompt read from the cache, such as a long system prompt you resend.
~ marks an estimate. Estimates scale the exact GPT o200k count by a ratio for each tokenizer and writing system. The real count can differ by 15% or more, most often for code and non-English text. Use the exact count button for Claude and Gemini.
OpenAI models: exact. GPT-5, GPT-4.1, GPT-4o and the o-series use the o200k_base tokenizer, and GPT-4 and GPT-3.5 use cl100k_base. This tool runs both in your browser and matched OpenAI's own tiktoken library token for token on 460 test texts each, including code, JSON, emoji and 8 languages.
GPT-6: very likely exact. OpenAI has not published the GPT-6 tokenizer, so the tool shows the o200k_base count used by every GPT-5 model.
Claude and Gemini: exact on request. Anthropic and Google do not publish their tokenizers. The tool shows an estimate first. The exact count button sends your text to the provider's free token counting service, which returns the real number. The text is not stored. Claude needs noticeably more tokens than GPT for the same text: the sample text on this page is 137 tokens with o200k_base and 197 tokens on Claude Sonnet 5.5. Anthropic says Claude models from Opus 4.7 onward use about 30% more tokens than earlier Claude models.
Grok, DeepSeek and Mistral: estimates. The estimate scales the exact o200k count by a ratio for each writing system. For DeepSeek and Mistral, the ratios were measured with their published tokenizers: close to 1 for English and code, about 2.2 for Hindi, and 0.76 (DeepSeek) to 1.26 (Mistral) for Chinese.
Chat requests. Paste a messages array and the tool adds the formatting tokens each message costs (OpenAI: about 3 per message plus 3 for the reply).
Standard prices in US dollars, checked on 22 October 2026 on each provider's official pricing page. Batch, regional and priority prices differ.
| Model | Input | Cached input | Output | Context | Tokenizer and notes |
|---|---|---|---|---|---|
| OpenAI | |||||
| GPT-6.1 Sol gpt-6.1-sol |
$2.00 | $0.10 | $10.00 | 1.05M | o200k_base (assumed). Over 272K input tokens: $4.00 input, $15.00 output |
| GPT-6 Astra gpt-6-astra |
$10.00 | $1.00 | $50.00 | 1.05M | o200k_base (assumed). Over 272K input tokens: $20.00 input, $75.00 output |
| GPT-6 Luna gpt-6-luna |
$0.10 | $0.01 | $0.50 | 1.05M | o200k_base (assumed). Over 272K input tokens: $0.20 input, $0.75 output |
| GPT-5.6 Sol gpt-5.6-sol |
$4.00 | $0.40 | $20.00 | 1.05M | o200k_base (exact). Over 272K input tokens: $8.00 input, $30.00 output. Promotional price, offered at least until 21 November 2026. |
| GPT-5.6 Terra gpt-5.6-terra |
$2.00 | $0.20 | $12.00 | 1.05M | o200k_base (exact). Over 272K input tokens: $4.00 input, $18.00 output |
| GPT-5.6 Luna gpt-5.6-luna |
$0.20 | $0.02 | $1.20 | 1.05M | o200k_base (exact). Over 272K input tokens: $0.40 input, $1.80 output |
| GPT-5.5 gpt-5.5 |
$5.00 | $0.50 | $30.00 | 1.05M | o200k_base (exact). Over 272K input tokens: $10.00 input, $45.00 output |
| GPT-5.4 gpt-5.4 |
$2.50 | $0.25 | $15.00 | 1.05M | o200k_base (exact). Over 272K input tokens: $5.00 input, $22.50 output |
| GPT-5.4 mini gpt-5.4-mini |
$0.75 | $0.075 | $4.50 | 400K | o200k_base (exact) |
| GPT-5.4 nano gpt-5.4-nano |
$0.20 | $0.02 | $1.25 | 400K | o200k_base (exact). OpenAI shuts this model down on 1 April 2027. |
| Anthropic | |||||
| Claude Sonnet 5.5 claude-sonnet-5-5 |
$2.00 | $0.10 | $10.00 | 1M | Claude tokenizer (Opus 4.7 and later, Sonnet 5 and later) |
| Claude Opus 5.5 claude-opus-5-5 |
$4.00 | $0.20 | $20.00 | 1M | Claude tokenizer (Opus 4.7 and later, Sonnet 5 and later) |
| Claude Fable 5.1 claude-fable-5-1 |
$10.00 | $0.25 | $50.00 | 1M | Claude tokenizer (Opus 4.7 and later, Sonnet 5 and later) |
| Claude Haiku 5.5 claude-haiku-5-5 |
$0.10 | $0.01 | $0.50 | 1M | Claude Haiku 5.5 tokenizer. Over 100K input tokens: $0.50 input, $2.50 output |
| Gemini 4 Argon gemini-4-argon |
$2.00 | $0.10 | $10.00 | 1.05M | Gemini tokenizer. Google raises this to $4 input, $0.20 cached and $20 output on 1 December 2026. |
| Gemini 3.8 Flash gemini-3.8-flash |
$0.75 | $0.075 | $3.75 | 1.05M | Gemini tokenizer. Google doubles this price on 1 January 2027 ($1.50 input, $7.50 output). |
| Gemini 3.5 Flash-Lite gemini-3.5-flash-lite |
$0.30 | $0.03 | $2.50 | 1.05M | Gemini tokenizer |
| Gemini 3.1 Flash-Lite gemini-3.1-flash-lite |
$0.25 | $0.025 | $1.50 | 1.05M | Gemini tokenizer |
| Gemini 3.1 Pro Preview gemini-3.1-pro-preview |
$2.00 | $0.20 | $12.00 | 1.05M | Gemini tokenizer. Over 200K input tokens: $4.00 input, $18.00 output |
| xAI | |||||
| Grok 4.7 grok-4.7 |
$2.00 | $0.50 | $6.00 | 500K | Grok tokenizer. Over 200K input tokens: $4.00 input, $12.00 output |
| Grok 4.3 grok-4.3 |
$1.25 | $0.20 | $2.50 | 1M | Grok tokenizer. Over 200K input tokens: $2.50 input, $5.00 output |
| Grok Build 0.1 grok-build-0.1 |
$1.00 | $0.20 | $2.00 | 256K | Grok tokenizer. Over 200K input tokens: $2.00 input, $4.00 output |
| DeepSeek | |||||
| DeepSeek V4.1 Flash deepseek-flash |
$0.30 | $0.006 | $1.20 | 1M | DeepSeek V4 tokenizer. Peak price. DeepSeek charges half outside 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday. |
| DeepSeek V4 Pro deepseek-v4-pro |
$1.32 | $0.044 | $3.96 | 1M | DeepSeek V4 tokenizer. Peak price. DeepSeek charges half outside 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday. |
| Mistral AI | |||||
| Mistral Large 3 mistral-large-2512 |
$0.50 | - | $1.50 | 256K | Mistral Tekken tokenizer |
| Mistral Medium 3.5 mistral-medium-3-5 |
$1.50 | $0.15 | $7.50 | 256K | Mistral Tekken tokenizer. Price updated on 22 October 2026 |
| Mistral Small 4 mistral-small-2603 |
$0.15 | - | $0.60 | 256K | Mistral Tekken tokenizer |
| Mistral Large 4 (preview) mistral-large-4 |
$0.68 | $0.068 | $2.09 | 1M | Mistral Tekken tokenizer. Public preview.. Price updated on 22 October 2026 |
| Model | Input | Cached input | Output | Context | Tokenizer and notes |
|---|---|---|---|---|---|
| OpenAI | |||||
| GPT-6 Sol gpt-6-sol |
$2.00 | $0.20 | $10.00 | 1.05M | o200k_base (assumed). Over 272K input tokens: $4.00 input, $15.00 output |
| GPT-5.2 gpt-5.2 |
$1.75 | $0.175 | $14.00 | 400K | o200k_base (exact) |
| GPT-5 gpt-5 |
$1.25 | $0.125 | $10.00 | 400K | o200k_base (exact). OpenAI shuts this model down on 11 December 2026. |
| GPT-5 mini gpt-5-mini |
$0.25 | $0.025 | $2.00 | 400K | o200k_base (exact). OpenAI shuts this model down on 11 December 2026. |
| GPT-5 nano gpt-5-nano |
$0.05 | $0.005 | $0.40 | 400K | o200k_base (exact). OpenAI shuts this model down on 11 December 2026. |
| GPT-4.1 gpt-4.1 |
$2.00 | $0.50 | $8.00 | 1.05M | o200k_base (exact). OpenAI shuts this model down on 14 January 2027. |
| GPT-4.1 mini gpt-4.1-mini |
$0.40 | $0.10 | $1.60 | 1.05M | o200k_base (exact). OpenAI shuts this model down on 14 January 2027. |
| GPT-4.1 nano gpt-4.1-nano |
$0.10 | $0.025 | $0.40 | 1.05M | o200k_base (exact) |
| GPT-4o gpt-4o |
$2.50 | $1.25 | $10.00 | 128K | o200k_base (exact). OpenAI shuts this model down on 14 January 2027. |
| GPT-4o mini gpt-4o-mini |
$0.15 | $0.075 | $0.60 | 128K | o200k_base (exact). OpenAI shuts this model down on 14 January 2027. |
| o4-mini o4-mini |
$1.10 | $0.275 | $4.40 | 200K | o200k_base (exact) |
| o3 o3 |
$2.00 | $0.50 | $8.00 | 200K | o200k_base (exact). OpenAI shuts this model down on 11 December 2026. |
| GPT-4 Turbo gpt-4-turbo-2024-04-09 |
$10.00 | - | $30.00 | 128K | cl100k_base (exact) |
| GPT-4 gpt-4-0613 |
$30.00 | - | $60.00 | 8.2K | cl100k_base (exact) |
| Anthropic | |||||
| Claude Sonnet 5 claude-sonnet-5 |
$2.00 | $0.20 | $10.00 | 1M | Claude tokenizer (Opus 4.7 and later, Sonnet 5 and later) |
| Claude Opus 5 claude-opus-5 |
$5.00 | $0.50 | $25.00 | 1M | Claude tokenizer (Opus 4.7 and later, Sonnet 5 and later) |
| Claude Fable 5 claude-fable-5 |
$10.00 | $1.00 | $50.00 | 1M | Claude tokenizer (Opus 4.7 and later, Sonnet 5 and later) |
| Claude Opus 4.8 claude-opus-4-8 |
$5.00 | $0.50 | $25.00 | 1M | Claude tokenizer (Opus 4.7 and later, Sonnet 5 and later) |
| Claude Sonnet 4.6 claude-sonnet-4-6 |
$3.00 | $0.30 | $15.00 | 1M | Claude tokenizer (Sonnet 4.6, Haiku 4.5) |
| Claude Haiku 4.5 claude-haiku-4-5 |
$1.00 | $0.10 | $5.00 | 200K | Claude tokenizer (Sonnet 4.6, Haiku 4.5) |
| Gemini 3.6 Flash gemini-3.6-flash |
$0.75 | $0.075 | $3.75 | 1.05M | Gemini tokenizer. Google doubles this price on 1 January 2027 ($1.50 input, $7.50 output). |
| Gemini 3 Flash Preview gemini-3-flash-preview |
$0.50 | $0.05 | $3.00 | 1.05M | Gemini tokenizer |
| Gemini 2.5 Pro gemini-2.5-pro |
$1.25 | $0.125 | $10.00 | 1.05M | Gemini tokenizer. Over 200K input tokens: $2.50 input, $15.00 output |
| Gemini 2.5 Flash gemini-2.5-flash |
$0.30 | $0.03 | $2.50 | 1.05M | Gemini tokenizer |
| Gemini 2.5 Flash-Lite gemini-2.5-flash-lite |
$0.10 | $0.01 | $0.40 | 1.05M | Gemini tokenizer |
For English text, OpenAI puts one token at about 4 characters or 0.75 words. Anthropic says its current Claude models use about 30% more tokens for the same text, and Google puts 100 Gemini tokens at about 60 to 80 English words. Other languages, code and numbers use more tokens per word.
| Tokens | About this many English words | About this many characters |
|---|---|---|
| 1 | 0.75 | 4 |
| 100 | 75 | 400 |
| 1,000 | 750 | 4,000 |
| 10,000 | 7,500 | 40,000 |
| 100,000 | 75,000 | 400,000 |
| 1,000,000 | 750,000 | 4,000,000 |
A token calculator counts how many tokens your text uses in an AI model and turns that count into an API cost. Paste a prompt, a chat request or a file, pick a model from GPT, Claude, Gemini, Grok, DeepSeek or Mistral, and see your token count, context window use and the price per request and per month.
A token is the small chunk of text an AI model reads and writes, and tokenization is the step that splits your text into those chunks. A token can be a whole short word, part of a long word, a number, a punctuation mark or a line break.
Models do not see letters or words. They see a list of token IDs, and every limit and price is based on that list. Your context window is measured in tokens, and API providers bill per million tokens.
For ordinary English, a widely used rule of thumb is that one token is about four characters, or about three quarters of a word. So 1,000 words come to roughly 1,300 tokens. Code, tables, URLs, emoji and languages such as Chinese, Japanese or Arabic usually split into more tokens per word, so the same idea can cost more.
Each model family has its own tokenizer, so the same text gives slightly different counts in different models. This is why a single rule of thumb is useful for planning, but a real count is better for budgeting.
You can get a token count and a cost estimate in a few steps, and you do not need an account to try it.
Say you run a support assistant that sends the same 1,500-word help article plus a customer question with every request. That is about 2,000 input tokens per request, and you expect replies of about 500 tokens. You expect 10,000 requests a month.
For the math, assume a model priced at $2 per 1M input tokens and $8 per 1M output tokens. These prices are only an example, so check the live prices in the table for the model you choose.
Now suppose the 1,500-word article is the same in every call. If you set Cached input (prompt caching), % to a high share, the cached part is billed at the lower cached-input rate shown in the price table, and the monthly figure drops. Output tokens often cost several times more than input tokens, so a long reply can cost more than a long prompt.
Each result answers one planning question: does the text fit, what does it cost, and which model is the best value for the job.
The big number is the token count for the selected model. A badge tells you whether it is an exact count or an estimate. Use exact counts for tight limits, and treat estimates as a planning figure with a small margin of error.
The bar shows your tokens as a share of the model's context window. Below about 70% you have comfortable room. Once the bar turns amber, you may leave too little space for the reply. A red bar means the text is over the limit and must be shortened or split. Remember that the model's answer also uses the same window, so leave space for output.
Cost per request is useful for comparing prompts. Cost for the period is useful for budgets. If the monthly number is higher than you expected, try these fixes in order:
The tool also shows characters and words, plus a quick answer to How many words is a token? for your own text. A ratio far from the usual 0.75 words per token is a hint that your text has a lot of code, numbers or non-English content.
The section See how your text splits into tokens shows your text with each token highlighted in alternating colors. Choose a Tokenizer: o200k_base is used by GPT-5, GPT-4.1, GPT-4o and the o-series, and cl100k_base is used by GPT-4, GPT-4 Turbo and GPT-3.5.
Turn on Show spaces and line breaks to see that a leading space is often part of a token. Turn on Show token IDs to see the number the model actually receives. This view explains surprises, such as why an unusual product name takes five tokens while a common word takes one.
It helps anyone who writes prompts or pays for AI usage, and it saves guessing before you send a request.
Most wrong estimates come from a few predictable input mistakes, and each has a simple fix.
OpenAI counts use the real tokenizers and are exact for the models that share them. For Claude, Gemini, Grok, DeepSeek and Mistral, a count may be an estimate scaled from the GPT count, and the badge says so. Estimates are good for budgeting, but they can differ from the provider's own figure by a few percent.
For very large texts, above 200,000 characters, the character and word counts use a faster method and can differ slightly from a word processor. Prices and context sizes are a snapshot, so they can lag behind a provider's announcement. Finally, a token count is not a quality measure, and a cheaper model is only a better choice if it still does the job.
Paste your own prompt or load the sample in the calculator above, pick a model, and you will see your token count and cost in seconds. Then adjust the output size, request volume and caching to see what your real bill could look like.
Your report has been submitted. We will look into this issue.
A VPN changes your network exit. It does not guarantee anonymity.
Themes, plugins, code, video, audio, graphics & more from 90,000+ authors.
Web Development
Design & Media
Unlimited Access
Explore Envato Market