Guide · 2 min read · Updated

Prompt caching: the maths, with current prices

Prompt caching is the biggest discount most AI apps leave on the table. If every request starts with the same instructions, you can pay a fraction of the input price for that part. Here is how much that is, using list prices we checked on 15 October 2026.

The example

A support assistant with:

  • a 4,000-token fixed start: instructions, a few examples and a short product FAQ
  • a 500-token user message and recent chat
  • a 300-token answer
  • 1,000 requests a day, about 30,400 a month

So 4,000 of the 4,500 input tokens (89%) are the same every time.

Without and with caching

On Claude Sonnet 5.5 (input $2, output $10, cache read $0.10 per million tokens):

InputOutputTotal per month
No caching$273.60$91.20$364.80
Fixed start cached$42.56$91.20$133.76

Caching cuts the bill by about 63%. The whole saving is on input: the cached 4,000 tokens drop from $2 to $0.10 per million. Output doesn’t change.

GPT-6.1 Sol has the same list prices as Sonnet 5.5 for this example, so the numbers are identical. On cheaper models the same saving is smaller in dollars: on Claude Haiku 5.5 the bill goes from $18.24 to $7.30, and on Gemini 3.8 Flash from $136.80 to $54.72.

What writing to the cache costs

Some providers charge more than the normal input price the first time a prompt is cached. On Sonnet 5.5 a 5-minute cache write costs $2.50 per million instead of $2. So each write of our 4,000-token start costs $0.002 extra.

The standard cache lives for 5 minutes and every read refreshes it. At 1,000 requests a day it rarely goes cold, except overnight. Even 300 cold starts a month add only $0.60. One read already earns back the write premium: a write costs 25% more than normal input, and a read saves 95%.

Gemini works differently. Instead of a write premium it charges for storage per hour. On Gemini 3.1 Pro that is $4.50 per million tokens per hour, so keeping our 4,000 tokens cached around the clock would cost about $13 a month. That’s still worth it at this volume, but not for an app that gets a handful of requests a day.

When caching doesn’t help

  • Short prompts. If the fixed start is a few hundred tokens, there is little to save. Some providers also have a minimum cacheable length.
  • Low traffic. If requests are more than 5 minutes apart, you pay the write premium each time and rarely read.
  • Output-heavy apps. Code generation and long reports spend most of the bill on output, which caching doesn’t touch.
  • Prompts that change at the start. Put the date, the user’s name or anything else that varies after the fixed part, or the cache never matches.

Try it with your numbers

The AI app cost calculator has a cache-hit input. For the example above, set input tokens to 4,500 and cache hit to 89%. The agent cost estimator shows the effect on agents, where the fixed instructions are re-sent on every step and caching matters even more.

Questions

Does caching make output cheaper?

No. Caching only discounts input tokens that repeat. Output is billed in full, so in apps with long answers the saving is smaller.

How long does a cached prompt last?

On Anthropic's API the standard cache lasts 5 minutes and is refreshed each time it is read; a 1-hour cache costs more to write. Other providers use different lifetimes. Check the provider's caching docs for the model you use.

Do I have to change my prompts?

Put the parts that never change (instructions, examples, reference documents, tool definitions) first and the parts that change (the user's message) last. A cache only matches an identical start of the prompt.

Sources

  1. Pricing (Claude API) . Anthropic
  2. API pricing . OpenAI
  3. Gemini Developer API pricing . Google

Prices in this guide were checked on the date shown above and change often. Check each provider's pricing page before you commit.

Price Watch: AI and hosting price changes, once a month

One short email a month: which model and hosting prices changed, what that does to a typical small-app bill, and one update from our own ledger. Free, unsubscribe any time.

We'll email you once to confirm. See the privacy policy.