Savings
Prompt caching savings calculator
What prompt caching saves on a repeated prefix, including the cache write cost where the vendor charges one.
With model claude-sonnet-5-5, cached prefix tokens 20,000 tokens, variable tokens 500 tokens, output tokens 400 tokens, requests per month 50,000, cache hit rate 90%, the monthly without cache is $2,250 at list prices read 2026-11-01.
Monthly without cache
Read from vendor pricing pages on 2026-11-01. Arithmetic on list prices, not advice or a quote.
Saving and exports come with Pro, $9 a month. What is in it. The calculator itself is free.
How it works
Caching pays when the same long prefix is sent often within the cache lifetime. Anthropic charges a write premium (25 percent over input for the 5-minute cache) and bills reads at 5 to 10 percent of input; OpenAI bills cached input at a discount with no write charge. Misses pay the write price here.
The formula
with cache = hits * (prefix * read_price) + misses * (prefix * write_price) + all * (variable * input_price + output * output_price); write_price = input_price where the vendor charges no write premium
Worked example
Inputs
- Model
- claude-sonnet-5-5
- Cached prefix tokens
- 20,000 tokens
- Variable tokens
- 500 tokens
- Output tokens
- 400 tokens
- Requests per month
- 50,000
- Cache hit rate
- 90%
Result
- Monthly without cache
- $2,250
- Monthly with cache
- $590.00
- Monthly savings
- $1,660
- Saving
- 73.8%
Sources
- developers.openai.com/api/docs/pricing (read 2026-11-01)
- platform.claude.com/docs/en/about-claude/pricing (read 2026-11-01)
- ai.google.dev/gemini-api/docs/pricing (read 2026-11-01)
Prices read from each vendor's own pricing page on 2026-11-01; the page may have changed since. This is arithmetic on published list prices, not advice or a quote. Check the vendor's page before committing a budget.