Cost Calculator
LLM API Cost Calculator
Estimate and compare token costs across OpenAI, Anthropic, Google, and open models for your own workload.
1,000 tokens
500 tokens
100,000 requests
Priced at each model's cache-read rate when supported
- Gemini 2.5 ProCheapest$625.00/mo$0.006250 / requestin $0.001250 · out $0.005000
- GPT-5.4$1,000.00/mo$0.0100 / requestin $0.002500 · out $0.007500
- Claude Opus 4.8$1,750.00/mo$0.0175 / requestin $0.005000 · out $0.0125
input cost output cost. Estimates only — see methodology below.
TL;DR
At current prices, 1M input + 1M output tokens costs roughly $0.4200 on DeepSeek V4 Flash and $60.00 on Claude Fable 5. Output tokens are billed several times higher than input on nearly every model, so long responses dominate the bill. Use the calculator to price your own workload; the full per-model rate table is below (updated 2026-07-05).
Cross-provider price table
Updated Jul 5, 2026| GPT-5 nanogpt-5-nano | OpenAI | $0.05 | $0.4 | $0.01 | 400K |
|---|---|---|---|---|---|
| GPT-4.1 nanogpt-4.1-nano | OpenAI | $0.1 | $0.4 | $0.03 | 1.0M |
| GPT-4o minigpt-4o-mini | OpenAI | $0.15 | $0.6 | $0.08 | 128K |
| GPT-5 minigpt-5-mini | OpenAI | $0.25 | $2 | $0.03 | 400K |
| GPT-4.1 minigpt-4.1-mini | OpenAI | $0.4 | $1.6 | $0.1 | 1.0M |
| o4-minio4-mini | OpenAI | $1.1 | $4.4 | $0.28 | 200K |
| GPT-5gpt-5 | OpenAI | $1.25 | $10 | $0.13 | 400K |
| GPT-4.1gpt-4.1 | OpenAI | $2 | $8 | $0.5 | 1.0M |
| o3o3 | OpenAI | $2 | $8 | $0.5 | 200K |
| GPT-5.4gpt-5.4 | OpenAI | $2.5 | $15 | $0.25 | 400K |
| GPT-4ogpt-4o | OpenAI | $2.5 | $10 | $1.25 | 128K |
| GPT-5.5gpt-5.5 | OpenAI | $5 | $30 | $0.5 | 400K |
| Claude Haiku 4.5claude-haiku-4-5 | Anthropic | $1 | $5 | $0.1 | 200K |
| Claude Sonnet 5claude-sonnet-5 | Anthropic | $3 | $15 | $0.3 | 1M |
| Claude Sonnet 4.6claude-sonnet-4-6 | Anthropic | $3 | $15 | $0.3 | 1M |
| Claude Opus 4.8claude-opus-4-8 | Anthropic | $5 | $25 | $0.5 | 1M |
| Claude Opus 4.7claude-opus-4-7 | Anthropic | $5 | $25 | $0.5 | 1M |
| Claude Fable 5claude-fable-5 | Anthropic | $10 | $50 | $1 | 1M |
| Gemini 2.5 Flash-Litegemini-2.5-flash-lite | $0.1 | $0.4 | $0.01 | 1.0M | |
| Gemini 3.1 Flash-Litegemini-3.1-flash-lite | $0.25 | $1.5 | $0.03 | 1.0M | |
| Gemini 2.5 Flashgemini-2.5-flash | $0.3 | $2.5 | $0.03 | 1.0M | |
| Gemini 2.5 Progemini-2.5-pro | $1.25 | $10 | $0.13 | 1.0M | |
| Gemini 3.5 Flashgemini-3.5-flash | $1.5 | $9 | $0.15 | 1.0M | |
| Gemini 3.1 Progemini-3.1-pro | $2 | $12 | $0.2 | 1.0M | |
| DeepSeek V4 Flashdeepseek-v4-flash | DeepSeek | $0.14 | $0.28 | $0 | 1M |
| Grok 4.3grok-4.3 | xAI | $1.25 | $2.5 | — | 1M |
| Mistral Small 4mistral-small-latest | Mistral | $0.15 | $0.6 | — | 128K |
| Codestralcodestral-latest | Mistral | $0.3 | $0.9 | — | 256K |
| Mistral Large 3mistral-large-latest | Mistral | $0.5 | $1.5 | — | 128K |
| Llama 3.3 70B Instruct Turbollama-3.3-70b | Meta | $1.04 | $1.04 | — | 131K |
| Llama 3.1 405B Instruct Turbollama-3.1-405b | Meta | $3.5 | $3.5 | — | 131K |
How it works
For each selected model the calculator computes perRequest = (inputTokens ÷ 1e6) × inputPerM + (outputTokens ÷ 1e6) × outputPerM, then multiplies by requests per month. If you supply cached input tokens and the model offers prompt caching, those tokens are priced at the model's cache-read rate and the remainder at the standard input rate.
Scope is text token pricing for chat/completion models. Per-image, per-character, and audio pricing are out of scope, as are batch/flex discounts and tiered pricing for very large prompts (noted per model in the table). Every rate was verified against the provider's official pricing page on 2026-07-05; the table shows that date so you can judge freshness.
FAQ
- How is LLM API cost calculated?
- Per request, cost = (input tokens ÷ 1,000,000 × input price per 1M) + (output tokens ÷ 1,000,000 × output price per 1M). Monthly cost multiplies that by your request volume. Output tokens are billed at a higher rate than input tokens on almost every model, so responses usually dominate the bill.
- Why is output pricing higher than input pricing?
- Generating tokens is more compute-intensive than reading them, so providers charge more for output. On GPT-4o output is 4× the input rate ($10 vs $2.50 per 1M); on Claude Opus 4.8 it is 5× ($25 vs $5). Workloads that produce long responses cost far more than their prompt size suggests.
- How much do GPT-4o, Claude, and Gemini cost per 1M tokens?
- As of the updated date: GPT-4o is $2.50 input / $10 output per 1M tokens; Claude Opus 4.8 is $5 / $25; Claude Sonnet 5 is $3 / $15; Gemini 2.5 Pro is $1.25 / $10; Gemini 2.5 Flash is $0.30 / $2.50. The full table is above and updates as prices change.
- Do cached (prompt caching) tokens reduce cost?
- Yes. Most providers offer prompt caching that bills repeated input tokens at a large discount — often around 10% of the normal input rate. Enter your cached input tokens per request and the calculator prices them at each model's cache-read rate. Note some providers also charge a cache-write premium or hourly storage fee not captured by a single per-token number.
- Why do my real costs differ from this estimate?
- This tool covers text token pricing for chat/completion models. Real bills also include images, audio, tool/function-call tokens, reasoning tokens on o-series and thinking models, batch or flex discounts, and provider-specific tiered pricing for very large prompts. Treat the output as a close estimate and verify against your provider dashboard.