Change language

Artificial intelligence

AI model token cost calculator

What each request to a language model costs and the monthly bill, with prompt caching, reasoning tokens and batch discounts.

Published by SolucionesAhora.com How we verify

Calculator inputs

  1. Enter your figures, or press “See example” to watch it work.
  2. If your case is unusual, open “Advanced options”.
  3. Read the result and, below it, what it means and how it was worked out.

The tokens you send on each call: instructions, history and documents. As a guide, a token is about 0.75 of an English word.

Prompt, context and documents

The tokens the model generates in its answer. They usually cost three to five times as much as input tokens.

The visible answer

Copy it from the provider’s pricing page (usually in dollars). The AI cost comparator lists prices per model.

In the price list’s currency

In the price list’s currency

How many calls to the model you make per day, on average.

Average of a normal day

Advanced options

Reasoning models generate “thinking” tokens before answering and are billed as output tokens, even though you do not see them. They can far exceed the visible answer.

Only for models that “think”

The share of input that repeats and is read from the prompt cache (say, a long system prompt or a fixed document). Cache reads are billed at a much lower price.

Context repeated between requests

Your provider’s cache-read price. If you leave it empty, it is billed as normal input (no saving).

Empty = same as input

Some providers offer a discount (often 50%) if you accept waiting up to a day for the answer (batch API). Enter the percentage.

Percentage off the total

How many days a month the service is used (22 if it is weekdays only).

1 to 31

See the result

Results

Cost per request0.02400
Estimated monthly cost360
Daily cost12
Annual cost (12 months)4,320
Tokens consumed per month72,000,000
Share of cost that is output50 %
Monthly saving from caching0
Cost per request breakdown
ItemTokens per requestCost per request% of cost
Input, uncached4,0000.01250
Output8000.01250
Monthly cost by cache share
% of input cachedMonthly cost
0360
25360
50360
75360
90360
See the working step by step
  1. Cost per request = 0.02400 · tokens per month = 72,000,000
Free, no sign-up! What if you could do this without a calculator? A five-minute game with challenges, lives and points. It clicks even when you cannot be bothered.

In short

What it calculates
What each request to a language model costs and the monthly bill, with prompt caching, reasoning tokens and batch discounts.
Formula used
Cost per request = [ input · (1 − c) · input price + input · c · cache price + (output + reasoning) · output price ] ÷ 1,000,000 · (1 − discount)
Example
Example 1. A simple chatbot.

AI token cost calculator

Language models bill by token, and output tokens cost considerably more than input ones. For one request the amount looks trivial; multiplied by thousands a day it stops being so, and three details can change it for real: prompt caching (repeated context gets far cheaper), reasoning tokens (billed as output even though you do not see them) and batch discounts.

Enter your tokens and per-million prices and you get what each request costs, per day, month and year, how much of the spend is input, output or reasoning, and how the cost would fall if you cached more context. Everything runs in your browser.

How it works

Each kind of token is divided by a million and multiplied by its price: uncached input at the input price, input read from cache at its own price, and output and reasoning at the output price. They are added up and, if there is a discount, it is applied to the total. The result is then scaled by the number of requests and days.

The saving from caching is the difference between paying for that share of the input at the normal price or at the cache price.

Formula

Cost per request = [ input · (1 − c) · input price + input · c · cache price + (output + reasoning) · output price ] ÷ 1,000,000 · (1 − discount)
Monthly cost = cost per request × requests per day × days of use
Annual cost = monthly cost × 12
c = fraction of the input read from cache

Worked example

Example 1. A simple chatbot.
4,000 input tokens at 3 per million, 800 output at 15 per million and 500 requests a day: 0.024 per request, 12 a day, 360 a month and 4,320 a year. Half the cost is output, even though it is five times fewer tokens.

Example 2. With prompt caching.
An assistant with 20,000 tokens of context (instructions and documents) and 1,000 of output, 1,000 requests a day. If 80% of the context is read from cache at 0.30 per million: 954 a month instead of 2,250, saving 1,296 a month.

Example 3. A reasoning model.
2,000 input tokens, 500 visible output and 3,000 reasoning, 200 requests a day: 0.0585 per request and 351 a month. Reasoning is 77% of the cost and total output (visible plus reasoning), almost 90%.

