Anthropic Claude Prompt Caching TTL & Cost Estimator
Anthropic Claude prompt caching reduces repeated input token costs by up to 90%-97.5% using cache reads priced at 0.025x to 0.1x base rates. Writing to cache incurs a 1.25x premium for the default 5-minute TTL or 2x for the 1-hour TTL. Break-even typically occurs within 2 to 3 cache hits, depending on the model and TTL selection.
Interactive Parameters & Live Verdict
Rule Diagnostics & Recommendations
Engineering Formula & Verification Notes
Calculations evaluate total expenditure by separating requests into cache writes (misses incurring 1.25x for 5-min TTL or 2x for 1-hour TTL) and cache reads (hits incurring 0.1x, 0.05x, or 0.025x depending on the model tier). Savings are computed relative to baseline raw input token billing.
Worked Engineering Example
Consider a 10,000-token system prompt and document context processed across 21 total requests using an Opus model ($3.00/MTok base rate). Without caching, 21 requests cost $0.63. With 5-minute caching and 20 cache reads (95% hit ratio), you pay 1 write at $3.75/MTok ($0.0375) and 20 reads at $0.30/MTok ($0.060), totaling $0.0975—an 84% cost reduction.
- Cache breakpoints themselves add zero cost.
- Every cache hit automatically refreshes the 5-minute or 1-hour TTL at no additional fee.
- Byte-exact prompt prefixes are strictly required for a cache hit.
Common Sizing & Compatibility Mistakes
Teams frequently run into unexpected cost increases when request intervals drift past the 5-minute TTL limit during long tool-use agent loops. When the cache expires, the next request forces a full write penalty plus a re-computation delay.
- Exceeding the 5-minute TTL during long sub-agent tool execution blocks.
- Minor formatting or dynamic timestamp injections breaking byte-exact cache matching.
- Low-traffic staging or testing environments where cache hit rates fall below 50%.
Anthropic Cache Pricing & Efficiency Tiers
| Model / Tier | Base Input | Cache Write (5m / 1h) | Cache Read Rate |
|---|---|---|---|
| Standard Models | $5.00 / MTok | $6.25 / $10.00 | 0.10x ($0.50) |
| Opus 5.5 / Sonnet 5.5 | $4.00 / MTok | $5.00 / $8.00 | 0.05x ($0.20) |
| Fable 5.1 / Mythos 5.1 | $10.00 / MTok | $12.50 / $20.00 | 0.025x ($0.25) |
Frequently Asked Technical Questions
What happens when a cache TTL expires?
When the TTL elapses without a hit, the next request treats the prefix as a cache write, paying the write multiplier (1.25x or 2x) and re-establishing the cache.
Does a cache hit cost anything extra to refresh the timer?
No. Every cache hit refreshes the TTL timer for free at no additional cost.
Why is my cache hit ratio lower than expected?
Dynamic elements like timestamps, user IDs, or minor whitespace changes at the start of your prompt will invalidate byte-exact matching and trigger cache misses.