Deep-dive calculators by provider
Claude API Pricing Calculator
Haiku 4.5, Sonnet and Opus 5 — Anthropic-only cost breakdown.
OpenAI API Pricing Calculator
GPT-4o, GPT-5 and the GPT-5.6 family — OpenAI-only cost breakdown.
Gemini API Pricing Calculator
Flash-Lite, Flash and Pro — Google-only cost breakdown.
About this tool
Where the pricing data comes from and how the math works.
Why LLM costs are hard to estimate
Every provider prices input and output tokens separately, and output tokens usually cost 4–6× more than input tokens. On top of that, prompt caching (roughly 90% off repeated context) and Batch APIs (roughly 50% off) can change your real bill dramatically depending on how your app is architected. Most "pricing pages" only show the sticker price per model — they don't project it against your actual request volume. This tool does that math for you in one page, with no signup and no data leaving your browser (all calculations run client-side in JavaScript).
Tips to cut your LLM API bill
- Route by task difficulty. Use a cheap, fast model (Haiku, Flash-Lite, Luna-tier) for classification, extraction, and simple rewriting, and reserve flagship models for the hard reasoning steps.
- Cache your system prompt. If your input tokens are dominated by a long, repeated system prompt or document, prompt caching alone can cut input cost by up to 90% on the cached portion.
- Batch what isn't real-time. Bulk jobs — nightly summarization, evaluation runs, data labeling — rarely need synchronous latency, so routing them through a Batch API is close to free money at 50% off.
- Watch output length. Since output tokens are the most expensive line item, capping max output tokens and asking for concise answers has an outsized effect on total spend.
Frequently asked questions
Which LLM API is cheapest in 2026?
It depends on your input/output ratio and volume. Lightweight models (Claude Haiku 4.5, Gemini Flash-Lite, GPT-5.6 Luna) are cheapest for high-volume simple tasks; flagship models cost far more per token but handle harder reasoning. Use the calculator with your real numbers to compare.
How much does prompt caching save?
Most providers charge roughly 10% of the standard input rate for cached tokens — a 90% discount on repeated context such as a long system prompt.
How much does the Batch API save?
Batch APIs typically cost about 50% less than real-time calls, in exchange for asynchronous (non-instant) delivery of results.
Is this calculator accurate?
It uses publicly published rates checked periodically (see the last-updated date above). Prices change often — always confirm against the official pricing page linked below the results table before budgeting a production workload.