Introduction
AI models don't read words. They read tokens. A token is a small piece of text — a short word, part of a long word, or even a space. Every AI provider charges you by the token, for both what you send in and what comes back out.
This Token Calculator counts the tokens in your text and shows what they cost. Paste your text, pick a model, and see the token count right away. You can also type in a word count or a token count if you don't have the raw text handy. If you need plain text stats first, the Word Count Calculator is a good starting point.
The tool shows you:
- Live token counts plus words and characters
- Cost estimates for OpenAI, Anthropic Claude, Google Gemini, xAI Grok, DeepSeek, and Perplexity
- A token map that colors each token so you can see where text splits
- Your most costly words and most repeated tokens, so you can trim your prompts
- A budget bar that warns you when you get close to a model's context window
- A side-by-side model check, because the same text counts differently on each tokenizer
You also set how long the reply should be, since output tokens often cost more than input tokens. The step-by-step section shows the math behind every number.
Your text stays in your browser. Nothing is sent to a server.
How to use our Token Calculator
Paste your text (or type a word or token count), pick a model, and the calculator shows your token count, output tokens, budget use, and the cost for each AI provider.
Input mode tabs: Pick Text Input if you have the real text. Pick Word Count or Token Count if you only know a number.
Text to analyze: Paste or type your prompt here. Tokens are counted right in your browser as you type. Use Clear Text to start over.
Known word count: In Word Count mode, type how many words your text has.
Tokens per word: Set how many tokens each word takes. English is about 1.33. If you want to work backward from typing speed, see the WPM Calculator.
Known input token count: In Token Count mode, type the token number you already have. Costs come straight from it.
Model / tokenizer: Choose the AI model you plan to use. Each one splits text a bit differently, so the token count changes.
Pricing sort order: Sort the provider cards by cheapest total, most costly total, or by name.
Token budget: Type your context window or your own token cap. Or tap a quick button like 32K, 128K, or 1M. The bar shows how much you used.
Output token planning: Drag the slider or tap a preset (like Chat 75%) to guess how long the AI reply will be. This sets your output tokens.
Show Token IDs: Flip this to see the token ID numbers instead of the split-up text.
Provider model menus: Under Full Pricing, pick the exact model for each provider to see its rates, cache prices, and total cost. Use Copy Estimate to save it.
Calculate and Reset: Press Calculate to refresh all results, or Reset to go back to the default settings.
What Is a Token in AI?
A token is a small piece of text that an AI model reads. It is not always a whole word. A token can be a full word, part of a word, one letter, a space, or a mark like a comma. Models like GPT-5, Claude, Gemini, Grok, and DeepSeek do not read letters or words the way people do. They break text into tokens first, then work with those tokens.
For example, the word "cat" is likely one token. A longer word like "internationalization" may split into five or more tokens. In English, one token is about 4 characters, and 100 words is roughly 133 tokens. To turn a word count into minutes of speech or reading, try the Reading Time Calculator.
Why Tokens Matter
Tokens are how AI companies count and charge for work. Two things depend on them:
- Cost. Prices are listed per 1 million tokens. You pay for input tokens (the text you send) and output tokens (the text the model writes back). Output usually costs more than input. A Percentage Calculator helps when you compare rate changes between models.
- Context window. This is the largest number of tokens a model can hold at one time. If your text is too long, it will not fit, and part of it gets cut.
Input Tokens vs. Output Tokens
Input tokens come from your prompt, your files, your chat history, and any system instructions. Output tokens are the model's reply. Reasoning models also charge for the "thinking" tokens they make before the final answer, so long answers can cost more than you expect.
Cached Tokens and Long Context Pricing
Many providers offer cached input, which is a cheaper rate for text you send again and again, like a long system prompt. Cache reads can cost as little as one tenth of the normal price. Some models also charge a higher long context rate once your input passes a limit, such as 200,000 tokens for Claude Sonnet or Gemini 2.5 Pro.
Every Model Counts Tokens Differently
Each model family uses its own tokenizer, which is a list of known text pieces. The same paragraph can turn into a different number of tokens on OpenAI, Anthropic, Google, and xAI models. That means the cheaper price per token is not always the cheaper total bill. Code, emoji, math symbols, and languages that do not use the Latin alphabet often use more tokens per word. Use the Ratio Calculator to compare tokens-per-word figures across models.
How to Use Fewer Tokens
- Cut extra words from your system prompt. You pay for it on every request.
- Use short, common words. Rare and long words split into more tokens.
- Trim old chat history and repeated boilerplate.
- Set a max output length so replies do not run long.
- Reuse the same prompt start so caching can kick in.
- Send only the part of a document the model needs.
Token counts here are close estimates, not exact billing numbers. Check your provider's usage dashboard for the real totals.
Planning Your AI Spend
Once you know the cost of one request, multiply it out to see the monthly bill. If your app makes 50,000 calls a month, a fraction of a cent per call still adds up. The ROI Calculator helps you check whether an AI feature earns back its token cost, and the Break Even Calculator shows how many paying users you need to cover it. For subscription products, pair token costs with the Customer Lifetime Value Calculator and the CAC Calculator to keep margins healthy, then set your price with the Markup Calculator.
Related Technology Tools
Running your own models or hosting an AI app brings other numbers to check. The AWS Calculator and Azure Pricing Calculator estimate cloud hosting, the Bandwidth Calculator and Data Transfer Calculator cover network needs, and the SLA Calculator translates uptime promises into allowed downtime. For local GPU work, the PSU Calculator and Bottleneck Calculator help you size hardware, while the Electricity Cost Calculator shows what it costs to keep it running.