Which LLM is cheapest for your use case?

Enter your tokens and volume — all models appear side by side with per-request, daily and monthly cost. Prices editable.

{{ __t('usage_section') }}
{{ __t('cache_hint') }}

{{ __t('cost_comparison') }}
{{ __t('model') }} {{ __t('th_in') }}
$/Mtok
{{ __t('th_out') }}
$/Mtok
{{ __t('th_cache_read') }}
$/Mtok
{{ __t('th_per_request') }}
$
{{ __t('th_per_day') }}
$
{{ __t('th_per_month') }}
$
{{ m.name }}
{{ m.vendor }}
{{ calcRequest(m).toFixed(5) }} {{ calcDay(m).toFixed(2) }} {{ calcMonth(m).toFixed(2) }}
{{ __t('note_label') }}: {{ __t('prices_disclaimer') }}

How LLM API costs are structured

Providers bill per million tokens (Mtok) — separately for input (prompt + system + context) and output (model reply). Many add a caching tier: stable context can be cached and read again at a fraction of the input price. With many requests sharing the same system prompt this slashes the bill — typically 50–90% off the input portion.

Practice: how to pick the cheapest viable model

Classification, summarization, simple extraction: small models (Haiku, GPT-4o mini, Gemini Flash, DeepSeek) are often 20–100× cheaper than top tier and cover 80% of workloads. Reasoning, code and multi-hop tasks benefit from Opus, GPT-4o, Gemini Pro. Tip: build a router that sends easy tasks to cheap models and hard ones to top tier — typical 40–70% savings.

Tips to lower your bill

  • Use prompt caching: mark system prompts and large constant contexts as cache blocks — Anthropic, OpenAI and Google all support it.
  • Shorten output — output is usually 3–5× the input price. Use structured JSON outputs instead of long prose.
  • Use batch APIs: async batches are 50% cheaper at Anthropic and OpenAI than live requests.

The five cost levers for LLM APIs (as of mid-2026)

An LLM API bill has more components than most teams expect at first. The obvious ones are input tokens (everything you send: system prompt, history, user message, tool definitions) and output tokens (what the model generates). The not-so-obvious ones are cache-read tokens (5-10x cheaper than input at Anthropic and OpenAI), cache-write tokens (Anthropic: 25% more expensive than input for the first write, then free on each hit for 5 minutes), and for vision models image tokens (e.g. ~765-1100 tokens per 1024x1024 image in GPT-4o depending on detail).

As of mid-2026 the price spread between the largest and smallest models is about 100x. Claude Opus 4.7 costs 15 USD / 75 USD per million tokens (input/output). Claude Haiku 4.5 lands at 1 USD / 5 USD. GPT-4o-mini at 0.15 USD / 0.60 USD. Gemini 2.0 Flash at 0.075 USD / 0.30 USD. DeepSeek V3 at 0.27 USD / 1.10 USD. Translation: a workload that costs 1,000 USD/month on Opus runs for about 67 USD on Haiku 4.5, about 5 USD on Gemini Flash. The right question is not "which model has the lowest token price" but "which model is just barely big enough for the concrete task".

Also note the output asymmetry: at almost every provider an output token costs 3-5x as much as an input token. Shortening responses from "explain in detail" to "answer in 50 words" often saves more than shrinking the prompt. In this tool's default (5,000 input, 1,000 output) input drives latency but often only 40-50% of cost — the rest comes from output, despite being one fifth of the tokens.

The cost formula

The per-request calculation — including cache hit rate — is:

cached_in   = input_tokens * (cache_hit_rate / 100)
fresh_in    = input_tokens - cached_in

cost_request = (fresh_in   * price_in     +
                cached_in  * price_cache  +
                out_tokens * price_out) / 1_000_000

cost_day   = cost_request * requests_per_day
cost_month = cost_day     * 30

// Example: Claude Sonnet 4.6 (3.00 / 15.00 / 0.30 USD per Mtok),
//          5000 input, 1000 output, 0% cache, 1000 requests/day
// fresh_in   = 5000
// cost_req   = (5000 * 3 + 0 * 0.3 + 1000 * 15) / 1_000_000 = 0.030 USD
// cost_day   = 30 USD
// cost_month = 900 USD

// Same load with 80% cache:
// fresh_in   = 1000
// cost_req   = (1000 * 3 + 4000 * 0.3 + 1000 * 15) / 1_000_000 = 0.0192 USD
// cost_month = 576 USD --> 36% savings

Realistic workload scenarios

