LLM API Cost Calculator: Compare Token Prices Across Models
Enter how many input, output, and cached tokens a typical request uses and how many requests you run, then compare the estimated bill across Claude, GPT-5.5, Gemini, Grok, DeepSeek, Mistral, and Kimi. It uses each provider's published per-million-token price, the math runs in your browser, and the formula is shown so you can check it.
Everything is computed in your browser — nothing you type is sent anywhere. Figures are estimates for planning from list prices; your real bill depends on exact tokenization, prompt caching, batch discounts, long-context tiers, and any enterprise rates.
How the estimate works
Token billing is simple arithmetic, which is what makes a calculator useful here: providers charge a price per million tokens, and input, output, and cached tokens each have their own rate. For one request:
cost per request = ( input tokens × input rate + cached tokens × cached rate + output tokens × output rate ) ÷ 1,000,000
The total is just that multiplied by your request count. The only judgement calls are which token counts to enter and which rate applies. Two things trip people up. First, output is the expensive side — models charge several times more per output token than per input token (5× across the Claude tiers, 6× on GPT-5.5, ~8× on Gemini), so a chatty model that writes long answers can cost more than a "pricier" model that answers tersely. Second, cached tokens are billed separately: when a provider's prompt cache serves a repeated prefix, those tokens drop to a fraction of the input rate, so a long fixed system prompt reused across calls is far cheaper than its raw token count suggests. Enter the cached portion in its own box and keep only the non-cached prompt in the input box.
Prices used (per 1M tokens)
This is the table the calculator reads from. It is a dated snapshot of each provider's published list price for a current flagship-or-notable model; rates change, so the date stamp matters and the figures below are what drive the math.
| Model | Provider | Input | Output | Cached input |
|---|---|---|---|---|
| Claude Haiku 4.5 | Anthropic | $1.00 | $5.00 | $0.10 |
| Claude Sonnet 4.6 | Anthropic | $3.00 | $15.00 | $0.30 |
| Claude Opus 4.8 | Anthropic | $5.00 | $25.00 | $0.50 |
| Claude Fable 5 | Anthropic | $10.00 | $50.00 | $1.00 |
| GPT-5.5 | OpenAI | $5.00 | $30.00 | $0.50 |
| Gemini 2.5 Pro | $1.25 | $10.00 | — | |
| Gemini 2.5 Flash | $0.30 | $2.50 | — | |
| Kimi K2.7-Code | Moonshot | $0.95 | $4.00 | $0.19 |
| GPT-5 Mini | OpenAI | $0.25 | $2.00 | — |
| Grok 4.3 | xAI | $1.25 | $2.50 | $0.20 |
| DeepSeek V4 Flash | DeepSeek | $0.14 | $0.28 | — |
| Mistral Large 3 | Mistral | $2.00 | $6.00 | — |
Prices updated: June 15, 2026. Standard-context list prices for the U.S. API. Some models add a long-context tier above a token threshold and most offer ~50% batch discounts — both are excluded here. A "—" in the cached column means that model's cached-input rate is not applied by this tool; the cached field is ignored for it.
Where these numbers come from
Anthropic's four Claude rates (Haiku 4.5 $1/$5, Sonnet 4.6 $3/$15, Opus 4.8 $5/$25, Fable 5 $10/$50) are the published per-million-token API prices; the cached-input figures apply Anthropic's documented prompt-cache read rate of about one-tenth of the input price (cache writes cost more and are not modelled here). GPT-5.5 is OpenAI's published $5 input / $30 output with a $0.50 cached-input rate. Gemini 2.5 Pro ($1.25/$10) and Flash ($0.30/$2.50) are Google's standard-prompt rates. Kimi K2.7-Code ($0.95 input / $0.19 cached / $4.00 output) is Moonshot's published API price. The cheaper options span more providers: OpenAI's GPT-5 Mini ($0.25/$2.00), xAI's Grok 4.3 ($1.25/$2.50, cached $0.20), DeepSeek V4 Flash ($0.14/$0.28), and Mistral Large 3 ($2.00/$6.00) are each that provider's published standard rate; where a provider does not publish a simple cached-input rate, the cached column shows "—" and the cached field is ignored for that model. Links are in Sources.
Reading the result
The calculator ranks every model by total cost for the workload you entered and marks the cheapest. Treat that ranking as a budget input, not a recommendation: the cheapest model is rarely the most capable, and a stronger model that solves a task in one pass can beat a cheap one that needs three tries. The useful comparisons are usually within a tier — Haiku against Gemini Flash for high-volume classification, Opus against GPT-5.5 against Gemini Pro for harder reasoning — and the output-token box is where the real spread shows up, because that is the rate that varies most between models.
A worked example
Say a support-reply feature sends a 6,000-token prompt and gets back a 400-token answer, 50,000 times a month. On Claude Haiku 4.5 that is (6,000 × $1 + 400 × $5) per million, or about $0.008 per call — roughly $400/month. The same workload on Opus 4.8 runs about five times that. If 5,000 of those prompt tokens are a fixed instruction block you can cache, moving them to the cached box bills those tokens at about a tenth of the input rate — roughly 90% off that portion — on the models that support it. Plug your own numbers in above; the point of the tool is that the ranking can flip depending on how long your outputs are and how much of your prompt repeats.
Sources
- Anthropic — Claude API pricing (Claude model per-million-token input/output rates).
- Anthropic — prompt caching (cached-read pricing is ~0.1× the input rate; writes cost more).
- OpenAI — API pricing (GPT-5.5 input / cached / output rates).
- Google — Gemini API pricing (Gemini 2.5 Pro and Flash standard rates).
- Moonshot AI — Kimi API pricing (Kimi K2.7-Code input / cached / output rates).
- OpenAI — API pricing (GPT-5 Mini input / output rates).
- xAI — Grok API models and pricing (Grok 4.3 input / cached / output rates).
- DeepSeek — API pricing (DeepSeek V4 Flash input / output rates).
- Mistral AI — API pricing (Mistral Large 3 input / output rates).
Related GearBriefly tools and reading
Cost is only half of the "can I run this" question — the other half is hardware. If you are weighing a hosted API against running a model yourself, the LLM VRAM calculator sizes the GPU memory a local model needs. For context on the prices above, see our briefings on Kimi K2.7-Code's specs and pricing, Claude Fable 5's plan access and credits, and how token costs add up at enterprise scale.
Method & sources. The cost is each model's published per-million-token input, output, and cached-input list price multiplied by the token counts you enter, summed and divided by one million. Prices are a dated snapshot (June 15, 2026) of U.S. standard-context API rates; long-context tiers and batch discounts are excluded, and cached pricing is only applied where a provider publishes a cached-input rate. The character-to-token helper is a rough ~4-chars-per-token estimate, not a tokenizer. GearBriefly built this tool, takes no affiliate revenue from it, and shows the formula so you can verify every figure.