Context caching discount calculator: what a cache hit is worth
Context caching is the highest-leverage discount in LLM pricing, and it is not applied consistently. Anthropic and Google's frontier tiers bill cached reads at 5% of the input rate; Gemini 3.8 Flash uses 10%; OpenAI's Sol uses 5% but its legacy GPT-4o model uses 50%; DeepSeek uses roughly 2%. Same feature, wildly different economics — which is why the same workload can rank models differently at 0% and 90% hit rates.
What matters on this rate card
- The cache ratio (cached price divided by input price) ranges from about 2% on DeepSeek to 50% on legacy GPT-4o.
- Caching only applies to an unchanged leading prefix. Inserting a timestamp or username before the stable block destroys the hit.
- Cache windows expire, so a hit rate measured in testing is usually an upper bound on production reality.
- At a 90% hit rate, a prompt with a 5% cache ratio costs about 14% of its uncached input price.
| Model | Input /1M | Cached /1M | Output /1M | Cache ratio | Off-peak rates |
|---|---|---|---|---|---|
| Claude Opus 5.5Anthropic | $4.00 | $0.2 | $20.00 | 5.0% | — |
| Claude Sonnet 5.5Anthropic | $2.00 | $0.1 | $10.00 | 5.0% | — |
| Claude Haiku 5.5Anthropic | $0.1 | $0.01 | $0.5 | 10.0% | — |
| Gemini 4 CarbonGoogle | $3.00 | $0.15 | $15.00 | 5.0% | — |
| Gemini 4 NeonGoogle | $2.00 | $0.1 | $10.00 | 5.0% | — |
| Gemini 3.8 FlashGoogle | $0.75 | $0.075 | $3.75 | 10.0% | — |
| GPT-6.2 AstraOpenAI | $10.00 | $1.00 | $50.00 | 10.0% | — |
| GPT-6.1 SolOpenAI | $2.00 | $0.1 | $10.00 | 5.0% | — |
| GPT-4o (Legacy)OpenAI | $2.5 | $1.25 | $10.00 | 50.0% | — |
| DeepSeek V4 ProDeepSeek | $1.32 | $0.044 | $3.96 | 3.3% | off-peak $0.66 / $0.022 / $1.98 |
| DeepSeek V4.1 FlashDeepSeek | $0.3 | $0.006 | $1.2 | 2.0% | off-peak $0.15 / $0.003 / $0.6 |
| Custom Modeleditable below | Type your own rates in the calculator's custom row to price any provider. | ||||
Run the numbers
The table below is limited to this family so the comparison stays readable. Switch back to the main calculator for all eleven models.
Completed API calls per day, including retries.
System prompt, context and history you send.
Share of input tokens served from a warm cache.
Generated answer length. Output usually costs 5x input.
22 for business tools, 30 for always-on traffic.
| Model | Input /1M | Cached /1M | Output /1M | Monthly | Relative cost | vs highest |
|---|---|---|---|---|---|---|
| Claude Haiku 5.5Anthropic | $0.1 | $0.01 | $0.5 | $224.40 | -99% | |
| DeepSeek V4.1 FlashDeepSeek | $0.3 | $0.006 | $1.2 | $527.04 | -98% | |
| Gemini 3.8 FlashGoogle | $0.75 | $0.075 | $3.75 | $1,683 | -93% | |
| Custom ModelYour numbers | $1.00 | $0.1 | $2.00 | $1,704 | -92% | |
| DeepSeek V4 ProDeepSeek | $1.32 | $0.044 | $3.96 | $2,149 | -90% | |
| Claude Sonnet 5.5Anthropic | $2.00 | $0.1 | $10.00 | $4,104 | -82% | |
| Gemini 4 NeonGoogle | $2.00 | $0.1 | $10.00 | $4,104 | -82% | |
| GPT-6.1 SolOpenAI | $2.00 | $0.1 | $10.00 | $4,104 | -82% | |
| Gemini 4 CarbonGoogle | $3.00 | $0.15 | $15.00 | $6,156 | -73% | |
| Claude Opus 5.5Anthropic | $4.00 | $0.2 | $20.00 | $8,208 | -63% | |
| GPT-4o (Legacy)OpenAI | $2.5 | $1.25 | $10.00 | $9,000 | -60% | |
| GPT-6.2 AstraOpenAI | $10.00 | $1.00 | $50.00 | $22,440 | baseline |
Sorted cheapest first. Bars are scaled to the most expensive model at your current inputs.
Context caching discount calculator: FAQ
How is the cache ratio different from the cache discount?
They are the same number seen from two directions: a 5% cache ratio means a 95% discount on cached tokens. The ratio is the clearer way to compare across models because it tells you what a cached token costs relative to the normal one.
What saves more: caching or the batch API?
It depends on the token mix. Caching cuts only the input line, and only the cached share; batch cuts everything by 50%. For input-heavy, prompt-stable workloads with a high hit rate, caching wins. For short prompts or one-shot documents, batch wins.
Can I stack caching and batch discounts?
In this calculator, yes by modelling: the batch toggle multiplies the whole bill by 0.5, and the cache hit rate applies to the input tokens first. Real providers vary on whether both apply simultaneously — verify with your provider's pricing documentation.