Introduction
AI models charge you by the token. A token is a small piece of text, about four letters long. Every prompt you send and every answer you get back costs money. This Token Cost Calculator shows you that cost before you get the bill.
Paste your text, type a word count, or enter exact token numbers. Then pick how many API calls you plan to make. The tool works out your input cost, output cost, and cached token cost for over 40 models from OpenAI, Anthropic, Google Gemini, xAI Grok, DeepSeek, Perplexity, and Mistral. If you only need the token counts themselves without pricing, the Token Calculator handles that job, and the Word Count Calculator is handy for sizing up a draft first.
You can compare models side by side, see a chart of where your money goes, and switch to euros, pounds, yen, or Canadian dollars. If you need a closer look at a rate, the Currency Calculator and the Euro to USD Calculator can help. Every price box can be edited, so you can test your own rates or a deal you were offered. The step-by-step section shows the math, so you can check the numbers yourself.
Use it to plan a budget, pick a cheaper model, or find out if prompt caching is worth it for your app. For wider cloud spending, pair it with the AWS Calculator or the Azure Pricing Calculator.
How to use our Token Cost Calculator
Tell the calculator how much text you send to an AI model and how many times you send it. It shows your token counts, the cost per API call, the total cost for all calls, a side-by-side model comparison, and a chart of where the money goes.
Text Input tab: Paste or type your real prompt here. The tool counts the characters and words and turns them into an estimated token count.
Word Count tab: Type one number if you already know the size of your prompt. Then pick Words, Tokens, or Characters so the tool knows how to read that number.
Token Count tab: Enter exact token numbers from your API logs. Fill in input tokens, cached prompt tokens (tokens read from the provider's cache), and output tokens.
Output size slider: Set how long the model's answer is, as a percent of your input tokens. Use the quick buttons like Chat 75% or Classification 10% if you are not sure.
Number of API calls: Enter how many times you will run this prompt. The cost per call is multiplied by this number.
Cached share of input (%): Enter what part of your prompt is reused and served from cache. Cached tokens cost less on models that offer a cache rate. Use the Percentage Calculator if you need to work that share out from raw log totals.
Anthropic cache-write tier: Pick None if your cache is already warm. Pick the 5-minute or 1-hour tier to add the one-time cache write fee to Claude models.
Display currency: Choose USD, EUR, GBP, JPY, or CAD. All prices are set in USD and converted at a rough rate.
Provider filter: Click a provider name to show or hide its models. Hover the info icon to see how that provider bills caching.
Search box: Type part of a model or provider name, like "haiku" or "gemini", to shrink the table fast.
Sort menu: Keep the default grouped view, or sort every model from cheapest to most expensive by total cost.
Compare checkboxes: Tick the models you want to test. Pick two or more to unlock the comparison table and the stacked chart.
Rate boxes: Change any input, output, cached, or fixed-fee price if your contract rate is different. Edited boxes turn amber and have a reset button.
Show only selected rows: Turn this on to hide every model you did not tick.
Buttons: Press Calculate to refresh the numbers, Highlight Best Value to mark the cheapest pick, Copy Estimate to save the breakdown as text, and Reset to start over.
What Are AI Tokens?
A token is a small piece of text. Most AI models break your words into these pieces before they read them. One token is about 4 letters, or roughly ¾ of a word. So 100 words is about 133 tokens. Short words may be one token. Long or odd words may be split into two or three.
How AI Token Pricing Works
AI companies charge by the token, not by the question. Prices are listed in dollars per 1 million tokens. Every API call has two main parts:
- Input tokens — the text you send in, like your prompt, chat history, and any documents you paste.
- Output tokens — the text the model writes back.
Output almost always costs more than input, often 4 to 8 times more. That is because the model has to think and build each new word, which takes more computer power than reading. The Ratio Calculator makes it easy to see how big that input-to-output gap really is.
Cached Tokens Can Cut Your Bill
If you send the same starting text again and again, like a long system prompt, the provider can save it. This is called prompt caching. Reading from the cache is much cheaper — often only 10% of the normal input price. Anthropic also charges a small one-time fee to write the text into the cache, and you pick how long it stays there (5 minutes or 1 hour). OpenAI and Google do caching without a separate write fee. Some models, like Mistral and Perplexity, have no cache discount at all, so every input token costs full price. To see the saving as a clean figure, run the two totals through the Percent Change Calculator or the Discount Calculator.
Other Things That Change the Price
- Context tiers: Some models charge more when your prompt goes over 200,000 tokens. Claude Sonnet and Gemini Pro both do this.
- Time of day: DeepSeek charges less during off-peak hours (16:30–00:30 UTC) and more during peak hours. The Time Zone Calculator helps you line those windows up with your own clock.
- Fixed fees: Perplexity's Sonar models add a flat search fee to every request, on top of the token cost.
- Promo prices: A few models have temporary low rates that end on a set date. Check how long you have left with the Days Until Calculator.
Why Estimating Token Costs Matters
One API call may cost less than a penny. But apps make thousands or millions of calls. Small price gaps grow fast. A model at $15 per million output tokens costs 30 times more than one at $0.50. Checking the math before you build helps you pick the right model, set a real budget, and avoid a surprise bill.
If AI calls are part of a product you sell, token spend belongs in your unit economics. The Break Even Calculator shows how many users you need to cover it, the Margin Calculator checks what is left per sale, and the Customer Lifetime Value Calculator and CAC Calculator put the whole picture together. For a monthly view of spend, the Monthly Budget Calculator and ROI Calculator are useful next stops.
Simple Ways to Spend Less
- Ask for shorter answers. Set a word or token limit in your prompt.
- Use a small model for easy jobs like sorting or tagging. Save big models for hard work.
- Put your fixed instructions at the start so caching can pick them up.
- Trim old chat history and cut extra documents you do not need.
- Batch jobs when you can, since some providers give a discount for them.
Note: Token counts here are estimates based on 1 token ≈ 4 characters. Each model uses its own tokenizer, so real counts will be a little different. Always check the provider's current price page before you commit to a budget.