Tool
Prompt-caching and long-context cost calculator
What a cached, long-prompt workload costs a month on 57 models, using each provider’s published cache-hit, cache-write and long-prompt prices.
Your workload
Example workloads
System prompt, tools, documents that stay the same between calls.
Share of calls that find the prefix still cached.
Enter a prompt size and calls above zero, and percentages from 0 to 100.
Caching changes this monthly bill by −51% to −39% across 56 models with a listed cached price.
57 models
| Model | Per month, cached | Without caching | Change |
|---|---|---|---|
| GPT-5 nanoOpenAI | $16.40 | $29.00 | −43% |
| Gemini 2.5 Flash-LiteGoogleexplicit-cache storage (per hour) not included | $28.80 | $54.00 | −47% |
| Claude Haiku 5.5Anthropiccache pays off above 22% hits | $32.80 | $55.00 | −40% |
| GPT-6 LunaOpenAIcache pays off above 22% hits | $32.80 | $55.00 | −40% |
| GPT-5.4 nanoOpenAI | $62.10 | $113 | −45% |
| Gemini 3.1 Flash-LiteGoogleexplicit-cache storage (per hour) not included | $77.00 | $140 | −45% |
| DeepSeek V4.1 FlashDeepSeekpeak rates; off-peak is half | $79.68 | $162 | −51% |
| GPT-5 miniOpenAI | $82.00 | $145 | −43% |
| Gemini 2.5 FlashGoogleexplicit-cache storage (per hour) not included | $99.40 | $175 | −43% |
| Gemini 3.5 Flash-LiteGoogleexplicit-cache storage (per hour) not included | $99.40 | $175 | −43% |
| Gemini 3 Flash (preview)Googleexplicit-cache storage (per hour) not included | $154 | $280 | −45% |
| Pareto 26.10Unbiased | $216 | $432 | −50% |
| Gemini 3.6 FlashGoogleexplicit-cache storage (per hour) not included | $223 | $413 | −46% |
| Gemini 3.8 FlashGoogleexplicit-cache storage (per hour) not included | $223 | $413 | −46% |
| GPT-5.4 miniOpenAI | $231 | $420 | −45% |
| Kimi K2.6Moonshot AI | $294 | $515 | −43% |
| Grok Build 0.1xAI | $296 | $520 | −43% |
| Kimi K2.7 CodeMoonshot AI | $302 | $515 | −41% |
| Claude Haiku 4.5Anthropiccache pays off above 22% hits | $328 | $550 | −40% |
| DeepSeek V4 ProDeepSeekpeak rates; off-peak is half | $342 | $700 | −51% |
| Grok 4.20 Multi-AgentxAI | $356 | $650 | −45% |
| Grok 4.20 Non-ReasoningxAI | $356 | $650 | −45% |
| Grok 4.20 ReasoningxAI | $356 | $650 | −45% |
| Grok 4.3xAI | $356 | $650 | −45% |
| o4-miniOpenAI | $363 | $594 | −39% |
| Gemini 2.5 ProGoogleexplicit-cache storage (per hour) not included | $410 | $725 | −43% |
| Gemini 4 ArgonGoogleexplicit-cache storage (per hour) not included | $568 | $1,100 | −48% |
| GPT-5.2OpenAI | $574 | $1,015 | −43% |
| GPT-5.3 CodexOpenAI | $574 | $1,015 | −43% |
| Grok 4.5xAI | $584 | $1,060 | −45% |
| Kimi K2.7 Code (high speed)Moonshot AI | $604 | $1,030 | −41% |
| Gemini 3.1 Pro (preview)Googleexplicit-cache storage (per hour) not included | $616 | $1,120 | −45% |
| Claude Sonnet 5.5Anthropiccache pays off above 21% hits | $628 | $1,100 | −43% |
| GPT-6.1 SolOpenAIcache pays off above 21% hits | $628 | $1,100 | −43% |
| Grok 4.6xAI | $640 | $1,060 | −40% |
| Grok 4.7xAI | $640 | $1,060 | −40% |
| Claude Sonnet 5Anthropiccache pays off above 22% hits | $656 | $1,100 | −40% |
| GPT-6 SolOpenAIcache pays off above 22% hits | $656 | $1,100 | −40% |
| GPT-4.1OpenAI | $660 | $1,080 | −39% |
| o3OpenAI | $660 | $1,080 | −39% |
| GPT-5.4OpenAI | $770 | $1,400 | −45% |
| Kimi K3Moonshot AI | $894 | $1,650 | −46% |
| Claude Sonnet 4.5Anthropiccache pays off above 22% hits | $984 | $1,650 | −40% |
| Claude Sonnet 4.6Anthropiccache pays off above 22% hits | $984 | $1,650 | −40% |
| Claude Opus 5.5Anthropiccache pays off above 21% hits | $1,256 | $2,200 | −43% |
| GPT-5.5OpenAI | $1,540 | $2,800 | −45% |
| Claude Opus 4.5Anthropiccache pays off above 22% hits | $1,640 | $2,750 | −40% |
| Claude Opus 4.6Anthropiccache pays off above 22% hits | $1,640 | $2,750 | −40% |
| Claude Opus 4.7Anthropiccache pays off above 22% hits | $1,640 | $2,750 | −40% |
| Claude Opus 4.8Anthropiccache pays off above 22% hits | $1,640 | $2,750 | −40% |
| Claude Opus 5Anthropiccache pays off above 22% hits | $1,640 | $2,750 | −40% |
| Claude Fable 5.1Anthropiccache pays off above 20% hits | $3,070 | $5,500 | −44% |
| Claude Mythos 5.1Anthropiccache pays off above 20% hits | $3,070 | $5,500 | −44% |
| Claude Fable 5Anthropiccache pays off above 22% hits | $3,280 | $5,500 | −40% |
| Claude Mythos 5Anthropiccache pays off above 22% hits | $3,280 | $5,500 | −40% |
| GPT-6 AstraOpenAIcache pays off above 22% hits | $3,280 | $5,500 | −40% |
| GPT-5.5 ProOpenAIno cached price listed | $16,800 | $16,800 | — |
How the bill is worked out
- Per call: repeated prefix × hit rate at the cached-input price, plus repeated prefix × misses at the cache-write price (or the input price where the provider lists no cache-write price), plus the rest of the prompt at the input price, plus output at the output price.
- Long prompts: when the prompt passes a model’s published threshold, all of that call uses the long-prompt prices. 18 of the 57 models list such a tier.
- Cache writes: 21 models list a cache-write price (5-minute cache where there is a choice). Where it is above the input price, a cache miss costs more than an uncached call, so caching only pays above a certain hit rate; the table shows that rate.
- Prices: standard list prices from the LLM API price index, each from the provider’s own page, checked October 17, 2026. Data: price-index.json.
- Not included: batch and off-peak discounts, Google’s per-hour storage for explicit caches, 1-hour cache writes, taxes.
Questions
How much does prompt caching save?
It depends on how much of each prompt repeats and how often the cache is hit. Cache reads are listed at a fraction of the input price, but some providers charge more than the input price to write the cache, so a low hit rate can cost more than no caching. The calculator shows the hit rate where caching starts to pay for those models.
What are long-prompt rates?
Some providers list higher prices once a prompt passes a size threshold: above 100,000 tokens for Claude Haiku 5.5, above 272K tokens for several OpenAI models, and at 200K tokens for some Google and xAI models. The calculator switches a model to those rates when your prompt crosses its threshold.
Where do the prices come from?
From the Unbiased LLM Price Index: each price is read from the provider’s own pricing page and dated. These were checked October 17, 2026. Cache-write prices are used where the page lists them (21 of 57 models); otherwise a cache miss is billed at the normal input price.
What does the calculator leave out?
Batch and off-peak discounts, Google’s per-hour storage fee for explicit caches, 1-hour cache-write prices, taxes, and anything a provider doesn’t list on its pricing page. It also does not know how often your cache expires; the hit rate stands in for that.