DevKits

Prompt Cache Savings Calculator (OpenAI, Anthropic, DeepSeek)

See how much prompt caching saves you. Enter your cached prefix size, per-request tokens, volume, and hit rate to compare cost with and without caching across models that support it. 100% local.

Last updated:

Comments

Enter your cached prefix size, per-request tokens, request volume, and expected cache hit rate to see the cost with and without prompt caching — and exactly how many dollars caching saves. Runs locally.

Cost without caching

$175.00

Cost with caching

$95.80

You save

$79.20 (45.3%)

Cached-input rate for Claude 3 Haiku: $0.03/1M vs $0.25/1M standard. The cached prefix (system prompt, few-shot, fixed documents) is charged at the cache-read rate on hits. All math runs in your browser.

What is Prompt Cache Calculator?

Prompt caching is one of the biggest cost levers in LLM apps. Providers let you cache a repeated prompt prefix — a long system prompt, few-shot examples, or a fixed document — so that on subsequent requests those tokens are billed at a steeply discounted cache-read rate (often around 10% of the normal input price) instead of full price every time. The savings depend on how large the cached prefix is relative to the fresh per-request tokens, and on your cache hit rate. This calculator models all of that against each model's real cached-input price so you can see whether restructuring your prompt to be cache-friendly is worth it.

How to estimate caching savings

  1. 1Pick a model that supports prompt caching.
  2. 2Enter the cached prefix size and the fresh / output tokens per request.
  3. 3Set your request volume and expected cache hit rate.
  4. 4Compare the cost with and without caching.

Key Concepts

Cache hit rate
Share of requests that reuse the cached prefix rather than re-paying full price.
Cached-input rate
The discounted per-token price charged on a cache hit. Compare across models.

Frequently Asked Questions

What is prompt caching?

Providers cache a repeated prompt prefix (system prompt, few-shot examples, fixed documents) so subsequent requests that reuse it are billed at a much lower cache-read rate — often 10% of the normal input price.

What hit rate should I assume?

The first request always misses (it writes the cache). In steady state with a stable prefix, hit rates of 80–95% are common. Lower it if your traffic is bursty and the cache expires between requests.

Which models support it?

The dropdown only lists models with a published cached-input rate in our daily-refreshed pricing data — currently several OpenAI, Anthropic, and DeepSeek models.

Try Next

Text Chunker

Split long text into overlapping chunks for embedding and RAG pipelines. Preview recursive, paragraph, sentence, or fixed strategies with live token counts. Runs 100% in your browser.

Related Tools

Reference & Guides