Loading…
Loading…
Count tokens & estimate costs for GPT-5.4, Claude 4.6 & Gemini 3.1 Pro
Tokens (estimate)
0
Words
0
Characters
0
Sentences
0
Token counts here are an estimate from published rules of thumb, not a model tokenizer, and the same estimate is used for every model. For an exact count, use the provider's tokenizer or token-counting API. Claude 4.7 and later count approximately 30% more tokens for the same text, and the exact increase depends on the content.
Input cost
$3/1M tokens
Output cost
$15/1M tokens
Checked against each provider's own documentation. These are the providers' rules of thumb for English text, not exact counts.
| Provider | Official rule of thumb | Source |
|---|---|---|
| OpenAI | For English text: "1 token is approximately 4 characters", "1 token is approximately three-quarters of a word", and "100 tokens are approximately 75 words". OpenAI adds: "These are estimates, not exact counts." | OpenAI Help Center: Understanding and counting tokens |
| Google Gemini | "For Gemini models, a token is equivalent to about 4 characters. 100 tokens is equal to about 60-80 English words." | Gemini API docs: Understand and count tokens |
| Anthropic Claude | Claude 4.7 and later models use a newer tokenizer: "The same input text produces approximately 30 percent more tokens than on earlier models. The exact increase depends on the content and workload shape." Anthropic advises recounting prompts against the model you plan to use. | Claude API docs: Token counting |
This counter averages OpenAI's two English rules (about 4 characters per token and about three-quarters of a word per token). Code, numbers, non-English text and chat message formatting can all tokenize differently, so treat the result as a planning estimate.
Per 1M tokens. Prices from official provider pricing pages.
| Model | Provider | Input $/1M | Output $/1M | Context |
|---|---|---|---|---|
| Claude Opus 4.6NEW | Anthropic | $15 | $75 | 200K |
| Claude Sonnet 4.6NEW | Anthropic | $3 | $15 | 200K |
| Claude Haiku 4.5NEW | Anthropic | $0.8 | $4 | 200K |
| GPT-5.4NEW | OpenAI | $7.5 | $30 | 128K |
| GPT-4o | OpenAI | $2.5 | $10 | 128K |
| GPT-4o mini | OpenAI | $0.15 | $0.6 | 128K |
| Gemini 3.1 ProNEW | $1.25 | $5 | 2M | |
| Gemini 2.0 Flash | $0.1 | $0.4 | 1M |
Run your projects on Claude Code?
We packaged the .claude config that runs this site — 26 specialist agents, 14 workflow skills, and 6 rule files from 31 real production incidents. From $9.
Get the Claude Code Production Pack — $29Tokens are the fundamental unit of LLM pricing and context windows. Every character in a prompt is divided into tokens by the model's tokenizer — a subword segmentation algorithm (BPE for GPT models, SentencePiece for others) that maps common words to single tokens and rare words to multiple tokens. Knowing the token count before sending an API request enables accurate cost projection, ensures you stay within context window limits, and helps optimize prompt length to reduce per-call costs. This counter gives one token estimate for your text and shows real-time cost projections for 8 major models.
The token figure is an estimate. The counter takes OpenAI's two published rules of thumb for English text, 1 token is approximately 4 characters and 1 token is approximately three-quarters of a word, computes both, and shows their average. It does not run a model tokenizer, and the same estimate is used for every model in the comparison.
Cost is the estimated token count multiplied by each model's listed price per million tokens: the input cost shows what the text would cost as a prompt, and the output cost shows what it would cost if the model generated text of the same length.
Context window utilization is shown as a percentage bar: (estimated tokens / model context window limit) × 100. The bar changes color from green to yellow to red as utilization approaches the model's limit. Each model's context window is shown alongside its pricing for easy reference.
A developer pastes a system prompt and sample user message into the counter to get a rough sense of how much of a model context window they will use before checking the exact count with the provider tokenizer.
A team comparing Claude Sonnet and GPT-4o for a document analysis pipeline pastes a representative document and uses the cost comparison to project monthly spend at 1,000 documents per day.
A developer building a RAG system uses the counter to determine the maximum number of retrieved context chunks that can fit in the context window alongside the system prompt.
An indie developer uses the INR toggle to understand monthly API costs in rupees before deciding whether to build with Claude Haiku or Claude Sonnet for their chatbot product.
Scope note: Token counts are estimates from published rules of thumb, not tokenizer output, and no accuracy figure is claimed. Non-English text, code, numbers and chat message formatting can tokenize very differently. Claude 4.7 and later models produce approximately 30 percent more tokens than earlier Claude models for the same text, varying by content, and this counter does not apply that change. Use each provider's tokenizer or token-counting API when you need an exact count.
Paste or type your text in the input area
Select the AI model you plan to use
See the estimated token count, character count, and word count instantly
Check the context window bar to see what % of the model limit you are using
Expand "Compare all models" to see costs across all supported models
About the AI Token Counter
It is an estimate, not an exact count. The counter does not run any model's tokenizer. It averages two of OpenAI's published rules of thumb for English text: 1 token is approximately 4 characters, and 1 token is approximately three-quarters of a word. OpenAI itself calls these estimates, not exact counts. Real counts vary with the model, the language, code and numbers, and message formatting. For an exact count, use OpenAI's Tokenizer or tiktoken, Anthropic's token counting endpoint, or the Gemini API's count_tokens.
GPT-5.4, GPT-4o, GPT-4o mini, Claude Opus 4.6, Claude Sonnet 4.6, Claude Haiku 4.5, Gemini 3.1 Pro, and Gemini 2.0 Flash. Pricing is updated regularly to reflect the latest 2026 model releases.
Based on official published pricing from OpenAI, Anthropic, and Google as of 2026. Prices are per million tokens for both input and output. You can toggle between USD and INR.
No. All token counting happens locally in your browser. Your text never leaves your device.
There is no single ratio. For English text, OpenAI says 1 token is approximately three-quarters of a word, or about 75 words per 100 tokens. Google says 100 Gemini tokens is equal to about 60-80 English words. Anthropic says Claude 4.7 and later models produce approximately 30 percent more tokens than earlier Claude models for the same text, and that the exact increase depends on the content. The table on this page links each provider's wording, checked November 15, 2026.
Each model family uses its own tokenizer, so the same text can produce different token counts depending on the model, its encoding, and the language. This counter shows one shared estimate for every model, so it does not capture those differences. Check the provider's own tokenizer or counting API before you rely on a count for a hard limit.
Not exactly. The Claude models listed here (Opus 4.6, Sonnet 4.6, Haiku 4.5) predate the newer tokenizer. Anthropic says Claude 4.7 and later produce approximately 30 percent more tokens for the same input text, and that the exact increase depends on the content and workload shape. If you plan to call Claude 4.7 or later, expect a higher count than this estimate and recount with Anthropic's token counting endpoint for that model.
A context window is the maximum number of tokens a model can process in a single request — including both input (your prompt + conversation history) and output (the response). Exceeding the context limit causes an API error. The counter shows what percentage of the selected model's context window your text occupies, helping you avoid truncation errors before making the API call.
For multi-turn conversations, paste the full conversation text (all messages concatenated with role prefixes like "User:" and "Assistant:") into the counter. Models count all tokens in the context window — previous turns accumulate and count toward the limit on every API call. Managing context window usage is critical for long conversations.
The INR toggle converts API costs from USD to Indian Rupees using a configurable exchange rate, making it easier for Indian developers and teams to relate API costs to their budgets and billing. The rate defaults to the approximate current market rate and can be adjusted in the settings.
Compare AI API costs across every major LLM
Open →DeveloperCompare real costs across 13 AI models — Claude, GPT-6, Gemini, DeepSeek, Grok
Open →DeveloperRetry delays, jitter and total wait, with copyable retry code
Open →DeveloperYour AI API bill on the day each price change lands, and the cheapest switch
Open →