Calculator
LLM API cost calculator
Estimate your monthly LLM spend: pick models, enter your request volume and typical token counts, and compare what the same workload costs across providers — with prompt caching factored in. Prices update daily.
Your monthly workload
Cache hit rate = share of input tokens served from the provider's prompt cache, billed at the model's cached-input price. Estimates use standard per-token rates — batch discounts, service tiers, and long-context surcharges are not applied.
| Model | Input | Cached input | Output | Per request | Monthly |
|---|---|---|---|---|---|
| Gemini 3.7 Flashcheapest | $450 | $30.00 | $938 | $0.00283 | $1,418 |
| DeepSeek V4 Pro | $792 | $17.60 | $990 | $0.00360 | $1,800 |
| Claude Sonnet 5 | $1,200 | $80.00 | $2,500 | $0.00756 | $3,780 |
| GPT-5.6 Terra | $1,200 | $80.00 | $3,000 | $0.00856 | $4,280 |
| GPT-5.6 | $3,000 | $200 | $7,500 | $0.021 | $10,700 |
| Claude Fable 5 | $6,000 | $400 | $12,500 | $0.038 | $18,900 |
Prices last synced Aug 20, 2026 from the LiteLLM community price catalog — the same catalog Marginal prices real usage events against, refreshed daily. Spot an error? Tell us.
Looking for the raw rates instead? The LLM pricing table lists input, output, and cached-input prices for every model here, and each model page breaks down its billing quirks.
Frequently asked questions
How do I estimate tokens per request?
A rough rule for English text: 1 token ≈ 4 characters, so a page of text is ~500 tokens. Count your system prompt and typical user message for input; for output, look at typical response length. If you're already in production, your provider dashboard reports average token counts — or track real per-request usage with Marginal and stop estimating.
What cache hit rate should I assume?
If every request shares a long, stable system prompt (chat apps, agents, RAG with fixed instructions), 50–90% of input tokens can be cache hits. If prompts vary wildly per request, assume 0. The cached share is billed at the model's cached-input rate — often 10x cheaper — so this slider moves real money at scale.
Does the calculator include batch discounts or service tiers?
No — it estimates standard, synchronous per-token pricing. Batch APIs (typically 50% off), discounted or priority service tiers, and long-context surcharges vary by provider; the provider pages document those mechanics.
How accurate is this against a real bill?
The math is exact for the rates shown, but real workloads drift: token counts vary per request, cache hit rates fluctuate, models get switched. The only accurate number is one computed from your actual API responses — which is what Marginal does, per call, priced at that day's rates.
Estimates are where costs start. Bills are where they surprise.
Marginal prices every real LLM call your app makes and slices spend by customer, feature, or any field you define — so the estimate above never has to be defended in a postmortem.