Five concrete workloads and their monthly cost — based on the tool's default prices. The numbers help build intuition for what an idea actually costs:

  • Customer-support chatbot, 5,000 conversations/day, each ~2,000 input + 500 output tokens. With Claude Haiku 4.5 (1 USD / 5 USD per Mtok): 0.0045 USD per conversation, 22.50 USD per day, 675 USD/month. With Claude Sonnet 4.6 (3 / 15): 2,475 USD/month. With Gemini 2.0 Flash: 56 USD/month. The tool shows the comparison live.
  • RAG system with a large system prompt, 1,000 requests/day: 8,000-token static prompt + retrieved context + 800-token output. Without caching on Claude Sonnet 4.6: 8,000 * 3 + 800 * 15 = 36,000 USD/M = 36 USD/day, 1,080 USD/month. With a 90% cache hit on the system prompt: 800 * 3 + 7,200 * 0.30 + 800 * 15 = 16,560 USD/M = 16.56 USD/day, 497 USD/month — over 50% savings from prompt caching alone.
  • Async data extractor (e.g. PDF -> JSON), 100,000 documents/month, each 4,000 input + 1,500 output. Live API on GPT-4o-mini: 4,000 * 0.15 + 1,500 * 0.60 = 1,500 USD/M. Per document 0.0015 USD, total 150 USD/month. With OpenAI batch API (50% off): 75 USD/month. With Anthropic Claude Haiku 4.5 batch: ~190 USD/month. For non-latency-critical workloads (pipeline jobs, backfills), batch almost always pays off.
  • Code assistant for 50 developers, about 200 requests per dev per day (10,000/day), each 6,000 input (code context) + 1,500 output. Claude Sonnet 4.6 without cache: 6,000 * 3 + 1,500 * 15 = 40,500 USD/M = 0.0405 USD/request = 405 USD/day = 12,150 USD/month. With 70% cache (codebase prompt rarely changes): 1,800 * 3 + 4,200 * 0.30 + 1,500 * 15 = 29,160 USD/M = 8,748 USD/month. Savings: 28%.
  • High-frequency classification (spam filter, sentiment tagging), 1,000,000 requests/day, each 200 input + 5 output. Gemini 2.0 Flash: 200 * 0.075 + 5 * 0.30 = 16.5 USD/M = 0.0000165 USD/request = 16.50 USD/day = 495 USD/month. DeepSeek V3: 200 * 0.27 + 5 * 1.10 = 59.5 USD/M = 1,785 USD/month. At this scale, picking the right model matters more than any prompt-level optimization.

Limits of this calculation

The calculation is a linear model and ignores several real-world effects. (1) Prices change. The defaults are mid-2026 — Anthropic, OpenAI and Google cut prices every 6-12 months (sometimes 50%+), while new flagship models arrive at higher tiers. Always check the official pricing pages before production. (2) Cache-write cost is not modeled here. Anthropic charges 1.25x input price for the first cache write (standard) or 2x (1h TTL). At very low cache hit rates caching can briefly be more expensive. (3) Image, audio, video tokens are billed separately. GPT-4o: ~765-1100 tokens per 1024x1024 image, Claude Sonnet: ~1,500 tokens. (4) Tool-use overhead: each tool definition consumes between 50 and several hundred tokens per request. (5) Latency cost (=slower responses with larger models) is not included — but can be UX-relevant and indirectly cost conversion. Treat this calculator as an order-of-magnitude estimator, not a billing tool.

Frequently asked questions

What exactly is prompt caching and when does it pay off?
Anthropic and OpenAI cache static prompt prefixes (system prompt, few-shot examples, RAG context) in the KV cache of inference servers. The first request pays the cache write (Anthropic: 1.25x input price); each follow-up request within 5 minutes (or 1 hour in long-TTL mode) pays only 10% of the normal input price for the cached tokens. It pays off from about 1,024 tokens of cache and at least 2-3 requests within the TTL window with the same prefix. Production chat or RAG systems regularly hit 50-90% savings.
Is the batch API worth it for my use case?
If your requests are not embedded in a user conversation and you can tolerate up to 24h latency — yes. OpenAI Batch and Anthropic Message Batches are both 50% cheaper than live calls. Good fits: document data extraction, classification of large datasets, nightly embedding computation, translations for CMS backfills. Not for: user-facing chats, real-time decisions, anything below 1-minute latency.
Why is output 3-5x more expensive than input?
Inference hardware distinguishes prefill (input tokens processed in parallel, very GPU-efficient) from decode (output tokens generated sequentially, one per forward pass). Decode is significantly more expensive in GPU-seconds per token. Providers pass this through directly to pricing. Consequence: every token the response is shorter saves 3-5x as much as a token less of input. Setting max_tokens=200 instead of max_tokens=1000 can halve the bill.
Why are prices in the tool in USD and not EUR?
Anthropic, OpenAI, Google and DeepSeek list prices primarily in USD. EUR amounts move with exchange rates and only finalize on invoices at month end. Most LLM cost reports and comparison sites also use USD/M-tokens. At an exchange rate around 1.05 USD/EUR (mid-2026) the figures are nearly 1:1 comparable.
How accurate are the tool's default prices?
They reflect the publicly published list prices as of mid-2026. Volume discounts (enterprise contracts), regional Azure OpenAI markups, free trial credits, and Provisioned Throughput are not modeled. The table is editable — if you have a better contract, overwrite prices in place and the calculation re-runs live.
Which model should I start with to save on cost?
Rule of thumb: start small, scale up only when needed. Most workloads run fine on GPT-4o-mini, Claude Haiku 4.5 or Gemini 2.0 Flash. Switch to Sonnet/GPT-4o/Gemini Pro only when an A/B test shows the larger model actually lifts conversion, accuracy or customer satisfaction. Opus / GPT-4o-tier is really only needed for top-end code generation, legal analysis or multi-step reasoning. Typical path: first MVP on Haiku/Flash, in beta run a representative sample in parallel on Sonnet and compare outputs.

Related tools