# Prompt Caching Savings: The Real Numbers

> What prompt caching actually saves on coding agents: cache reads at 10% of input, the cache-write premium, real production reductions of 59–70%, and why a stable prefix is the whole game — all from primary sources.

Source: https://tokenade.net/en/stats/prompt-caching-savings-data · Updated: 2026-10-16

Prompt caching is the single highest-leverage cost lever on a coding agent, and the headline number is simple: a cache-read token on Anthropic costs **10% of a fresh input token** — a 90% discount on whatever context you re-send unchanged. <a href="#source-1" className="text-blue-600 hover:underline">[1]</a> This page collects the real caching numbers — discount rates, the write premium, breakeven math, and the production reductions teams have actually published — from primary sources, so they sit in one place.

All figures are quoted as of June 2026. Caching mechanics and multipliers change (Anthropic quietly changed a default TTL mid-March 2026 — more on that below), so re-verify at the primary source before quoting commercially.

## Key Takeaways

<div className="my-8 p-6 bg-amber-50 border-l-4 border-amber-500 rounded-r-lg">
  <h3 className="text-lg font-bold text-amber-800 mb-4">Key numbers at a glance</h3>
  <ul className="space-y-3">
    <li className="flex items-start gap-2">
      <span className="text-amber-600 font-bold">•</span>
      <span>A cache read costs <strong>10% of base input</strong> on Anthropic — a 90% discount on repeated context. <a href="#source-1" className="text-blue-600 hover:underline">[1]</a></span>
    </li>
    <li className="flex items-start gap-2">
      <span className="text-amber-600 font-bold">•</span>
      <span>Cache writes carry a <strong>1.25× premium for a 5-minute TTL</strong> and <strong>2× for a 1-hour TTL</strong>; the write pays for itself after one re-read (5-min) or two re-reads (1-hour). <a href="#source-1" className="text-blue-600 hover:underline">[1]</a></span>
    </li>
    <li className="flex items-start gap-2">
      <span className="text-amber-600 font-bold">•</span>
      <span>ProjectDiscovery's agentic security system cut LLM costs by <strong>59%</strong> with caching, rising to <strong>70%</strong> after tuning. <a href="#source-2" className="text-blue-600 hover:underline">[2]</a></span>
    </li>
    <li className="flex items-start gap-2">
      <span className="text-amber-600 font-bold">•</span>
      <span>GitHub reached a <strong>93%+ cache hit rate</strong> in production agentic workflows by keeping prompts and tool definitions byte-stable. <a href="#source-3" className="text-blue-600 hover:underline">[3]</a></span>
    </li>
    <li className="flex items-start gap-2">
      <span className="text-amber-600 font-bold">•</span>
      <span>OpenAI gives GPT-5-class models a <strong>90% discount</strong> on cached input automatically, but only once a prompt crosses <strong>1,024 tokens</strong>. <a href="#source-4" className="text-blue-600 hover:underline">[4]</a></span>
    </li>
    <li className="flex items-start gap-2">
      <span className="text-amber-600 font-bold">•</span>
      <span>The discount is worthless if the prefix isn't byte-identical — a single reordered instruction invalidates the whole cache. <a href="#source-1" className="text-blue-600 hover:underline">[1]</a></span>
    </li>
  </ul>
</div>

## What does a cache read actually cost on Anthropic?

A cache-read token is billed at **10% of the base input price** on Anthropic's prompt caching — so on Claude Sonnet 5 ($2.00/MTok input) a cache hit costs $0.20/MTok, and on Claude Opus 4.8 ($5.00/MTok input) it costs $0.50/MTok. <a href="#source-1" className="text-blue-600 hover:underline">[1]</a> That is a 90% discount on every token the model re-reads from a cached prefix instead of reprocessing it.

