Prompt Caching Savings Calculator

Calculate how much you save with Anthropic, OpenAI, and Google prompt caching. Includes TTL warning — the most common mistake is enabling caching on calls that arrive slower than the TTL.

Prompt Caching Calculator
Model
Prompt Configuration
Caching is worth it at 20 calls. Break-even at 2 calls.
Without caching
$0.7000
With caching
$0.2788
Savings (60%)
$0.4213
Break-even at N calls
2
TTLWrite costTotal (20 calls)vs uncached
5 minutes (1.25×)$0.0313$0.278860.2%
1 hour (2.0×)$0.0500$0.297557.5%

Prices verified 2026-08-20 · Methodology · Prompt caching guide

How to Use

Set your cacheable prefix

Enter the tokens in your stable prefix — system prompt, document context, few-shot examples. This is what gets cached.

Set variable and output tokens

Variable tokens change every call (user message, query). Output tokens are your model's response. Neither is cached.

Set call frequency

How many calls happen within one cache lifetime, and how many seconds between them? If your TTL expires between calls, caching costs more — not less.

See the savings

The calculator shows cost with/without caching, your break-even call count, and a red warning if your call gap exceeds the TTL.

Prompt caching break-even formula

Caching pays off when the read savings outweigh the write premium:

Uncached (n calls):
  Cost = n·(C+V)/1M·P_in + n·O/1M·P_out

Cached (n calls, Anthropic):
  Cost = C/1M·P_write + (n−1)·C/1M·P_read
       + n·V/1M·P_in + n·O/1M·P_out

Break-even call count:
  n* = (P_write − P_read) / (P_in − P_read)

Anthropic 5m TTL: n* ≈ 1.28  → pays off from 2nd call
Anthropic 1h TTL: n* ≈ 2.11  → pays off from 3rd call

⚠️ TTL expiry warning: if your calls arrive slower than the TTL, every call pays the write premium with no subsequent reads — making caching more expensive than not caching. The calculator detects this and warns you.

How to Cut This Cost

Up to 90%

Cache your system prompt and static documents. On Anthropic, cached reads cost 10% of full input price — 90% savings on every repeat call.

Up to 50%

Use Batch API for non-realtime jobs. Combine with caching for a compounding discount on large document workloads.

Up to 40%

Choose 1-hour TTL over 5-minute TTL for workflows where calls arrive every 10–60 minutes. Higher write cost but fewer cache misses.

Up to 70%

Move static few-shot examples to the front of your prompt so they fall within the cacheable prefix.

FAQ

Have more questions? Contact us