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.

Start from a workload

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
0 characters → ~0 tokens

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.

Pricing mode
100% Blends cached-read rate with uncached input rate (coding agents typically observe 80%–97% cached prompt share; 100% = theoretical floor).
Cheapest for your workload — —
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:

Request received. Watch your inbox for your $10 EcoCoder evaluation 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).

Request received. Watch your inbox for your $10 EcoCoder evaluation key.

$0 collected · No credit card · Terms & Privacy.

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:

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.