LLM API Pricing Calculator
Compare current API prices for Claude, GPT, Gemini, DeepSeek, Kimi, Grok and other LLMs, and estimate your monthly bill from token volume. Includes prompt-caching prices and batch discounts that most comparison tables miss. Prices last verified 2026-07-27. Runs entirely in your browser — no upload, no signup.
Share of input tokens served from prompt cache
| Model | Input $/M | Output $/M | Cached $/M | Context | Est. monthly |
|---|---|---|---|---|---|
DeepSeek V4 Flash DeepSeek · open-weight | $0.14 | $0.28 | $0.0028 | 1M | $9.80 |
Gemini 3.1 Flash-Lite | $0.25 | $1.5 | $0.025 | 1M | $27.50 |
DeepSeek V4 Pro DeepSeek · open-weight | $0.435 | $0.87 | $0.003625 | 1M | $30.45 |
GPT-5 mini OpenAI | $0.25 | $2 | $0.025 | 400K | $32.50 |
GLM-5 Zhipu (z.ai) · open-weight | $1 | $3.2 | $0.2 | 200K | $82.00 |
Grok 4.20 xAI | $1.25 | $2.5 | $0.2 | 1M | $87.50 |
Kimi K2.7 Code Moonshot · open-weight | $0.95 | $4 | $0.19 | 262K | $87.50 |
Claude Haiku 4.5 Anthropic | $1 | $5 | $0.1 | 200K | $100 |
GPT-5.6 luna OpenAI | $1 | $6 | $0.1 | 1.05M | $110 |
GLM-5.2 Zhipu (z.ai) · open-weight | $1.4 | $4.4 | $0.26 | 200K | $114 |
Gemini 3.6 Flash | $1.5 | $7.5 | $0.15 | 1M | $150 |
Grok 4.5 xAI | $2 | $6 | $0.3 | 500K | $160 |
Claude Sonnet 5 Anthropic | $2 | $10 | $0.2 | 1M | $200 |
Gemini 3.1 Pro Preview | $2 | $12 | $0.2 | 1M | $220 |
GPT-5.6 terra OpenAI | $2.5 | $15 | $0.25 | 1.05M | $275 |
Kimi K3 Moonshot · open-weight | $3 | $15 | $0.3 | 1.048576M | $300 |
Claude Opus 5 Anthropic | $5 | $25 | $0.5 | 1M | $500 |
GPT-5.6 sol OpenAI | $5 | $30 | $0.5 | 1.05M | $550 |
Claude Fable 5 Anthropic | $10 | $50 | $1 | 1M | $1000 |
Prices are per 1 million tokens in USD, standard (non-batch) tier, verified 2026-07-27 against official pricing pages. Claude Sonnet 5: Intro price through Aug 31, 2026; $3 / $15 after. GPT-5.6 sol: Requests beyond the long-context threshold bill at 2× input / 1.5× output. Gemini 3.1 Pro Preview: Prompts over 200K tokens bill at $4 / $18. Grok 4.5: Requests over 200K tokens bill at 2×. Kimi K3: Always-on reasoning; output includes thinking tokens.
Batch discount is applied only to models whose provider offers an async batch tier. Cached-input pricing models the read price; cache-write surcharges (Anthropic) are not included. Long-context surcharges apply above provider thresholds and are noted per model.
How to use / Why use this tool / FAQ
How to use
Enter your expected monthly token volume — input tokens and output tokens, in millions. Optionally set a prompt-cache hit rate (the share of input tokens served from cache at the cheaper cached price) and toggle the async Batch API discount. The table instantly ranks every model by estimated monthly cost, with the cheapest highlighted. Filter between proprietary and open-weight models, and copy the whole comparison as text for a teammate or a doc. Every price shows the date it was last verified against the provider's official pricing page.
Why use this tool
LLM API prices change constantly — new model families launch monthly and providers reprice several times a year, so most comparison tables you find in search results are out of date. This calculator is maintained against official pricing pages and models the parts naive tables miss: prompt-caching read prices (often 10× cheaper than fresh input), async batch discounts, and the fact that output tokens usually cost 3-6× input tokens. Use it to compare providers before building, to estimate a production budget from real traffic numbers, or to check whether switching models or adding caching would meaningfully cut your bill. If you also self-host open-weight models, pair it with our LLM VRAM Calculator to compare API cost against running your own GPUs.
FAQ
- How is the monthly cost calculated?
- Cost = uncached input tokens × input price + cached input tokens × cached-input price + output tokens × output price, all per million tokens. If you enable the Batch API toggle, the applicable discount (typically 50%) is applied for providers that offer an async batch tier.
- How current are the prices?
- Each price is verified against the provider's official pricing page, and the verification date is shown on the page. When providers reprice or launch new models we update the table — freshness is the whole point of this tool, since most pricing comparisons in search results are months out of date.
- What is prompt caching and why does it matter?
- Providers let you cache a repeated prompt prefix (system prompts, long documents, few-shot examples) and charge far less — often around 10% of the normal input price — when later requests reuse it. For chatbots and agents that resend large context every turn, a high cache hit rate can cut input costs by an order of magnitude, which is why this calculator models it explicitly.
- What is the Batch API discount?
- Most major providers offer an asynchronous batch tier: you submit many requests at once, results come back within a time window (typically 24 hours), and both input and output tokens are billed at roughly half price. It is ideal for offline workloads like evaluation runs, embeddings backfills, and bulk content processing.
- Why do output tokens cost more than input tokens?
- Generating tokens requires a full forward pass per token, while input tokens are processed in parallel during prefill. Providers price this asymmetry in: output is typically 3-6× the input price. Workloads that generate long responses (writing, code generation) are therefore dominated by output cost, while long-context summarization is dominated by input cost.
- Are open-weight models cheaper via API?
- Usually, per token — open-weight models like DeepSeek, Kimi, and Qwen are served by multiple competing providers, which pushes prices down. But quality per task varies, and for very high volume, self-hosting can be cheaper still. Use our LLM VRAM Calculator to see what hardware a model needs before comparing.
- Do the prices include long-context surcharges or intro pricing?
- Where a provider charges more above a context threshold or runs time-limited introductory pricing, we note it next to the model rather than silently averaging it in. The headline numbers are always the standard tier so models stay comparable.
- Is my usage data uploaded?
- No. The calculator is pure client-side JavaScript — the price table ships with the page and all math runs in your browser. No sign-up, no upload, no tracking of your inputs.