Cost formula
Net cache savings = (full input price − cache read price) × cached tokens × hit rate × requests − cache write price × cached tokens × write frequency × requests
Calculator
Split a stable prefix from dynamic tokens, set your expected cache hit rate, and see how much prompt caching cuts from the bill—including Anthropic-style cache writes on misses.
Cache savings
$652.5028.1% lower
37,500 hits · 12,500 misses on Claude Sonnet 4.5
Scenario
Tune prefix size and hit rate to see live savings.
Insights
Hit-rate slider drives the savings share vs full-price billing.
Above break-even by 53 pts (need ≥22% hits to cover write premium).
Prompt-cache savings depend on provider rules (TTL, minimum prefix size, and whether writes are billed). Planning figures only. Updated 2026-07-31. Approximate static list prices for planning only. Always verify against each provider’s official pricing page before production budgeting.
Guide
Quantify savings from prompt caching based on cache hit rate, cache write cost, and reduced cache read pricing. Providers charge a premium to write tokens into cache but discount subsequent reads—high hit rates on stable prefixes can cut input spend significantly. Model your workload before assuming caching is always net positive.
Net cache savings = (full input price − cache read price) × cached tokens × hit rate × requests − cache write price × cached tokens × write frequency × requests
Prompt caching can be the largest input-cost lever for RAG and agent apps, but write premiums and low hit rates can make it a net loss. Quantifying read savings minus write cost prevents adopting caching without economic justification.
It depends on write vs read price delta and cache size. Generally hit rates above 60–70% on large stable prefixes show strong savings. Run your numbers here with conservative assumptions.
No. CentsPerToken uses approximate list prices for planning. Cache pricing, TTL rules, and eligibility change—verify on your provider's documentation.
No. Support varies by model and provider. Confirm eligibility before modeling savings for a specific model.
No. Cache discounts apply to cached input token reads. Output tokens are billed at standard output rates.