Technology calculators

Token Cost Calculator

Updated Aug 23, 2026 By Jehan Wadia
Rate Formulas
1. Usage Input
Characters, words and tokens update as you type.
Enter a single number; the unit toggle decides how it is read.
Interpret this number as
Converted with 1 token ≈ 0.75 words ≈ 4 characters.
Prompt caching re-uses an identical prompt prefix from the provider's cache at a reduced read rate. Not every model supports it — where no cache tier exists these tokens bill at the standard input rate.
In this mode this field takes precedence over the output-ratio slider.
0Characters
0Words
0Input Tokens (est.)
0Output Tokens
Token figures are approximations (1 token ≈ 4 characters ≈ 0.75 words). Real tokenizers differ per model, so treat these as estimates.
75% — 0 tokens
Multiply your per-call cost by this number to project total spend.
Applies to Text Input and Word Count modes. In Token Count mode the cached-token field is used instead.
Adds the one-time write premium for cached tokens to Anthropic totals.
Approximate conversion.
2. Model Rates & Comparison Selection
Quick provider filter
Model pricing table with editable rates, per-call cost and projected total cost.
Compare Provider Context Tier Fixed Fee / Call (USD) Est. Cost / Call
All rate boxes are editable and are entered in USD per 1 000 000 tokens. An edited rate is outlined in amber with a reset control beside it. Cost columns are shown in your selected display currency.
3. Cost Results
Prices Last Updated: —
Detailed Cost Breakdown
4. Cost Breakdown Chart
Each bar is the projected total cost for the entered call volume, segmented by billing component.
Step-by-Step Solution

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.


Formulas used

Input tokens from characters or words
T_{in} \approx \frac{\text{characters}}{4} \approx \frac{\text{words}}{0.75}
Output tokens from output ratio
T_{out} = T_{in} \times \frac{r_{\%}}{100}
Cached and uncached input token split
T_{cached} = T_{in} \times \frac{s_{\%}}{100}, \qquad T_{uncached} = T_{in} - T_{cached}
Cost per call
C_{call} = \frac{T_{uncached} \cdot P_{in} + T_{cached} \cdot P_{cached} + T_{cached} \cdot P_{write} + T_{out} \cdot P_{out}}{1{,}000{,}000} + F
Total projected cost for all calls
C_{total} = C_{call} \times N_{calls}
Currency conversion of displayed cost
C_{display} = C_{USD} \times FX_{rate}

Frequently asked questions

Why is my real bill a bit different from this estimate?

Two reasons. First, token counts here use a rule of thumb: 1 token is about 4 characters. Each model has its own tokenizer, so its count will be a little higher or lower.

Second, providers can add things this tool does not model, like reasoning tokens, image tokens, cache storage fees, or taxes. Treat the result as a close guess, not an invoice.

How do I work out my monthly AI cost?

Put your monthly call volume in the Number of API Calls box. If you make 500 calls a day, enter 15,000 for a 30-day month.

The Est. Total Cost column then shows your monthly spend for that model.

What does the Highlight Best Value button do?

It finds the model with the lowest Est. Total Cost and marks it green in the table. If you ticked models to compare, it only looks at those. If you ticked none, it checks every visible model.

It is based on price only. It does not judge speed or answer quality.

Why does the same model appear twice in the table?

Some models have more than one price. The Context Tier column tells you which one you are looking at.

  • 200K tiers — Claude Sonnet 4.5 and Gemini 2.5 Pro cost more once your prompt passes 200,000 tokens.
  • Peak and Off-peak — DeepSeek changes price by the clock.

Pick the row that matches how you actually use it.

What does the Delisted label mean?

That model is no longer sold. The rate shown is the last price the provider published, with the date beside it.

It is kept for old cost checks and comparisons. Do not use it to plan new work.

Do cached tokens get added on top of my input tokens?

No. Cached tokens are part of your input, not extra. The tool splits your input into two parts: cached tokens billed at the cheap cache-read rate, and the rest billed at the normal input rate.

That is why the cached number can never be larger than the input number.

Why does one cache write row say excluded?

Anthropic has two cache-write tiers, 5-minute and 1-hour. You can only be billed for one. The tool shows both so you can compare them, and marks the one you did not choose as excluded.

Change your pick in the Anthropic cache-write tier menu.

Are my edited prices saved?

No. Edited rates only last for your current session. Refresh the page or press Reset and they go back to the built-in prices.

Use Copy Estimate first if you want to keep the numbers.

Is the currency rate live?

No. All model prices are set in US dollars. Other currencies use a fixed sample rate with the date shown under the menu.

Use it for a rough view. For an exact figure, convert the USD total with today's bank rate.

What is the fixed fee column for?

Some APIs charge a flat amount per request on top of tokens. Perplexity's Sonar models do this for web search, around $0.005 to $0.006 a call.

The fee is charged once per call, so it hits high-volume, short-prompt apps the hardest.

Does this cover reasoning or thinking tokens?

Not on its own. Models like o3, DeepSeek R1, and Grok 4 Fast reasoning charge hidden thinking tokens at the output rate.

To include them, raise the output slider. Reasoning answers often use 2 to 5 times more output tokens than a plain reply.

Can I use it for images, audio, or embeddings?

No. This tool covers text input and text output only. Images, audio, video, embeddings, and fine-tuning are billed on separate rate cards.

If you already know the token count for those, you can type it in the Token Count tab and edit the rate boxes to match.

In the Token Count tab, does the slider still work?

Your typed output number wins. The slider is ignored for the cost math in that tab.

Moving the slider does refill the output box for you, so it is a fast way to test a longer or shorter reply.

Why are some costs shown with six decimal places?

One call can cost a tiny fraction of a cent. Rounding to two decimals would show $0.00 and hide the real gap between models.

Look at the Est. Total Cost column for a number you can budget with.

How do I compare two models fairly?

Tick both boxes in the Compare column. The comparison table and stacked chart appear once you pick two or more.

Keep the input, output, cache, and call settings the same for both. Then the only thing changing is price.

Is the 4-characters-per-token rule good for code and other languages?

It is decent for plain English. It is less accurate elsewhere.

  • Code and JSON — often more tokens, because symbols and indents split up.
  • Chinese, Japanese, Arabic — often many more tokens per character.

For those, use the Token Count tab with real numbers from your API logs.

My prompts vary in size. What number should I enter?

Use your average prompt size, then check a worst case too. Run the average for your budget and the largest prompt to see your ceiling.

If big prompts pass 200,000 tokens, switch to the long-context row for that model.

Does the tool include free tiers, batch discounts, or volume deals?

No. It uses standard pay-as-you-go list prices. Batch APIs are often 50% cheaper, and enterprise deals vary.

Type your discounted rate straight into the input and output boxes. Edited boxes turn amber so you know they changed.

What does the Copy Estimate button copy?

A plain-text summary: the model name, your token counts, call volume, every cost line, the cost per call, the total, and the price date.

Paste it into a ticket, spreadsheet, or email for a teammate.

Why is my total cost zero?

Check three things. Your text box may be empty, your call count may be blank, or a rate box may have been cleared.

Red text under a field means the value is invalid. Press Reset to bring back all the defaults.