Practical guide
How to Estimate Prompt Caching Savings from Cache Hits
Estimate GPT-5 prompt caching savings from reusable prefix tokens and observed cache-hit uses, with clear limits for misses and writes.
Updated · Sources checked
Count only eligible prefix tokens on hits
Prompt caching savings come from repeated input prefixes billed at a cached-input rate. The Prompt Cache Savings Calculator compares GPT-5 standard input cost with cached-input cost for the same prefix tokens across a stated number of cache-hit uses.
Suppose an assistant has a stable 8,000-token policy and tool-definition prefix. During a test day, 4,000 requests report a cache hit for that prefix. Enter 8000 cached prefix tokens and 4000 cache-hit uses. The result shows the cached-input charge and the modeled difference from billing all 32 million tokens at the standard input rate.
Do not enter total prompt tokens if the final messages change on every request. Variable conversation history and user text belong outside the cached prefix. Do not enter all requests as hits either; use the provider’s usage data to count confirmed hits.
Convert a sample into a monthly case
If a seven-day representative sample records 21,000 hits, you can model roughly 90,000 hits for a 30-day month, provided traffic and prompt versions remain stable. Run a lower case too: deployments, prefix edits, or low traffic can reduce reuse.
The tool deliberately excludes cache eligibility rules, writes, misses, eviction, storage, output tokens, taxes, and discounts. Its result is potential input-token savings after a hit has occurred, not a promise that a prefix will be cached.
FAQ
What is a cache-hit use?
It is a request where the provider reports that the reusable prefix was served at the cached-input rate. A repeated request is not automatically a hit.
Does the calculator include cache-write cost?
No. It compares standard and cached GPT-5 input charges on hit tokens. Add any provider-specific write or storage charge separately.
Official sources
- https://developers.openai.com/api/docs/models/gpt-5
- https://developers.openai.com/api/docs/guides/prompt-caching