Tools / LLM API Cost Calculator
LLM API Cost Calculator
Estimate your monthly LLM API bill across Anthropic, OpenAI, and Google models. Enter your monthly token volume; costs update as you type. Prices as of July 3, 2026.
Cached input share = the fraction of input tokens served from prompt cache (system prompts, few-shot examples, long documents reused across requests). Models without published cache pricing bill cached tokens at the full input rate here.
| Model | Input $/M | Output $/M | Monthly cost | vs cheapest |
|---|---|---|---|---|
| Claude Haiku 4.5 Fastest Claude tier; 200K context | $1.00 | $5.00 | — | — |
| Claude Sonnet 5 Intro pricing $2/$10 through Aug 31, 2026; 1M context | $3.00 | $15.00 | — | — |
| Claude Opus 4.8 1M context, no long-context premium | $5.00 | $25.00 | — | — |
| Claude Fable 5 Frontier tier; 1M context | $10.00 | $50.00 | — | — |
| GPT-5.2 Chat Chat-optimized variant | $0.88 | $7.00 | — | — |
| GPT-5.2 Cached input $0.175/M | $1.75 | $14.00 | — | — |
| GPT-5.2 Pro Highest OpenAI tier | $10.50 | $84.00 | — | — |
| Gemini 3 Flash Text input rate; audio input $1.00/M | $0.50 | $3.00 | — | — |
| Gemini 3.5 Flash Launched May 19, 2026 | $1.50 | $9.00 | — | — |
| Gemini 3.1 Pro Prompts >200K tokens bill $4/$18 | $2.00 | $12.00 | — | — |
Assumptions and sources
- Standard synchronous API rates. Batch APIs typically run 50% cheaper on all three providers.
- Cache write premiums (e.g. Anthropic's 1.25x on cache creation) are not modeled; for high cache-hit workloads the read savings dominate.
- Long-context surcharges (Gemini 3.1 Pro above 200K tokens) and intro discounts (Claude Sonnet 5 through Aug 2026) are noted per model but not applied.
Prices verified July 3, 2026 against: Anthropic pricing · OpenAI pricing · Gemini API pricing
Go deeper on LLM cost control
A calculator tells you the sticker price; the bigger wins come from architecture. Our guide to LLM FinOps strategies covers tiered model routing and semantic caching that cut bills 60-80%, multi-LLM routing shows a measured 44% saving with no quality drop, and LLM cost monitoring tools compares the platforms that attribute spend per user and model. For context-window spend specifically, see context window optimization.