LLM API Cost Calculator
Enter your workload once, see the monthly bill for every model at once — including prompt-caching savings. All 12 priced models, verified rates, computed locally in your browser.
Your workload
Share of input tokens served from cache (repeated system prompts, documents, history).
Quick presets
Monthly tokens
—
Cheapest model
—
—
Flagship (GPT-5)
—
—
| Model | Input cost | Output cost | Monthly total | vs flagship |
|---|
Computed from list prices verified August 2026. Cache savings use each provider’s published cached-input rate (10% of base input on OpenAI and Anthropic; Gemini caching varies and is not yet included).
The math behind the numbers
Each row computes: requests × [in÷1M × price_in_effective + out÷1M × price_out] where price_in_effective blends the normal and cached input rates by your cache hit rate. That blend is why the cache slider changes input costs non-linearly — at 100% hit rate, input drops to roughly a tenth on models that support caching.
Not sure how many tokens your prompts actually use? Measure real numbers with the AI Token Counter — it runs OpenAI’s exact tokenizer locally, so the counts match your bill. Full per-token rates live on the Pricing Comparison page.
Frequently asked questions
How is LLM API cost calculated?
Monthly cost = requests × (input tokens ÷ 1M × input price + output tokens ÷ 1M × output price). If you use prompt caching, replace the input price with the cached rate for the share of tokens that hit the cache. Example: 10,000 requests × (2,000 in + 500 out) tokens on GPT-5 mini ($0.25 in / $2.00 out per 1M) = 10,000 × ($0.0005 + $0.001) = $15.00/month.
What does a typical LLM app cost per month?
It depends almost entirely on volume and output length. A low-traffic side project (1K requests/day, 2K in / 500 out) runs $3–45/month depending on the model. A production app with 100K requests/day starts around $300/month on mini-tier models and passes $3,000/month on flagship models. Use the calculator above with your real numbers — the difference between model tiers is often 25×.
How much does prompt caching save?
Cached input costs about 10% of the normal rate on both OpenAI and Anthropic (e.g. GPT-5: $1.25 → $0.125 per 1M). If 80% of your input tokens are repeated context — system prompts, documents, conversation history — a 50% cache hit rate cuts your input bill by roughly 45%. Agent and RAG workloads benefit most.
Why is output so much more expensive than input?
Generating tokens is compute-heavier than reading them, so providers charge 4–8× more per output token — GPT-5 is $1.25 in vs $10.00 out. Practical consequence: for output-heavy workloads (long generations, agents, code), the output rate dominates your bill and should be the first number you compare. The table above factors this in automatically.
What’s the cheapest way to run 1M requests a month?
Nano-tier models: GPT-5 nano at $0.05 in / $0.40 out per 1M tokens runs a 1K in / 300 out workload for about $175/month at 1M requests. The same volume on GPT-5 flagship costs ≈ $5,250. Route simple tasks (classification, extraction, routing) to nano models and reserve flagships for hard reasoning — model routing is the single biggest cost lever.
Are these prices stable?
No — providers adjust prices a few times a year, usually downward for older tiers when new models launch. Every rate in this calculator carries its verification date from our pricing database; we re-check against official pages monthly. Anthropic’s Sonnet 5, for instance, has an introductory rate expiring August 31, 2026, after which it rises to $3.00 in / $15.00 out.
Complete your toolkit
Token Counter for exact counts, Pricing Comparison for per-token rates, and Context Window Comparison to see what fits.