Independent explainers · Sources linked

How we work

News Margin

The news, the numbers and what they mean

,

AI API cost calculator: what each model costs per request

What a prompt really costs: illustration of a dim server room aisle with rows of blinking racks and cool blue light, one silh

Last checked

Short answer

Multiply input tokens by the input price and output tokens by the output price, both per million tokens, then add them. A request with 2,000 input and 500 output tokens costs $0.00045 on OpenAI gpt-6-luna and Anthropic Claude Haiku 5.5 and $0.045 on OpenAI gpt-6-astra and Anthropic Claude Fable 5.1 at list prices; at 10,000 requests a month that is $4.50 to $450.00.

AI model API cost calculator

Estimate what a chatbot, agent or batch job costs per request and per month.

Prompt plus any documents or chat history you send. Roughly 750 English words is 1,000 tokens.
Repeated prompt prefixes billed at the cached-input price. Leave 0 if unsure.

Results appear here.

List prices in USD per 1M tokens from each vendor's pricing page, checked 2026-10-26. Runs in your browser.

Key facts

UnitUSD per 1 million tokens
Prices checked2026-10-26
Example workload2,000 in + 500 out tokens, 10,000 requests a month
Cheapest in the tableOpenAI gpt-6-luna and Anthropic Claude Haiku 5.5: $4.50 a month

How is an AI API bill calculated?

Each request has one charge in two parts: the tokens you send (input) and the tokens the model writes back (output). Output usually costs several times more per token than input, so long answers drive the bill more than long prompts.

The calculator multiplies each count by the vendor's list price per million tokens and adds them up, then scales the result to your monthly volume.

Worked example with Anthropic Claude Sonnet 5.5 ($2.00 input, $10.00 output): 2,000 × $2.00 ÷ 1,000,000 = $0.004 for input, plus 500 × $10.00 ÷ 1,000,000 = $0.005 for output, so $0.009 per request and $90.00 for 10,000 requests.

What do the main models cost per million tokens?

The table uses the example workload: 2,000 input and 500 output tokens per request, 10,000 requests a month, no caching.

ModelInputCached inputOutputPer requestExample month
OpenAI gpt-6-luna$0.10$0.01$0.50$0.00045$4.50
Anthropic Claude Haiku 5.5$0.10$0.01$0.50$0.00045$4.50
Google Gemini 3.5 Flash-Lite$0.30$0.03$2.50$0.00185$18.50
Google Gemini 3.8 Flash (current price; rises 2027-01-01)$0.75$0.075$3.75$0.003375$33.75
OpenAI gpt-6.1-sol$2.00$0.10$10.00$0.009$90.00
Anthropic Claude Sonnet 5.5$2.00$0.10$10.00$0.009$90.00
Google Gemini 4 Argon (current price; rises 2026-12-01)$2.00$0.10$10.00$0.009$90.00
Google Gemini 3.1 Pro Preview$2.00$0.20$12.00$0.01$100.00
Anthropic Claude Opus 5.5$4.00$0.20$20.00$0.018$180.00
OpenAI gpt-6-astra$10.00$1.00$50.00$0.045$450.00
Anthropic Claude Fable 5.1$10.00$0.25$50.00$0.045$450.00
USD per 1M tokens, standard tier, from the vendors' pricing pages on 2026-10-26.

When does a long prompt cost more?

Some models switch to a higher rate once the prompt passes a size threshold, and then the whole request is billed at that rate, not just the tokens above the line. The calculator applies this automatically. The other models in this calculator show no long-prompt rate on their pricing pages.

ModelPrompt longer thanInputOutput
OpenAI gpt-6-astra272,000 tokens$20.00$75.00
OpenAI gpt-6.1-sol272,000 tokens$4.00$15.00
OpenAI gpt-6-luna272,000 tokens$0.20$0.75
Anthropic Claude Haiku 5.5100,000 tokens$0.50$2.50
Google Gemini 3.1 Pro Preview200,000 tokens$4.00$18.00
USD per 1M tokens for the whole request once the prompt passes the threshold.

What else changes the price?

  • Announced changes: Google Gemini 4 Argon moves to $4.00 input and $20.00 output per 1M from 2026-12-01, which takes the example month from $90.00 to $180.00; the calculator switches on that date.
  • Announced changes: Google Gemini 3.8 Flash moves to $1.50 input and $7.50 output per 1M from 2027-01-01, which takes the example month from $33.75 to $67.50; the calculator switches on that date.
  • Caching: if every request starts with the same long instructions or document, the vendor can bill that repeated part at the cached-input price in the table. Enter the share of your prompt that repeats in 'Cached share of input'; writing to the cache can cost extra and is not included. By hand: cached tokens × cached price + the rest of the input × input price + output × output price, all ÷ 1,000,000.
  • Batch processing: most vendors discount jobs that can wait; this calculator uses standard prices.
  • Extras such as web search, tools, images and audio are billed separately.

How do I estimate my token counts?

  1. Paste a typical prompt into the vendor's tokenizer or count words: about 750 English words is 1,000 tokens.
  2. Add any system prompt, documents and chat history you send with every request.
  3. Check the output length you actually get, not the maximum you allow.
  4. Multiply by a realistic monthly request count and compare models side by side.

Are these prices final?

They are list prices. Vendors change them, and your contract, region or credits can make the real bill different. Always confirm on the pricing page linked under the result before you budget.

FAQ

What is a token?

A small chunk of text the model reads or writes. In English, 1,000 tokens is roughly 750 words.

Is output always more expensive?

For every model in this table, yes: the output price per million tokens is several times the input price.

Does the calculator include taxes or batch discounts?

No. It uses standard list prices only.

How often are prices updated?

The table was checked on 2026-10-26 and is re-checked monthly.

Sources

Figures change. Check the primary sources above.