Most LLM cost calculators show you list price — the sticker rate multiplied by your token counts. But real production workloads almost never pay list price: they pay the effective cost after prompt caching and batch discounts kick in. This tool computes both. Use this LLM API pricing calculator to compare providers side by side: enter your tokens and monthly volume below and it ranks every major model cheapest-first for the pricing mode you actually run.
LeanLM (not affiliated with Google's LearnLM educational AI) is an LLM cost optimization platform. This pricing comparison tool is a free companion to our LLM effective cost table, where every price below is documented and dated.
| Model | Provider | Effective $/1M in | Effective $/1M out | Monthly cost |
|---|
That's list price. LeanLM measures your real cache-hit + batch rate and computes your actual effective cost — join the waitlist.
How Effective LLM Cost Is Calculated
Every row above starts from the same base formula, then applies a per-mode multiplier to the input and output prices:
Monthly cost = (input tokens × effective input price + output tokens × effective output price) × requests ÷ 1,000,000.
Definition
Effective LLM cost is what you actually pay per token after cache and batch discounts — not the list/sticker price.
List price
The provider's published rate, no discounts. Input and output both bill at sticker price. This is what naïve calculators show — and what almost no production workload actually pays.
Cache hit — input ≈ 0.1× list
A cache read bills input tokens at roughly one-tenth of list for OpenAI, Anthropic, and Gemini; DeepSeek's automatic cache discount is deeper, closer to one-fiftieth ($0.0028 vs its $0.14 list). The exact cache-hit price is hard-coded per model above. Output is never discounted by caching, so the output column stays at list price in this mode.
Batch (async) — input & output × 0.5
Async batch APIs trade latency for a 50% discount on both input and output. DeepSeek has no batch tier, so it shows n/a and drops out of the ranking in batch modes rather than showing a false $0.
Batch + cache — input × 0.05
Stacking a cache hit inside a batch request compounds the discounts: input lands near one-twentieth of list, output at half. Best-case for high-volume, high-repeat workloads.
Worked example. Take gpt-5.4-nano (list $0.20 in / $1.25 out) at 2,000 input and 500 output tokens over 100,000 requests/month. List cost = (2,000 × 0.20 + 500 × 1.25) × 100,000 ÷ 1,000,000 = (400 + 625) × 0.1 = $102.50/month. Switch to cache-hit pricing (input $0.02) and the input term collapses: (2,000 × 0.02 + 500 × 1.25) × 0.1 = (40 + 625) × 0.1 = $66.50/month — a 35% cut from the input side alone, because output caching gives you nothing.
Two real-world caveats
These cache-hit figures are best-case reads. Anthropic charges a cache-write premium that amortizes to roughly 0.155× blended input at one write per twenty reads, and Google's Gemini explicit caching bills a separate per-hour storage fee for the cached context. So treat the cache-hit column as a floor you approach at high reuse, not a number you hit on request one. Prices verified July 15, 2026 — the full per-model methodology and dated changelog live in the LLM effective cost table.
Which LLM API Is Cheapest?
Run the numbers above with your own token mix and the ranking will usually settle the question for your workload — but if you just want the ranked answer with the reasoning behind it (including free tiers from Gemini, Groq, and OpenRouter), see our breakdown of the cheapest LLM API. One nuance the calculator can't model: reasoning tokens bill at plain list output price with no batch or cache discount, so reasoning-heavy models can cost far more than their sticker output rate implies.
Early Access
The Calculator Uses List Assumptions. Your Traffic Doesn't.
This tool assumes a single flat cache-hit or batch rate. LeanLM profiles your real production traffic — your actual cache-hit rate, task mix, and async share — then validates a cheaper model or routing config against your quality bar before anything ships. Join the waitlist below.
Frequently Asked Questions
How do I use this LLM cost calculator?
Enter your input tokens per request, your output tokens per request, and your monthly request volume, then choose a pricing mode: list, cache hit, batch, or batch + cache. The calculator instantly ranks every model by effective monthly cost, cheapest first, and highlights the cheapest option for your workload. Change any field and it recomputes live, and the Copy link button lets you share your exact calculation.
What does 'effective price' mean in this calculator?
List price is the sticker rate a provider publishes per million tokens. Effective price is what you actually pay after discounts: a cache hit bills input tokens at roughly one-tenth of list for OpenAI, Anthropic, and Gemini, while DeepSeek's automatic cache discount is deeper, closer to one-fiftieth. A batch (async) request bills both input and output at about half, and stacking batch and cache can drop the effective input price further. Output tokens are never discounted by caching.
Why does DeepSeek show 'n/a' in batch mode?
DeepSeek v4-flash has no asynchronous batch API tier, so there is no 50% batch price to compute. Rather than show a misleading $0, the calculator marks it n/a and excludes it from the ranking in Batch (async) and Batch + cache modes. In List and Cache hit modes DeepSeek is priced and ranked normally.
Are these prices current?
Prices in this calculator were verified July 15, 2026 against each provider's published pricing page. LLM pricing changes often, so treat the figures as a verified snapshot rather than a live feed. The full methodology and a dated changelog live in our LLM effective cost table.
Looking for the ranked answer rather than a calculator? See which LLM API is cheapest for the full breakdown, including free tiers.