CalcSays
CLAUDE SONNET 5 · API COST

Claude Sonnet 5 API Cost Calculator

Claude Sonnet 5 advertises $2/M input — but your workload also pays $10/M for output. This page computes the effective rate you'll actually pay, per request and per month, from live prices.

For engineers budgeting LLM API calls — shows the effective price you actually pay per million tokens (output skew + caching included), not just the advertised input rate.

Model prices from OpenRouter · updated 2026-07-13

01 Your setup

Model

$2/M in · $10/M out · cache reads $0.2/M

Prompt cachingcached share billed at $0.2/M

02 Advertised vs effective

Output is 84% of this bill — trimming response length will save you more than switching models.

Advertised
$2/M
the input rate on the pricing page
Your effective rate
$3.95/M
97% above the listed rate

$592/month · $0.01/request

$2 listed + $2.67 output premium $0.72 caching = $3.95/M effective

Caching your 60% stable prefix saves $108/month.

03 Where the money goes

Fresh input40% of input at $2/M$80.00
Cached input60% of input at $0.2/M$12.00
Output$10/M — 84% of the bill$500
Monthly total$592
Tweet
Why an effective rate? Pricing pages headline the input price, but output bills 5.0× that and caching discounts your stable prefix — so two models with the same headline can differ 2–3× on your actual workload. Compare effective rates, not brochures.

04 Cheapest model at this workload

1. Ling-2.6-flashinclusionAI · cheapest$2.02/mo ($0.01/M eff.)
2. Llama 3.1 8B InstructMeta$3.50/mo ($0.02/M eff.)
3. Mistral NemoMistral$3.50/mo ($0.02/M eff.)
4. Nex-N2-MiniNex AGI$6.15/mo ($0.04/M eff.)
5. Llama 3 8B LunarisSao10K$6.50/mo ($0.04/M eff.)
6. Granite 4.0 MicroIBM$7.30/mo ($0.05/M eff.)
7. MythoMax 13BGryphe$9.00/mo ($0.06/M eff.)
8. Mistral Small 3Mistral$9.00/mo ($0.06/M eff.)
9. Qwen2.5 7B InstructQwen$9.00/mo ($0.06/M eff.)
10. Ministral 3 3B 2512Mistral$9.60/mo ($0.06/M eff.)

Top 10 of 315models, ranked by monthly cost at this exact workload with each model's own cache pricing applied. Cheapest is a shortlist, not a verdict.

📄 Get the full agent cost audit
A multi-page report on your exact setup: where cost spirals, how much context-trimming / state-resets / model-routing each saves, and which model+framework combo is cheapest at your real failure rate. Generated from your numbers.

Prices from OpenRouter, snapshot 2026-07-13, synced daily. Per request = input × [(1−cachedShare) × in + cachedShare × cacheRead] + output × out, per 1M tokens; cached share applies only where a cache-read price is published. Write premiums, TTL and misses are modeled in the dedicated caching calculator. All math runs in your browser.

How the math works

The advertised price is the input rate — Claude Sonnet 5 lists $2 per million input tokens. But output tokens bill at $10/M (5.0× dearer), and your workload mixes both. This page's defaults — 1,000 input + 500 output per request — blend to an effective $3.95 per million tokens (97% above the listed rate). Same baseline, one identity: $2 listed + $2.67 output premium − $0.72 caching = $3.95/M.

Output drives 84% of this bill. That has a practical consequence naive calculators miss: when output dominates, trimming response length (tighter max_tokens, terser formats) saves more than switching models — the input price you shopped on barely matters.

Prompt caching (on by default here) re-bills the stable share of your input — system prompt, tools, shared docs — at Claude Sonnet 5's cache-read rate of $0.2/M instead of $2/M. At this page's default 60% cached share that saves $108 a month ($700 → $592). Write premiums, TTL and misses are modeled in our dedicated caching calculator.

Worked example at this page's defaults — 100,000 requests a month on Claude Sonnet 5: $0.01 per request, $592 per month. The live ranking below re-prices all 315 catalog models at this exact workload.

Prices sync daily from OpenRouter and the page shows its snapshot date. Every calculation runs in your browser with tested, open formulas — nothing is estimated by an AI.

Frequently asked questions

How much does the Claude Sonnet 5 API cost per month?

At this page's defaults — 1,000 input + 500 output tokens per request, 100,000 requests a month, 60% cached prefix — Claude Sonnet 5 bills $0.01 per request and $592 per month. Tune every input above for your real workload.

Why does my effective price differ from the advertised $2/M?

Two forces on the same baseline: output bills at $10/M and adds $2.67/M at this workload's mix, while caching the stable prefix subtracts $0.72/M — netting $3.95/M, 97% above the listed rate. Comparing models on the input headline alone routinely picks the wrong one; comparing effective rates doesn't.

What actually cuts an LLM API bill?

In order of typical impact: cap output length (output is usually 60–85% of the bill), enable prompt caching on the stable prefix (saves $108/month at these defaults), batch non-realtime work (~50% off on major providers), and only then consider switching models — using the effective rate, not the advertised one.

What's the cheapest model at this workload?

Right now: Ling-2.6-flash at $2.02/month, then Llama 3.1 8B Instruct ($3.50) and Mistral Nemo ($3.50) — refreshed daily from live prices. Cheapest only matters if quality holds on your task; the ranking is a shortlist, not a verdict.

What formula does this calculator use?

Per request = input × [(1 − cachedShare) × inputRate + cachedShare × cacheReadRate] + output × outputRate, all per million tokens. Effective $/M = per-request cost ÷ total tokens × 1M. The cached share applies only when the model publishes a cache-read price and the toggle is on; cache writes and misses are modeled in the dedicated caching calculator.

Are these prices current?

Prices sync daily from OpenRouter's public catalog and the page shows its snapshot date. If a sync fails, the last verified snapshot keeps serving. All math runs client-side with tested code.