Tokens × price, computed locally

LLM API cost calculator

Enter your input and output volume to compare what GPT, Claude, Gemini, and DeepSeek would charge for the same workload.

 
Total cost $—
AD
Live comparison

Same workload, every model

Prices per 1M tokens · verified October 2026

ModelInput / 1MOutput / 1MThis workload
OpenAI GPT-4o $2.50 $10.00 $—
OpenAI GPT-4o mini $0.15 $0.60 $—
OpenAI o3 $2.00 $8.00 $—
Anthropic Claude Sonnet 4.5 $3.00 $15.00 $—
Anthropic Claude Haiku 4.5 $1.00 $5.00 $—
Google Gemini 2.5 Pro $1.25 $10.00 $—
Google Gemini 2.5 Flash $0.30 $2.50 $—
DeepSeek DeepSeek-V3 $0.27 $1.10 $—
DeepSeek DeepSeek-R1 $0.55 $2.19 $—
Mistral Mistral Large 2 $2.00 $6.00 $—
Official list prices; batch and prompt caching usually cut input cost by ~50%. Verify before large commits.
How the math works

Cost is input × price + output × price.

There is no mystery in API billing: providers charge per million input tokens and per million output tokens at separate rates. Total cost = input millions × input rate + output millions × output rate. The interesting part is the ratio between the two and between models — a workload heavy on output can cost five times more on one provider than a rival with cheaper output pricing.

Two levers routinely halve real bills: prompt caching (repeated context billed at a fraction of input price) and batch APIs (50% discounts for non-realtime work). Neither shows in list prices, so treat the table as the ceiling and these as your discounts.

Good to know

Frequently asked questions

Why do output tokens cost more than input tokens?

Input tokens are processed in parallel during a single forward pass, while each output token requires a full generation step — memory-bound decoding plus the growing KV cache. Providers price output 3-6× higher to reflect that real compute cost.

How often are these prices updated?

Reference prices from official pricing pages, last verified October 2026, re-checked quarterly. Prices move often — treat this as a comparison tool and confirm on the vendor page before large commits. Batch and cached input are usually 50% cheaper than listed.

API or self-hosting — which is cheaper?

It depends on volume. At millions of tokens per month, APIs win on simplicity; at sustained billions, a quantized model on owned GPUs crosses over. Use the training-time and VRAM calculators to price the self-hosted side before deciding.

More AI calculators

Keep computing