Intermediate

Price per million tokens: how AI usage costs add up

When you use an AI model through its API, you don't pay a subscription but for what you consume, expressed as a price per million tokens. There are almost always two rates: one for the text the model reads (input) and another, higher one for the text it writes (output).

Data as of October 22, 2026

Key figures

LevelIntermediate

The principle

AI APIs measure usage in tokens, chunks of text a few characters long. Since a single token costs a fraction of a cent, providers quote prices per million tokens (often written “1M” or “MTok”). Anthropic’s pricing documentation shows the most common structure: one price for input tokens, one for output tokens, and specific rates for certain options.

The calculation, step by step

The formula fits on one line:

cost = (input tokens ÷ 1,000,000) × input price + (output tokens ÷ 1,000,000) × output price

Take a fictional model priced at $2 per million input tokens and $8 per million output tokens (made-up prices for the example). A customer-support chatbot handles 1,000 conversations a day; each one sends an average of 1,500 tokens (instructions, history, question) and gets 500 back.

  • Input: 1,500,000 tokens, so 1.5 × $2 = $3
  • Output: 500,000 tokens, so 0.5 × $8 = $4
  • Total: $7 a day, roughly $210 over 30 days

Notice that output, despite being a third of the volume, weighs more than input. To redo this calculation with real public prices, use our agent cost calculator.

What makes the bill move

  • The tokenizer: the same text yields a different token count depending on the model. Anthropic, for instance, says its recent models count about 30% more tokens for identical text.
  • Discounts: prompt caching makes repeated parts of a request much cheaper, and batch processing at Anthropic gets a 50% discount on both input and output.
  • Reasoning: a reasoning model produces thinking tokens, billed as output.

Common mistakes and myths

  • “The cheapest model per million is the cheapest to run.” A model that writes longer answers, thinks more or fails more often can end up costing more.
  • “Only my question is billed.” System instructions, conversation history and attached documents are re-read, and billed, on every call.
  • “The listed price is fixed.” Prices change often; check the date they were recorded.

Related terms: token, tokenizer, prompt caching, inference.

Related terms

Try it

Full glossary

Frequently asked questions

Why is output more expensive than input?

A common explanation: the model processes input in one pass, whereas it generates output one token at a time, which uses more resources per token. Providers' price lists reflect this gap, which is often large.

Is a consumer subscription billed per token?

Generally not: consumer assistant subscriptions are flat-rate, with usage limits. Per-token billing mostly applies to API access, used by developers and automation tools.

Where can I find current prices?

On each provider's official pricing page, since prices change regularly. Our agent cost calculator uses public prices refreshed every week.

Are a model's thinking tokens billed?

Yes. Providers that document it, such as Anthropic, count internal reasoning as billed output tokens. A short answer can therefore be expensive if the model did a lot of thinking.

Data sources

Data as of October 22, 2026

Report an error

Does a figure, a date or a fact look wrong? Tell us: every report is checked.