AI API Cost Calculator

Compare monthly LLM API costs across flagship models: enter your input/output token volumes and see every model's estimated bill side by side, cheapest first.

Provider pricing pages last updated · reference source

Loading calculator…

Currency: Amounts are calculated in the currency you select; this site does not convert between currencies and does not use live exchange rates.

Dated static reference; no live data is fetched. Verify current source values and assumptions before relying on results.

What this tool does

Compare monthly LLM API costs across flagship models: enter your input/output token volumes and see every model's estimated bill side by side, cheapest first. Rates are standard-tier list prices as of the data date. Batch tiers, cached/prompt-cached inputs, long-context surcharges and priority tiers all differ — treat this as a planning estimate. Token volumes are what you send the API; use the AI Token Counter to measure real prompts.

How to use the AI API Cost Calculator

  1. Enter or select monthly input tokens (millions).
  2. Enter or select monthly output tokens (millions).
  3. Read the calculated result; change any measurement to compare alternatives.

Formula

Monthly cost per model = inputM × input $/1M + outputM × output $/1M, at the dated standard-tier rates; models are ranked cheapest first.
inputM
Monthly input tokens (millions)
outputM
Monthly output tokens (millions)

Rates are standard-tier list prices as of the data date. Batch tiers, cached/prompt-cached inputs, long-context surcharges and priority tiers all differ — treat this as a planning estimate. Token volumes are what you send the API; use the AI Token Counter to measure real prompts.

Worked example

For ai api cost calculator, the following measurements illustrate the exact method: Monthly input tokens (millions): 10; Monthly output tokens (millions): 2.

Inputs

  • Monthly input tokens (millions)10
  • Monthly output tokens (millions)2

Result

  • Cheapest modelGemini 2.5 Flash-Lite
  • Cheapest monthly cost (Gemini 2.5 Flash-Lite)$1.80
  • Most expensive monthly cost (Claude Fable 5.1)$200.00
  • You could save vs most expensive$198.20/mo

Results explained

Cheapest model
Cheapest model from the formula above. Rates are standard-tier list prices as of the data date. Batch tiers, cached/prompt-cached inputs, long-context surcharges and priority tiers all differ — treat this as a planning estimate. Token volumes are what you send the API; use the AI Token Counter to measure real prompts.
Cheapest monthly cost (Gemini 2.5 Flash-Lite)
Cheapest monthly cost (Gemini 2.5 Flash-Lite) from the formula above. Rates are standard-tier list prices as of the data date. Batch tiers, cached/prompt-cached inputs, long-context surcharges and priority tiers all differ — treat this as a planning estimate. Token volumes are what you send the API; use the AI Token Counter to measure real prompts.
Most expensive monthly cost (Claude Fable 5.1)
Most expensive monthly cost (Claude Fable 5.1) from the formula above. Rates are standard-tier list prices as of the data date. Batch tiers, cached/prompt-cached inputs, long-context surcharges and priority tiers all differ — treat this as a planning estimate. Token volumes are what you send the API; use the AI Token Counter to measure real prompts.
You could save vs most expensive
You could save vs most expensive from the formula above. Rates are standard-tier list prices as of the data date. Batch tiers, cached/prompt-cached inputs, long-context surcharges and priority tiers all differ — treat this as a planning estimate. Token volumes are what you send the API; use the AI Token Counter to measure real prompts.

Frequently asked questions

Measure your monthly input tokens (what you send) and output tokens (what the model generates) — the AI Token Counter measures per-prompt usage — then enter both in millions above. Every flagship model's monthly bill appears in the table, cheapest first.

It depends on your input/output mix: models with cheap inputs but pricey outputs win on summarization workloads, while balanced workloads favor different models. The comparison table re-ranks for whatever volumes you enter.

Generating text is the compute-heavy part of inference, so every provider prices output tokens several times higher than input tokens. Workloads that generate long responses are dominated by output cost.

The as-of date is shown next to the data source. Providers reprice several times a year — and batch or cached-input tiers can halve the figure — so confirm against the provider's pricing page before committing budget.

No — text inference tokens only. Fine-tuning, image generation, embeddings and audio each have their own price lists and are not comparable on a per-token basis.

A short chat prompt with a few hundred words of context is roughly 500–2,000 input tokens; a page of generated text is about 800 tokens. One million tokens ≈ 750,000 words.