Skip to content
Effloow
Effloow / Tools / Prompt Cache Savings Calculator
Tool Forge Free

Prompt Cache Savings Calculator

Prompt caching is sold as a discount, but a cache miss can cost more than an ordinary call. Model your traffic shape against the cache TTL to see which side of the break-even you land on.

Start from a workload

Your workload

the unchanging part of every prompt

Never cached. Billed at full input price.

9

Window the traffic is spread across.

Idle window before the entry expires.

Pricing (per 1M tokens)

Set cache write equal to the input price if your provider does not bill writes separately. Output tokens are excluded: caching does not discount them.

Below this, caching never engages. Set 0 to disable the check.

Verdict

Monthly prompt cost

Without caching
With caching
Difference

Why

Average gap between calls
Effective hit rate
Break-even hit rate
Cache writes / day

Cost across hit rates

Your prices and prefix, swept across hit rates. The row where caching stops paying is highlighted.

Hit rate Monthly with caching Vs no caching

The break-even hit rate

Where a provider charges a premium to write an entry into the cache, a miss costs more than an ordinary uncached call. Caching only pays once hits are frequent enough to outweigh those writes. Setting cached cost equal to uncached cost and solving for the hit rate h gives:

h* = (write price − input price) ÷ (write price − cached read price)

Two consequences worth internalising. If writes are billed at the ordinary input rate, h* = 0 and any hit at all is free money. If writes carry a premium, there is a floor below which caching is a net cost, and a low-traffic service can quietly land under it.

The calculator marks that floor against your derived hit rate so the comparison is against your own traffic, not a vendor's best case.

A useful sanity check on the formula: Anthropic's pricing page states that caching pays back after one cache read on the 5-minute window, and after two reads on the 1-hour window. Feeding their published multipliers into the equation reproduces exactly that. A 1.25× write against a 0.1× read puts the floor at 21.7%, which two calls (one write, one read) clear at 50%. A 2× write puts it at 52.6%, which two calls miss and three calls clear at 66.7%.

Why traffic shape decides this, not prompt design

A cache entry expires after an idle window. If the average gap between two calls sharing a prefix is longer than that window, the entry is gone before the next call arrives, so every call is a miss no matter how carefully the prefix was constructed. This is why the same feature produces opposite outcomes for two teams running identical prompts.

The derived mode models this directly: it spreads your daily requests across your active window, compares the resulting gap to the TTL, and treats the cache as warm only when the gap fits inside it. When it does not, the hit rate collapses and the write premium applies to every call.

Methodology

  • Cost without caching = requests × (prefix + dynamic) × input price
  • Cost with caching = (writes × prefix × write price) + (hits × prefix × read price) + (requests × dynamic × input price)
  • Average gap = active hours ÷ requests per day
  • Derived hit rate = (requests − 1) ÷ requests when the gap fits inside the TTL, otherwise 0
  • Monthly = daily × 30

Dynamic tokens are always billed at full input price. Output tokens are excluded entirely, because prompt caching discounts the reused input prefix and leaves completion billing untouched. The derived hit rate is a deliberately simple two-state model, warm or cold, which matches how a steady-traffic and a sparse-traffic workload actually behave; if you have a measured cached-token share from your provider, switch to manual and use it.

Prices are yours to supply. Any preset carries the source and the date it was checked. Vendor pricing and cache retention windows change, so confirm against the current official pricing page before you budget from these numbers.

When to use it, when to skip it

Worth caching

  • Steady traffic with gaps well under the TTL
  • A large shared prefix, comfortably over the minimum
  • A prefix that is genuinely byte-identical each call
  • Batched jobs you can group into a tight window

Skip or re-check

  • Sparse jobs spaced further apart than the TTL
  • Shared prefixes under the provider minimum
  • Prefixes carrying a timestamp or per-user field
  • Overnight or weekly runs that never reuse a warm entry

What Effloow added

Most caching calculators ask you for a hit rate, which is the number you least reliably know before you migrate. This one derives the hit rate from traffic shape and TTL, surfaces the break-even threshold explicitly, and warns when the shared prefix is too short for caching to engage at all.

The cost model was checked two ways before shipping. It reproduces the per-1,000-call arithmetic from our measured GPT-5.6 cache run, and its break-even formula independently reproduces the payback rule Anthropic publishes for its own 5-minute and 1-hour cache windows. Preset rates were read from each vendor's official pricing page on 2026-08-12 and carry that date in the tool; where a vendor does not publish a figure, such as Google's default cache TTL, the preset says so instead of guessing.

Measured background reading

We measure this stuff and publish what broke.

One short weekly dispatch on AI tooling costs, agent reliability, and what we actually ran. No spam, unsubscribe anytime.

Related reading

Find these tools useful?

Get one short weekly dispatch with new tools, guides, and what we tested. No spam, unsubscribe anytime.