Most LLM cost calculators show list price, the sticker rate multiplied by your token counts. Almost no production workload pays that: it pays the effective cost after prompt caching and batch discounts kick in. Enter your tokens and monthly volume below to rank 32 models across 10 providers cheapest-first for the pricing mode you actually run.
Typical token shapes for each workload described below. EcoCoder bills visible output and reasoning/thinking tokens at the same $1.20/1M ($0.96/1M --flex) output rate. Dedicated GPUs typically beat serverless tokens above ~60%–80% steady utilization (break-even math →).
Don't know your token counts? Estimate from text
Rough estimate only (~4 characters per token). Real tokenizers differ by provider. The same text can tokenize 20–30% heavier on one model than another, which is why $/MTok is not directly comparable across providers. Measure your own corpus before committing.
| Model | Provider | Effective $/1M in | Effective $/1M out | Monthly cost |
|---|
Snapshot: 32 third-party models across 10 providers (checked ; Anthropic 5.5 & LeanLM ecocoder updated ; 33 rows across 11 providers total—$0.30/1M uncached in, $0.03/1M cached in, $1.20/1M out, with Batch/async reflecting --flex at 0.80×).
That's list price. Running coding agents? EcoCoder cut multi-file brownfield spend by 89% on Standard ($0.89 vs. $7.95 Opus 5.5, 91% with --flex; see Ledger v4.0). Request a $10 preview key:
LeanLM (Stellar Content Inc.) builds EcoCoder, a coding endpoint metered in GPU board Joules by Loupe. This pricing comparison tool is a free companion to our LLM effective cost table, where every price above is documented and dated across OpenAI, Anthropic, Google, DeepSeek, xAI, Mistral, Amazon, Cohere, Alibaba, and Meta.
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 pay per token after cache and batch discounts. List price is the sticker rate before them.
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 almost no production workload pays it.
Cache hit: input 0.02× – 0.25× list
A cache read discounts cached input tokens to 5% on Claude Opus 5.5 and Sonnet 5.5, 2.5% on Claude Fable 5.1, 2% on DeepSeek V4.1 Flash ($0.003 vs. $0.15), and 10% on OpenAI, Gemini, Claude Sonnet 4.6, and LeanLM EcoCoder, blended with list input via the cached-input share slider. Output is never discounted by caching alone.
Batch / Flex (async): 0.5× – 0.8×
Async tiers trade interactive latency for a published discount on both input and output (50% off on OpenAI, Anthropic, Gemini, and Mistral batch APIs; 20% off via --flex on LeanLM EcoCoder). Rows without a modeled flat async discount show n/a rather than a false $0.
Batch + cache: stacked async & cache
Stacking a cache hit inside an async batch job applies the provider’s batch multiplier (0.5×, or 0.80× on EcoCoder --flex, or Gemini’s published stacked cache rate) to cached input and output.
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 100% 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. That's a 35% cut from the input side alone. Output caching gives you nothing.
Two real-world caveats
Use the Cached-input share slider above to blend realistic partial hit rates (e.g., 80%–97% in coding agents) rather than assuming 100% cached reads. Anthropic also charges a cache-write premium (1.25× for 5m TTL, 2× for 1h TTL; LeanLM EcoCoder charges $0 cache-write fee), and Google's Gemini explicit caching bills a separate per-hour storage fee. Third-party rates checked October 27, 2026; Anthropic 5.5 & EcoCoder updated November 24, 2026. Full methodology: 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. 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 directly: hidden reasoning tokens bill at the output rate (never discounted by prompt caching, and discounted in batch mode only where providers include thinking tokens in batch output rates), so reasoning-heavy runs can generate many times more billed output tokens than visible reply tokens.
Developer Evaluation Preview · $0 Collected
Try EcoCoder on your own repository
Drop-in Anthropic, OpenAI, and Codex coding endpoint for Python, TypeScript, JavaScript, and Java with live NVML GPU board Joule telemetry ($10.00 promotional allocation).
Three Workload Shapes and What Drives Their Cost
What dominates your monthly invoice—and whether caching or raw output price matters more—depends on the token shape of your workload:
| Workload | Token profile per request | What drives the cost | Where to look first |
|---|---|---|---|
| Support-ticket classification | Large stable input (1,000+ token system prompt), tiny output (~50 tokens) | Input tokens, almost entirely, and the prompt prefix repeats on every call | Cache-hit column. A budget-tier model with a high hit rate beats a mid-tier model at list. |
| RAG question answering | Very large input (retrieved chunks, 4,000–16,000 tokens), moderate output (300–800) | Input dominates, but the retrieved context changes per query so it caches poorly | List input price, and prompt compression before the model — caching helps only the system-prompt portion. |
| Agentic multi-step pipeline | Moderate input, large and repeated output across 5–30 model calls per task | Output tokens × call count. Caching gives nothing on output. | Output price and reasoning-token behaviour. Per-task cost, not per-call cost, is the number that matters. |
The pattern: caching only ever discounts input, so the more output-heavy your workload, the less caching saves you and the more the raw output rate decides the ranking. Agentic pipelines are the extreme case: the cheapest-per-token model and the cheapest-per-task model diverge most sharply there.
Cost per Token vs Cost per Resolved Task
A per-token calculator answers "what does this model cost." A budget owner asks what one unit of delivered value costs: one resolved ticket, one reviewed document, one completed agent run.
Those two numbers can move in opposite directions. A cheaper model that needs two retries, produces output a verifier rejects, or requires an extra reasoning pass can cost more per resolved task than a pricier model that succeeds first time. This is why a model swap that looks like an obvious win in a per-token comparison sometimes shows up flat or negative on the monthly bill.
To convert the figure above into a defensible unit cost, divide by your success rate: cost per resolved task = (cost per call × calls per task) ÷ success rate. A model at $0.002/call needing 1.4 calls per task at a 92% success rate costs $0.00304 per resolved task; a model at $0.0035/call needing 1.0 calls at 99% costs $0.00354. That's much closer than the 75% per-call price gap suggests. Track that ratio per task type before you approve a model swap.
What This Calculator Deliberately Does Not Model
Every cost model is wrong at the edges. These are the places this one under-reads, so you can adjust for them:
- Reasoning tokens. Thinking-mode models bill hidden reasoning tokens at the output rate (never discounted by prompt caching, and discounted in batch mode only on providers whose batch output rates explicitly include thinking tokens). On reasoning-heavy tasks it's often the majority of the bill, and a per-request token estimate doesn't show it. See reasoning token costs.
- Retries and failed runs. On standard postpaid APIs, a timed-out, rejected, or malformed response is billed similarly to a successful one (by contrast, hard-capped LeanLM evaluation preview keys halt over-cap requests with HTTP 402 and zero overage). Teams using standard postpaid billing routinely under-count real spend by 10–30% when modeling only successful calls.
- Tokenizer differences. $/MTok is not comparable across providers, because the same text tokenizes differently. A model priced 10% lower that tokenizes your corpus 30% heavier is more expensive for you. Multiply by your measured tokens-per-document ratio.
- Cache writes and storage. The cache-hit column is a floor you approach at high reuse, not a rate you get on request one. Anthropic charges a write premium; Gemini's explicit caching bills hourly storage for the cached context.
- Growing conversation context. In multi-turn chat the whole history is re-sent every turn, so input tokens grow with turn count. A flat per-request input figure understates a long session substantially.
- Rate limits and overprovisioning. Hitting a tier ceiling can force a more expensive model or a higher committed tier for reasons that have nothing to do with per-token price.
- Off-peak and regional discount windows. Some providers price by time of day. DeepSeek discounts its off-peak window substantially. The figures here are standard-rate only, so a workload you can defer into a discount window bills less than this calculator shows. Batch mode is the portable version of the same idea and is modelled.
Treat the calculator as a standard-rate baseline within each model’s context window (check minimum cache thresholds, e.g., ≥1,024 tokens on EcoCoder, and per-model context caps such as 128k on EcoCoder or ≤100k on the Haiku 5.5 row). Measure the gap against your actual invoice on real traffic before committing to a model change.
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 cached input tokens at 2% to 25% of list depending on model (for example 2% on DeepSeek V4.1 Flash, 2.5% on Claude Fable 5.1, 5% on Claude Opus 5.5 and Sonnet 5.5, and 10% on OpenAI, Gemini, Claude Sonnet 4.6, and LeanLM EcoCoder), blended with list input according to your cached-input percentage slider. An async batch request bills both input and output at 50% of list on OpenAI, Anthropic, Gemini, and Mistral batch APIs and 80% (−20%) on LeanLM EcoCoder --flex; stacking batch and cache applies both discounts where supported. Output tokens are never discounted by caching alone.
Why do DeepSeek and several other providers show 'n/a' in batch mode?
Rows marked n/a in Batch mode represent providers without a first-party flat-rate async batch tier modeled in this snapshot (15 of 33 rows, plus mistral-medium-3.5 in Batch + cache mode because it lacks a cached-input rate; note AWS Bedrock batch jobs and xAI’s 20% batch tier have separate platform or discount structures not modeled here). Rather than show a misleading $0, the calculator marks unmodeled rows n/a and excludes them from that mode’s ranking.
Why is my actual LLM bill higher than this calculator predicts?
Seven things this calculator deliberately does not model: hidden reasoning tokens (billed at output rates, never discounted by prompt caching, and discounted in batch mode only on providers whose batch rates explicitly cover thinking tokens); retries and failed runs (billed similarly to successful ones on standard postpaid APIs, except hard-capped evaluation accounts with zero overage); growing conversation context in multi-turn chat (the full history is re-sent every turn); tokenizer differences between providers (the same text tokenizes differently, so $/MTok is not directly comparable); cache write premiums and storage fees; rate-limit-driven overprovisioning; and off-peak or regional discount windows. Treat the calculator output as a standard-rate baseline within context limits and measure the gap on real traffic.
What is cost per resolved task, and why does it matter more than cost per token?
Cost per resolved task is what one unit of delivered value costs: one resolved ticket, one reviewed document, one completed agent run. The per-token number only tells you what a million tokens costs. Compute it as (cost per call × calls per task) ÷ success rate. It matters more because the two can move in opposite directions: a cheaper model that needs retries or an extra reasoning pass can cost more per resolved task than a pricier model that succeeds first time. A model at $0.002/call needing 1.4 calls at 92% success costs $0.00304 per resolved task, while one at $0.0035/call needing 1.0 call at 99% costs $0.00354. That's far closer than the 75% per-call price gap implies.
Are these prices current?
Third-party provider prices (32 models across 10 providers) were checked October 27, 2026 against provider list pricing and OpenRouter's public catalog, and Anthropic Claude 5.5 plus LeanLM EcoCoder's flat-rate row ($0.30/1M uncached in, $0.03/1M cached in, $1.20/1M out, 0.80× --flex, 33 rows across 11 providers) were updated November 24, 2026. LLM pricing changes often, so treat the figures as a dated snapshot rather than a live feed. The full methodology and changelog live in our LLM effective cost table.
Looking for the ranked answer rather than a calculator? See the effective cost leaderboard for the full breakdown, including free tiers.