ShareYourGroupShareYourGroupToken Estimator

How AI API cost is calculated

Cost is tokens times price. The only trick is the unit: prices are per million tokens.

The formula

Cost = input tokens ÷ 1,000,000 × price per million input tokens + output tokens ÷ 1,000,000 × price per million output tokens.

Output tokens usually cost more than input tokens, but the ratio is set by the maker: look it up in the maker's current price list. We do not list prices here because they change often. The estimator takes the prices you type.

Worked examples with example prices

The prices below are made up for arithmetic and are not any maker's prices.

Input tokensOutput tokensPrice in per millionPrice out per millionCost of one request
2,0005001.04.00.0040
10,0001,0000.52.00.0070
100,0002,0003.015.00.3300

Budget mistakes

  1. Counting only your prompt. The answer (output tokens) is billed too, and the system prompt and earlier messages in a chat are sent again with each request.
  2. Forgetting the history. In a chat, each new request carries the whole conversation, so the input grows.
  3. Mixing units. The price is per million tokens, not per thousand.
  4. Ignoring the estimate range. Use the high figure for a budget.
  5. Not checking the currency. Prices may be in US dollars.

A simple routine

  1. Estimate input tokens with the range.
  2. Decide a maximum for output tokens.
  3. Type the maker's current prices into the estimator.
  4. Multiply by the number of requests per day.
Do cached or batch prices exist?

Some makers offer them. Check the maker's pricing page: they are not in this arithmetic.

Are images and files counted?

Usually, in the maker's own way. Use the maker's counter for them.

Sources

  • Arithmetic only. Prices are typed by you; see the maker's pricing page.

Read on 14 November 2026.

This is an independent guide. It is not connected with Google, Anthropic, OpenAI or any company named here. Facts were read on 14 November 2026 from the pages named on each page. The numbers are estimates from rules of thumb, not the counts of any maker's tokenizer.