All free tools

Inference optimization

Prompt Caching Break-Even Calculator

Calculate whether cache writes, reads, misses, and invalidations make prompt caching worthwhile.

Your scenario

Adjust the assumptions. Results update instantly.

tokens

Stable system prompt, tools, examples, or document context.

tokens

Request-specific content that cannot be served from cache.

tokens

Average generated response per request.

requests

Average request volume during active periods.

hours

Hours during which the workload generates requests.

%

Share of requests that reuse a valid cached prefix.

×

Write cost relative to normal input pricing when provider data is unavailable.

×

Read cost relative to normal input pricing when provider data is unavailable.

Methodology

How this calculator works

1

Price the repeated prefix at normal input rates without caching.

2

Price hits at cache-read rates and misses at cache-write rates.

3

Compare both scenarios and calculate the minimum reads required per write.

What makes this useful

The result includes cache-write premiums and invalidation risk instead of assuming every repeated token is a hit.

Frequently asked questions

When is prompt caching worth it?

Caching is most valuable when a large, byte-stable prefix is reused several times before expiration or invalidation.

What causes a prompt-cache miss?

Changes near the beginning of the cached prefix, TTL expiration, provider routing, or unsupported request shapes can force a new cache write.

Do all models charge the same cache rates?

No. Read discounts, write premiums, minimum prefix sizes, and expiration rules vary by provider and model.

Continue your analysis

Prompt Caching Break-Even Calculator uses current model prices and your operating assumptions to estimate business impact. Treat the output as a planning model, then replace defaults with p50, p95, and p99 telemetry from your own product.

Related tools: All AI SaaS tools · LLM pricing database · Full margin simulator