This website uses cookies
Read our Privacy policy and Terms of use for more information.
Paste your text to count tokens and see what one request costs on 17 models from OpenAI, Anthropic, Google, xAI, DeepSeek and Mistral. This free token counter and AI token calculator runs in your browser, so your text never leaves your device. Prices checked December 1, 2026.
New models, price cuts and the AI business news behind them, in plain English. Free, every weekday. Join 2,000+ readers.
A token is the unit an AI model reads and writes. It is often a whole word, sometimes part of a word, a number or a punctuation mark. "Hello world" is 2 tokens in OpenAI's o200k_base tokenizer. OpenAI's rule of thumb is that 100 tokens is about 75 English words, so 1,000 words is roughly 1,300 tokens. Code, numbers and languages other than English usually take more tokens per word.
AI APIs bill by the token, in two buckets. Input tokens are everything you send: your instructions, the user's message, documents and chat history. Output tokens are what the model writes back, including hidden reasoning tokens on models that think before they answer.
Every AI company trains its own tokenizer, so the same paragraph can be a different number of tokens on different models. OpenAI publishes its o200k_base tokenizer, and this token counter uses it to count your text in the browser. That count is exact for GPT-4o, o-series and GPT-5 models. OpenAI has not said which tokenizer its GPT-6 models use, so we label GPT-6 counts an estimate.
This tool runs only OpenAI's tokenizer. For Anthropic, Google, xAI, DeepSeek and Mistral models, the calculator reuses the OpenAI count as an estimate, so treat those numbers as a starting point. One known gap: Anthropic says Claude 4.7 and later models use a newer tokenizer that produces about 30% more tokens for the same text, so Claude bills can run higher. For an exact figure, run a few real prompts through each API and read the token usage it returns.
The formula is the same for every model:
Cost per request = (input tokens x input price + output tokens x output price) / 1,000,000
Prices are quoted per 1 million tokens, which is why you divide by 1,000,000. Multiply the result by your expected requests per month to get a monthly budget.
Say a support chatbot sends 1,000 input tokens and gets 500 output tokens back per request, on Claude Sonnet 5.5 at $2 input and $10 output per million tokens.
Input: 1,000 x $2 / 1,000,000 = $0.002
Output: 500 x $10 / 1,000,000 = $0.005
Total: $0.007 per request, $7 per 1,000 requests and $7,000 per 1 million requests
The same traffic on GPT-6 Luna ($0.10 input, $0.50 output) costs $0.00035 per request, or $0.35 per 1,000 requests. That is a 20x gap for the same token counts, which is why model choice matters more than anything else in an LLM cost calculator. These are our calculations from list prices, before caching or batch discounts.
Caching: repeated prompt text is billed at a fraction of the normal input price on the major APIs.
Batch: OpenAI, Anthropic and Google cut prices by 50% for jobs that can wait up to 24 hours.
Long prompts: some models charge more above a prompt length threshold. The calculator applies the published rules for OpenAI's GPT-6 models, Claude Haiku 5.5 and Grok.
Off-peak: DeepSeek charges half price outside its peak hours. Tick the box in the tool to see those rates.
For full rate cards, see our OpenAI API pricing, Claude API pricing, Gemini API pricing, Grok AI pricing and DeepSeek pricing guides. To compare plans and APIs side by side, use our AI Pricing Hub and the monthly AI Pricing Index.
Tokens are the small chunks of text an AI model processes. A token can be a word, part of a word or a symbol. AI APIs charge per token, with separate prices for input and output.
A tokenizer is the program that splits text into tokens before a model reads it. Each AI company uses its own, which is why the same text can give different token counts on different models.
About 1,300 tokens in English, based on OpenAI's guide that 100 tokens is roughly 75 words. Code, tables and non-English text usually need more.
No. The o200k_base count is exact only for OpenAI models that use that tokenizer. This tool does not run Anthropic, Google or xAI tokenizers, so their counts here are estimates. Check the usage figures each API returns to confirm.
The model writes output one token at a time, which takes more computing work than reading your prompt. OpenAI, Anthropic and most Google models in this tool charge 5x the input price for output. xAI, DeepSeek and Mistral charge 2x to 4x.
Note: Prices are standard US list prices from each vendor's official pricing page, checked December 1, 2026. AI prices change often, so confirm on the vendor's page before you commit a budget.
Last updated: November 30, 2026