Skip to content
Calc.

Prompt Caching Savings Calculator

Estimate what prompt caching saves on a repeated prompt prefix: cache-write premium, cache-read discount and the number of requests, with the break-even point, for Claude, GPT and Gemini.

Last updated: October 2026

Saved by caching the prefix

$93.80

Formula below · 3 sources (platform.claude.com, developers.openai.com, ai.google.dev) · Updated Oct 2026

Compare with similar

About this calculator

Prompt caching stores the processed form of a prompt prefix (a long system prompt, a document, tool definitions, earlier conversation) so later requests that start with exactly the same tokens read it at a discount. The first request, and any request after the cache has expired, writes it, usually at a premium:

without caching = prefix tokens × requests × input price with caching = prefix tokens × input price × (writes × write % + (requests − writes) × read %)

Rates as of October 2026 (multiples of the base input price): - Anthropic Claude: 5-minute cache write 1.25×, 1-hour write 2×; reads 0.1× on most models, 0.05× on Claude Opus 5.5 and Sonnet 5.5, 0.025× on Claude Fable 5.1. You mark what to cache. - OpenAI GPT-6 models: cached input 0.1× on GPT-6 Astra and GPT-6 Luna, 0.05× on GPT-6.1 Sol; cache writes 1.25×. - Google Gemini: cached tokens at 0.1× on most models (0.05× on Gemini 4 Argon, which supports implicit caching only); explicit caches also pay an hourly storage fee, not included here.

Break-even: caching pays as soon as the reads per write exceed (write % − 100) ÷ (100 − read %); at 1.25× write and 0.1× read that is 0.28, so one cache hit already saves money. Only the cached prefix is priced here: the rest of the prompt and the output cost the same either way. Caches expire after minutes of inactivity unless refreshed, so bursty traffic needs more writes.

How to use

Enter the prefix length, how many requests reuse it, how many times it is written (once plus once per expiry), the model’s base input price and its cache read and write percentages from the list in the explanation. Example (the defaults): Claude Sonnet 5.5 ($2 per 1M input, reads 5%, 5-minute writes 125%), a 50,000-token prefix used by 1,000 requests and written 10 times. Without caching: 50,000 × 1,000 × $2 ÷ 1M = $100.00. With caching: 50,000 × $2 ÷ 1M × (10 × 1.25 + 990 × 0.05) = $0.10 × 62 = $6.20. Saved $93.80 (93.8%). Example 2: GPT-6 Astra ($10, cached 10%, writes 125%) with the same traffic: without $500.00, with $0.50 × (12.5 + 99) = $55.75, saved $444.25. Example 3: if every request writes the cache (10 requests, 10 writes), caching costs 25% more: −$0.25 on the default prices.

Frequently asked questions

When does prompt caching pay off?

When a long prefix is reused before the cache expires. With a 1.25× write and 0.1× read, the first cache hit already more than covers the write premium. With a 2× (1-hour) write it takes 1.1 reads, so two hits.

What can be cached?

An identical prefix of the prompt: system prompt, tool definitions, long documents or examples, and the earlier turns of a conversation. Anything that changes between requests (the user’s new question) should come after the cached part, because a single changed token before it breaks the match.

How long does a cache last?

Anthropic offers a 5-minute cache (refreshed each time it is read) and a 1-hour option at a higher write price. OpenAI and Gemini implicit caches are cleared after a period of inactivity; Gemini’s explicit caches last for a time-to-live you set and are billed for storage per hour.

How current are the prices?

They are the standard list prices on the OpenAI, Anthropic and Google pricing pages as of October 2026 (checked 17 October 2026), before taxes, volume discounts or regional surcharges. Google has announced increases for Gemini 4 Argon (from December 1, 2026) and Gemini 3.8 Flash (from January 1, 2027); both prices are in the list. Providers change prices often, so confirm on the official pricing page before you commit a budget.

Related calculators

Sources & references

Think a result is wrong? Report a problem with this calculator.