Prompt Caching Savings Calculator

See how much prompt caching saves on your monthly LLM API bill. Enter the repeated prefix, the fresh input, the output, your request volume and your cache hit rate.

Updated November 19, 2026

Prompt caching savings

5-minute cache: writes cost 1.25x the input price, reads 0.1x. Prices updated November 18, 2026.

Share of requests that find the prefix already cached. Steady traffic within the cache lifetime is often 80 to 95%.

System prompt, tools, documents or examples that repeat exactly.

The part that changes each time, such as the user message.

Without caching
$2,400.00
per month
With caching
$830.00
per month
You save
$1,570.00
per month
Saving
65.4%
of the total bill

With a 25% write premium, caching only pays off above a 21.7% hit rate.

The cached prefix alone costs $2,000.00 without caching and $430.00 with it.

Estimate only. Ignores cache storage fees, minimum cacheable prompt sizes and cache expiry beyond what your hit rate captures. Check your provider's pricing page before budgeting.

How prompt caching is billed

Prompt caching lets the provider reuse the processed form of a long, repeated prompt prefix, such as a system prompt, tool definitions or a reference document. Cache hits are billed at a fraction of the normal input price (about 10% for the models listed here). Some providers also charge a premium to write the prefix to the cache; Anthropic's 5-minute cache costs 1.25× the input price for writes.

How to use it

  1. Pick a model. Prices come from the same table as the LLM cost calculator, so the two pages always agree.
  2. Enter the tokens in the repeated prefix and the tokens that change on each request, plus the output length.
  3. Enter requests per month and your expected cache hit rate.

Formula

Cost per request = (uncached input × input price + output × output price + prefix × input price × cache factor) ÷ 1,000,000, where cache factor = hit rate × read multiplier + (1 − hit rate) × write multiplier. Without caching the factor is 1.

Worked examples

  • Claude Sonnet 5.5 ($2 in, $10 out per 1M), 10,000-token prefix, 500 new input tokens, 300 output tokens, 100,000 requests, 90% hit rate: without caching $2,400; with caching the prefix factor is 0.9 × 0.1 + 0.1 × 1.25 = 0.215, so the bill is $830, saving $1,570 (65.4%).
  • The same workload with a 0% hit rate costs $2,900, which is $500 more than not caching, because every request pays the 1.25× write price. Break-even is a hit rate of 0.25 ÷ 1.15 = 21.7%.

Counting tokens first? Use the AI tokens calculator.

Get this free widget for your site

Show what prompt caching saves on an LLM API bill from prefix size, hit rate and monthly requests. Free to use; the snippet includes a "Powered by MyFreeToolkit" link back to this tool.

See all free widgets.

See also

Frequently Asked Questions (FAQ)

How much does prompt caching save?

It depends on how much of each request is a repeated prefix and how often it hits the cache. With a 10,000-token prefix, 500 new tokens and a 90% hit rate on Claude Sonnet 5.5, caching cuts the input and output bill by about 65%. Short prefixes save little because the changing part and the output dominate.

What is a good cache hit rate?

Steady traffic that reuses the same prefix within the cache lifetime (5 minutes for Anthropic's default cache) often reaches 80 to 95%. Bursty or low-volume traffic can fall under 50%, because the cache expires between requests.

Can caching make my bill higher?

Yes, on providers that charge a premium to write the cache. Anthropic charges 1.25× the input price for 5-minute cache writes, so a very low hit rate costs more than no caching. The calculator shows the break-even hit rate (about 22% with the default prices).

Do OpenAI and Google charge to write the cache?

Their automatic caching has no write premium, so you only pay the normal input price on a miss and a reduced price on a hit. Google's explicit caches also charge a storage fee per hour, which this calculator does not model.

What must stay identical for a cache hit?

The prefix must match exactly, token for token, from the start of the prompt. Put static content first (system prompt, tools, documents) and variable content last. Providers also require a minimum prefix length, often 1,024 tokens or more.

Where do the prices come from?

From the same price table as the LLM cost calculator, with the cache multipliers from each provider's pricing page. Prices change often, so check the provider before budgeting.