Example 4. Batch processing.
5,000 input tokens and 1,500 output, 2,000 requests a day, with a 50% discount: 1,125 a month instead of 2,250.

Explanation

How a language model is billed

You pay per token, not per request: input tokens (everything you send) and output tokens (what the model generates). Output costs more because generating it takes more compute. A token is a fragment of a word: in English, about 1.3 tokens per word.

Prompt caching

If every request repeats a long block (instructions, examples, a document), many providers let you cache it: later reads cost a fraction of the normal price (around a tenth at several providers). Caching has its rules (minimum size, lifetime, and sometimes a surcharge for writing the cache), but with large, repeated contexts it is the most powerful way to save.

Reasoning tokens

Reasoning models “think” before answering. Those tokens are billed as output even if not shown, and can be far more numerous than the answer. If you use one, estimate how many it generates on average and enter it.

Batch processing

Some APIs cut the price (often by half) for requests that do not need an immediate answer. It suits classifying, summarising or tagging large volumes.

Ways to cut the bill

  • Shorten the context you send and avoid repeating long instructions.
  • Cache what repeats.
  • Use a smaller model for simple tasks.
  • Limit the length of the answer.
  • Batch whatever is not urgent.

Common mistakes

  • Forgetting that output tokens cost several times more than input tokens.
  • Ignoring reasoning tokens.
  • Calculating with the length of a test prompt rather than the real one (with history and documents).
  • Treating prices as fixed: they change.
  • Comparing models on the same text without allowing for the fact that they count tokens differently.

Limits of this calculator

  • You enter the prices; the calculator neither looks them up nor updates them. The AI cost comparator lists prices per model with their review date.
  • It does not include the cache-write surcharge some providers charge, price tiers by prompt length, or tool costs (search, code execution).
  • It assumes the same number of tokens in every request.
  • It accepts up to 31 days of use per month.

Notice

This is an estimate. Always check prices and terms on the provider’s official page.

Frequently asked questions

How many words is a token?

Roughly three quarters of a word in English, and somewhat less in Spanish, Portuguese or French because of accents and morphology.

Why does output cost more than input?

Because generating text takes more compute than reading it. For most models, output costs three to five times as much.

What is prompt caching?

A feature that stores context repeated between requests. Reading it from the cache costs a fraction of the normal price, so it cuts spending sharply when you send the same long block many times.

What are reasoning tokens?

The ones a model generates “thinking” before answering. They are billed as output even though you do not see them, and can multiply the cost of a request.

How do I cut the cost?

Shorten the context, cache what repeats, use smaller models for simple tasks, limit answer length and batch whatever is not urgent.

Where do I get the prices?

From your provider’s pricing page (per million tokens). This site’s AI cost comparator lists several providers’ prices with a review date.

Why does my real bill come out different?

Because the real number of tokens varies with each request, each provider tokenizes differently and there may be charges not included here (cache writes, tools).

Is my data sent to a server?

No. The calculation runs in your browser.

Sources and references

The formula behind this calculator is not ours. These are the sources it comes from, in APA 7 format, in case you want to go to the original or cite them in your own work.

  1. Anthropic. (2026). Pricing. Claude Developer Platform. Consultado el 7 de octubre de 2026, de https://platform.claude.com/docs/en/about-claude/pricing https://platform.claude.com/docs/en/about-claude/pricing Claude model prices and prompt-caching prices.
  2. OpenAI. (2026). API pricing. Consultado el 7 de octubre de 2026, de https://developers.openai.com/api/docs/pricing https://developers.openai.com/api/docs/pricing OpenAI model prices (standard tier and cached input).
  3. Google. (2026). Gemini Developer API pricing. Consultado el 7 de octubre de 2026, de https://ai.google.dev/gemini-api/docs/pricing https://ai.google.dev/gemini-api/docs/pricing Gemini model prices.

Need to calculate something else?

These tools are often used alongside this calculator.

AI cost comparison

What your API usage costs with each Anthropic, OpenAI and Google model, with caching and discounts, ranked…

API cost

Monthly and annual spend on an API with a fixed fee and volume pricing, to compare up to three plans and see…

ROI

Measure the percentage return of any investment or campaign.

Word count

Words, characters, sentences and paragraphs in any text.

Context window

Check whether your text fits in the context window of Claude, GPT or Gemini and how much of it you use…