This is the number that matters because of how agents actually run. An agent re-reads its full context — system prompt, tool definitions, conversation history, file contents, command output — on every single tool call. By turn 30 of a debugging session it is paying to re-read tens of thousands of tokens of accumulated history on every request. Caching is what turns that re-read from full price into a tenth of the price. For the underlying mechanics, the [prompt caching](https://tokenade.net/en/glossary/prompt-caching) and [context window](https://tokenade.net/en/glossary/context-window) glossary entries cover the accumulation pattern that makes this worth so much.

<div className="my-8 overflow-x-auto">
  <table className="min-w-full border-collapse border border-gray-300">
    <thead>
      <tr className="bg-gray-100">
        <th className="border border-gray-300 px-4 py-3 text-left font-semibold">Model</th>
        <th className="border border-gray-300 px-4 py-3 text-center font-semibold">Base input ($/MTok)</th>
        <th className="border border-gray-300 px-4 py-3 text-center font-semibold">Cache read ($/MTok)</th>
        <th className="border border-gray-300 px-4 py-3 text-center font-semibold">5-min write ($/MTok)</th>
        <th className="border border-gray-300 px-4 py-3 text-center font-semibold">1-hour write ($/MTok)</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td className="border border-gray-300 px-4 py-2 font-medium">Claude Opus 4.8</td>
        <td className="border border-gray-300 px-4 py-2 text-center">$5.00</td>
        <td className="border border-gray-300 px-4 py-2 text-center">$0.50</td>
        <td className="border border-gray-300 px-4 py-2 text-center">$6.25</td>
        <td className="border border-gray-300 px-4 py-2 text-center">$10.00</td>
      </tr>
      <tr className="bg-gray-50">
        <td className="border border-gray-300 px-4 py-2 font-medium">Claude Sonnet 5</td>
        <td className="border border-gray-300 px-4 py-2 text-center">$2.00</td>
        <td className="border border-gray-300 px-4 py-2 text-center">$0.20</td>
        <td className="border border-gray-300 px-4 py-2 text-center">$2.50</td>
        <td className="border border-gray-300 px-4 py-2 text-center">$4.00</td>
      </tr>
      <tr>
        <td className="border border-gray-300 px-4 py-2 font-medium">Claude Haiku 4.5</td>
        <td className="border border-gray-300 px-4 py-2 text-center">$1.00</td>
        <td className="border border-gray-300 px-4 py-2 text-center">$0.10</td>
        <td className="border border-gray-300 px-4 py-2 text-center">$1.25</td>
        <td className="border border-gray-300 px-4 py-2 text-center">$2.00</td>
      </tr>
    </tbody>
  </table>
  <p className="text-xs text-gray-500 mt-2">Cache read = 0.1× base input; 5-min write = 1.25× base input; 1-hour write = 2× base input. Source: Anthropic, Prompt Caching docs (platform.claude.com, June 2026) <a href="#source-1" className="text-blue-600 hover:underline">[1]</a></p>
</div>

## What is the cache-write premium, and when does it pay off?

Writing to the cache is not free: a cache-write token costs **1.25× the base input price for a 5-minute TTL and 2× for a 1-hour TTL** on Anthropic. <a href="#source-1" className="text-blue-600 hover:underline">[1]</a> You pay that premium once, when the prefix is first cached, and then read it back at 10% of base for as long as it stays warm.

The breakeven is generous. With the 5-minute cache, a single re-read already beats paying full input price twice. With the 1-hour cache, two re-reads cover the 2× write. Concretely, for a stable 10,000-token prefix (system prompt plus tool definitions) on Sonnet 5 across a 50-turn session:

- **Without caching:** 10,000 × 50 × $3 / 1,000,000 = **$1.50** for that static block alone.
- **With caching (1 write + 49 reads, 5-min TTL):** (10,000 × 1.25 × $3 / 1,000,000) + (10,000 × 49 × $0.30 / 1,000,000) = $0.038 + $0.147 = **$0.185** — roughly an 88% reduction on that block.

The arithmetic is boring on purpose. The point is that the write premium is a rounding error against the read savings the moment a prefix is reused even a handful of times, which is exactly what an agentic loop does.

## How much do real teams actually save?

ProjectDiscovery, who run an agentic security system called Neo, published the cleanest production number I've seen: caching cut their LLM costs by **59%**, climbing to **66%** after further optimisation and **70%** over their last measured ten days. <a href="#source-2" className="text-blue-600 hover:underline">[2]</a> Their setup is a textbook case for caching — system prompts over 20,000 tokens of YAML per agent, an average of 26 steps and 40 tool calls per task, and the entire conversation re-sent on every step. A single complex Opus task burned 60 million tokens before they touched caching. <a href="#source-2" className="text-blue-600 hover:underline">[2]</a>

GitHub's measured result is about hit rate rather than dollars: they hit a **93%+ cache hit rate** on repeated context in their own agentic workflows by keeping tool definitions and system prompts stable across turns. <a href="#source-3" className="text-blue-600 hover:underline">[3]</a> That is the upstream metric — your dollar savings are roughly the hit rate times the 90% per-token discount on the cached portion of your prompt.

<div className="my-6 grid grid-cols-1 md:grid-cols-2 gap-4">
  <div className="p-6 bg-gradient-to-br from-green-50 to-green-100 rounded-lg border border-green-200 text-center">
    <div className="text-4xl font-bold text-green-700">59–70%</div>
    <div className="text-sm text-green-700 mt-2">total LLM cost cut on a production agentic system with caching</div>
    <div className="text-xs text-gray-500 mt-2">Source: ProjectDiscovery, 2026 <a href="#source-2" className="text-blue-600 hover:underline">[2]</a></div>
  </div>
  <div className="p-6 bg-gradient-to-br from-blue-50 to-blue-100 rounded-lg border border-blue-200 text-center">
    <div className="text-4xl font-bold text-blue-700">93%+</div>
    <div className="text-sm text-blue-600 mt-2">cache hit rate on repeated context with byte-stable prompts</div>
    <div className="text-xs text-gray-500 mt-2">Source: GitHub, 2026 <a href="#source-3" className="text-blue-600 hover:underline">[3]</a></div>
  </div>
</div>

A blunt caveat on the 59–70% figure: it is a percentage of *what they were already spending*, on a workload that is unusually cache-friendly (huge stable prefix, dozens of re-reads). Your mileage scales with how much of your prompt is genuinely identical turn-to-turn. The savings live in the stable prefix, not in the headline percentage.

## How does OpenAI's caching compare?

OpenAI caches **automatically** — no `cache_control` breakpoint, no code change — and for GPT-5-class models the cached portion of the prompt is billed at **10% of input, a 90% discount**, the same magnitude as Anthropic. <a href="#source-4" className="text-blue-600 hover:underline">[4]</a> The structural differences matter more than the rate:

- **Minimum length:** OpenAI caching only engages once a prompt crosses **1,024 tokens**; below that, nothing is cached and `cached_tokens` reports zero. <a href="#source-4" className="text-blue-600 hover:underline">[4]</a> Anthropic similarly enforces a minimum cacheable prefix (1,024 tokens on most current models, 2,048 on the smallest).
- **No write premium:** OpenAI charges nothing extra to populate the cache, whereas Anthropic charges the 1.25×/2× write. The flip side is control — Anthropic lets you decide exactly where the cache boundary sits, which is what makes a 93%+ hit rate achievable on purpose rather than by luck.
- **Discount varies by model:** OpenAI's cached-input discount is 50%, 75%, or 90% depending on the model; GPT-5-class lands at 90%. <a href="#source-4" className="text-blue-600 hover:underline">[4]</a> Don't assume the top discount on an older or smaller model.

<div className="my-8 overflow-x-auto">
  <table className="min-w-full border-collapse border border-gray-300">
    <thead>
      <tr className="bg-gray-100">
        <th className="border border-gray-300 px-4 py-3 text-left font-semibold">Provider</th>
        <th className="border border-gray-300 px-4 py-3 text-center font-semibold">Cache read discount</th>
        <th className="border border-gray-300 px-4 py-3 text-center font-semibold">Write premium</th>
        <th className="border border-gray-300 px-4 py-3 text-center font-semibold">Activation</th>
        <th className="border border-gray-300 px-4 py-3 text-center font-semibold">Min. prefix</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td className="border border-gray-300 px-4 py-2 font-medium">Anthropic (Claude)</td>
        <td className="border border-gray-300 px-4 py-2 text-center">−90% (10% of input)</td>
        <td className="border border-gray-300 px-4 py-2 text-center">1.25× (5-min) / 2× (1-hour)</td>
        <td className="border border-gray-300 px-4 py-2 text-center">explicit cache_control</td>
        <td className="border border-gray-300 px-4 py-2 text-center">1,024 tokens</td>
      </tr>
      <tr className="bg-gray-50">
        <td className="border border-gray-300 px-4 py-2 font-medium">OpenAI (GPT-5.5)</td>
        <td className="border border-gray-300 px-4 py-2 text-center">−90% (10% of input)</td>
        <td className="border border-gray-300 px-4 py-2 text-center">none</td>
        <td className="border border-gray-300 px-4 py-2 text-center">automatic</td>
        <td className="border border-gray-300 px-4 py-2 text-center">1,024 tokens</td>
      </tr>
    </tbody>
  </table>
  <p className="text-xs text-gray-500 mt-2">GPT-5.5 base pricing is $5/$30 per MTok input/output; cached input bills at 10% of input on GPT-5-class models. Sources: Anthropic <a href="#source-1" className="text-blue-600 hover:underline">[1]</a>, OpenAI <a href="#source-4" className="text-blue-600 hover:underline">[4]</a> (June 2026).</p>
</div>

## Why does a byte-identical prefix decide everything?

The discount is gated on an exact prefix match: the cached block must be **byte-identical across requests**, and any change — even reordering instructions or appending a token before the cached region — invalidates the cache and forces a full-price reprocess. <a href="#source-1" className="text-blue-600 hover:underline">[1]</a> This is the part teams get wrong. A timestamp in the system prompt, a per-request user ID injected near the top, a tool list that re-sorts itself — each one silently drops your hit rate to zero and you keep paying full input price while believing caching is on.

It also breaks in ways you don't control. In March 2026 Anthropic changed a default cache TTL behaviour from one hour to five minutes, and a wave of Claude Code users saw cost and quota inflation before anyone identified the cause. <a href="#source-5" className="text-blue-600 hover:underline">[5]</a> The lesson isn't "caching is unreliable" — it's that caching is a measurement problem as much as a configuration one. If you aren't watching your cache-read-to-input ratio, you won't notice when it regresses.

This is exactly the bookkeeping I built [Tokenade](https://tokenade.net/en) to handle: it keeps the cacheable prefix stable across an agent's turns, prunes the volatile context that would otherwise bust the cache, and opens a local report of the savings with `tokenade dashboard`, so a TTL change or a stray timestamp shows up in your own numbers instead of as a surprise on the invoice. It plugs into Claude Code, Cursor, Codex, Copilot, and Windsurf, and the compaction runs entirely on your own machine. It's free and open source (MIT/Apache-2.0), with no cap.

For the broader cost picture these savings sit inside, see [AI coding agent token costs](https://tokenade.net/en/stats/ai-coding-agent-token-costs) and the practical [reduce AI coding agent token usage](https://tokenade.net/en/articles/reduce-ai-coding-agent-token-usage) playbook. The [output filtering](https://tokenade.net/en/glossary/output-filtering) entry covers the complementary lever on what the model writes back.

## Source notes

Cache-read, cache-write multipliers and the byte-identical-prefix requirement are from Anthropic's prompt caching documentation (primary source). OpenAI's automatic caching, 90% GPT-5-class discount, and 1,024-token minimum are from OpenAI's prompt caching docs (primary source). The 59–70% reduction is a published vendor engineering case study (ProjectDiscovery — production data, not an academic study). The 93%+ cache hit rate is from GitHub's engineering blog. The March 2026 TTL change is documented in a public Claude Code issue (secondary/community source, included because it illustrates a real regression, not as a pricing figure). Re-verify all figures at primary sources before commercial use.

<div className="my-8 p-6 bg-gray-50 rounded-lg" id="sources">
  <h2 className="text-xl font-bold mb-4">Sources and references</h2>
  <ol className="space-y-3 text-sm">
    <li className="flex gap-2" id="source-1">
      <span className="font-semibold text-gray-500">[1]</span>
      <span>Anthropic. "Prompt caching — Claude API Docs". platform.claude.com, 2026. <a href="https://platform.claude.com/docs/en/build-with-claude/prompt-caching" className="text-blue-600 hover:underline ml-1" target="_blank" rel="noopener noreferrer">Link ↗</a></span>
    </li>
    <li className="flex gap-2" id="source-2">
      <span className="font-semibold text-gray-500">[2]</span>
      <span>ProjectDiscovery. "How We Cut LLM Costs by 59% With Prompt Caching". projectdiscovery.io, 2026. <a href="https://projectdiscovery.io/blog/how-we-cut-llm-cost-with-prompt-caching" className="text-blue-600 hover:underline ml-1" target="_blank" rel="noopener noreferrer">Link ↗</a></span>
    </li>
    <li className="flex gap-2" id="source-3">
      <span className="font-semibold text-gray-500">[3]</span>
      <span>GitHub. "Improving token efficiency in GitHub Agentic Workflows". github.blog, 2026. <a href="https://github.blog/ai-and-ml/github-copilot/improving-token-efficiency-in-github-agentic-workflows/" className="text-blue-600 hover:underline ml-1" target="_blank" rel="noopener noreferrer">Link ↗</a></span>
    </li>
    <li className="flex gap-2" id="source-4">
      <span className="font-semibold text-gray-500">[4]</span>
      <span>OpenAI. "Prompt caching — OpenAI API". developers.openai.com, 2026. <a href="https://developers.openai.com/api/docs/guides/prompt-caching" className="text-blue-600 hover:underline ml-1" target="_blank" rel="noopener noreferrer">Link ↗</a></span>
    </li>
    <li className="flex gap-2" id="source-5">
      <span className="font-semibold text-gray-500">[5]</span>
      <span>anthropics/claude-code. "Cache TTL silently regressed from 1h to 5m around early March 2026". GitHub issue #46829, 2026. <a href="https://github.com/anthropics/claude-code/issues/46829" className="text-blue-600 hover:underline ml-1" target="_blank" rel="noopener noreferrer">Link ↗</a></span>
    </li>
  </ol>
</div>
