Prompt Caching Cost Calculator: How Much Do You Actually Save?
A Claude cache write costs 25 to 100 percent more than a normal input token. A cache read costs 90 percent less. Below a certain hit rate, turning caching on costs you money instead of saving it. Set your model and traffic pattern below to see exactly where that line sits for you.
Updated 2026-07-15, by Jim Liu
TL;DR
- Claude cache writes cost 1.25x the standard input rate on the 5-minute TTL, or 2x on the 1-hour TTL. Cache reads cost 0.1x on either TTL, across every Claude model
- Because of that write premium, Claude caching only pays off above roughly a 22 percent hit rate on the 5-minute TTL, or 53 percent on the 1-hour TTL
- GPT-5.4 charges no premium on a cache miss, so its break-even hit rate is 0 percent. Enabling caching there can never cost more than leaving it off
- Output tokens are never discounted by caching on either provider. Only the reusable input prefix benefits
Prompt Caching Cost Calculator
Anthropic (cache write premium applies)
OpenAI (no cache write premium)
Standard rate: $3.00/M input, $15.00/M output. An introductory $2.00/$10.00 rate applies through 2026-08-31.
System prompt, tool schema, retrieved context, and history combined
Output tokens are never cached on either provider
The part of the prompt that stays byte-identical across requests: system prompt, tool definitions, a retrieved document. Not the part that changes every call.
Red zone: caching costs more than not caching at this model and TTL. Green zone: caching saves money. Drag the slider across the line and watch the headline number below flip.
Monthly savings with caching
$75.60 /mo
8.4% cheaper than not caching, at a 40% hit rate
Without caching
$900/mo
With caching
$824/mo
Based on 8K input tokens and 400 output tokens per request, 1,000 requests/day, 30-day month. Anthropic pricing as of the date shown below the title.
Try a preset workload
How Cache Write and Cache Read Pricing Work
Prompt caching stores a reusable prefix of your request, typically a system prompt, a tool schema, or a retrieved document, so that later requests with the same prefix do not have to be processed from scratch. Anthropic and OpenAI both structure the discount the same way in principle: a cache read costs about 10 percent of the standard input rate. Where they diverge is what happens on the first call, before anything is cached yet.
On Claude, that first call is a cache write, and it costs more than a normal uncached request: 1.25 times the standard input rate if you use the default 5-minute time-to-live, or 2 times the rate if you opt into the 1-hour time-to-live. You are paying a small premium up front in exchange for a much bigger discount on every call that reuses the same prefix while it is still warm. If nothing reuses it before it expires, you paid the premium for nothing.
On GPT-5.4, there is no separate write step to pay for. OpenAI applies caching automatically once a prompt prefix passes roughly 1,024 tokens, and a cache miss is billed at the same rate as an ordinary request. A hit still gets the same 90 percent discount as on Claude. The practical difference is that OpenAI caching has no downside case, while Claude caching does if your traffic does not reuse prefixes often enough.
- Data as of: 2026-07-15
- Cache read discount: 0.1x standard input rate on both providers
- Claude cache write: 1.25x (5 minute TTL) or 2x (1 hour TTL) standard input rate
- OpenAI cache write: same as standard input rate, no premium
- Output tokens: billed at the normal output rate regardless of caching, on both providers
The Break Even Hit Rate: When Caching Actually Saves Money
The break-even hit rate is the smallest fraction of your requests that has to hit a warm cache for caching to cost the same as not caching at all. Above that line, every extra point of hit rate is pure savings. Below it, caching is quietly making your bill worse, and there is usually no error message telling you that, only a monthly invoice that looks a little higher than it should.
The formula falls out of the two multipliers directly, and it does not depend on how many tokens are in the cached prefix or how many requests you send per day. For a write multiplier w and a read multiplier r, the break-even hit rate is (1 - w) / (r - w). Plugging in Claude's numbers, 1.25x write and 0.1x read on the 5-minute TTL, gives about 21.7 percent. On the 1-hour TTL, 2x write and the same 0.1x read, it rises to about 52.6 percent. For GPT-5.4, where the write multiplier is 1x, exactly the same as not caching, the break-even hit rate is 0 percent.
That last case is worth sitting with. A break-even of 0 percent means there is no hit rate low enough to make GPT-5.4 caching a net loss. Turning it on is close to a free option: every miss costs what an uncached request would have cost anyway, and every hit is a discount. Claude does not offer that same guarantee, which is why the hit-rate slider above matters more for Claude workloads than for GPT-5.4 ones.
Claude vs GPT-5.4 Prompt Caching: Same Discount, Different Risk
| Property | Claude (Anthropic) | GPT-5.4 (OpenAI) |
|---|---|---|
| Cache read discount | 0.1x standard input rate | 0.1x standard input rate |
| Cache write premium | 1.25x (5 min TTL) or 2x (1 hour TTL) | None, billed at standard rate |
| Break even hit rate | About 22% (5 min) or 53% (1 hour) | 0% |
| Opt-in | Manual, mark cacheable blocks with cache_control | Automatic above roughly 1,024 tokens |
| Best for | Steady, frequent traffic against the same prefix | Any traffic pattern, since there is no downside |
Neither provider's caching is free to build. You still have to structure requests so the reusable part of the prompt comes first, byte for byte identical every time. A single changed character anywhere in the cached prefix, a timestamp, an unsorted key order, a rotating request ID, invalidates the match and turns every call back into a miss, on either provider.
Related tools and guides on OpenAI Tools Hub
- Anthropic API pricing calculator for the full Claude bill, batch discounts included
- LLM API token cost calculator to compare per-token pricing across providers by input and output ratio
- Context window calculator to check whether your content fits in a single call before you plan a caching strategy
- Claude API pricing calculator for a Claude-only view of Haiku, Sonnet, and Opus pricing
Current Prompt Caching Prices by Model
| Model | Input | Output | Cache write (5m) | Cache read |
|---|---|---|---|---|
| Claude Haiku 4.5 | $1.00/M | $5.00/M | $1.250/M | $0.100/M |
| Claude Sonnet 5 | $3.00/M | $15.00/M | $3.750/M | $0.300/M |
| Claude Opus 4.8 | $5.00/M | $25.00/M | $6.250/M | $0.500/M |
| Claude Fable 5 | $10.00/M | $50.00/M | $12.500/M | $1.000/M |
| GPT-5.4 | $2.50/M | $15.00/M | $2.500/M (same as input) | $0.250/M |
| GPT-5.4-mini | $0.75/M | $4.50/M | $0.750/M (same as input) | $0.075/M |
| GPT-5.4-nano | $0.20/M | $1.25/M | $0.200/M (same as input) | $0.020/M |
Prices are per 1,000,000 tokens, standard tier, as of 2026-07-15. Claude Sonnet 5 carries an introductory rate of $2.00/M input and $10.00/M output through 2026-08-31; this table uses the standard post-introductory rate so the numbers stay accurate after that date. Verify current prices at anthropic.com/pricing and developers.openai.com/api/docs/pricing before budgeting.
Jim Liu
Builds and ships AI tooling, and writes token-budgeting and cost-optimization guidance for teams running production LLM pipelines. Publishes tools and analysis at OpenAI Tools Hub.
Frequently Asked Questions
Is prompt caching actually worth turning on?v
It depends on your cache hit rate, not just whether you reuse a prompt. On Claude, a cache write costs 1.25x the normal input rate (5-minute TTL) or 2x (1-hour TTL), so a single cache write followed by zero reads costs more than not caching at all. The math works out in your favor once your hit rate clears about 22% on the 5-minute TTL or 53% on the 1-hour TTL, regardless of how large the cached prefix is. Below that line you are paying a premium for a discount you rarely collect. On GPT-5.4, caching has no write premium, so it never costs more than leaving it off.
Why did my Claude API bill go up after I turned on caching?v
The most common cause is TTL churn: the default cache entry expires after 5 minutes of inactivity, and every expiration forces the next request to pay the full cache-write premium again. Bursty traffic with gaps longer than 5 minutes between calls can end up paying the write premium repeatedly with few or no matching reads in between, which is more expensive than sending the prompt uncached. Switching to the 1-hour TTL reduces how often you re-pay the write premium, at a higher per-write cost, so it only helps if your gaps are longer than 5 minutes but shorter than an hour.
What is the difference between cache write and cache read pricing on Claude?v
A cache write happens the first time a given prefix is stored: it costs 1.25x the standard input rate on the default 5-minute TTL, or 2x on the 1-hour TTL. A cache read happens on every subsequent call that hits the same stored prefix before it expires: it costs 0.1x the standard input rate, a 90% discount. These two multipliers are the same across the whole Claude lineup, Haiku 4.5 through Fable 5, so the break-even hit rate is a property of the TTL you choose, not the model.
Does OpenAI charge extra for writing to the prompt cache on GPT-5.4?v
No. OpenAI caches automatically once a prompt prefix is roughly 1,024 tokens or longer, and a cache miss is billed at the same rate as a normal, uncached request. There is no separate write premium the way there is on Claude. A cache hit is billed at 10% of the standard input rate. Because a miss never costs more than not caching, GPT-5.4 caching has no realistic downside, only upside on the requests that happen to hit.
How do I know if my prompt cache is actually being used?v
Check the token usage fields on the API response rather than assuming caching is working. On Claude, look at cache_read_input_tokens and cache_creation_input_tokens in the usage object; if cache_read_input_tokens stays at zero across repeated, near-identical requests, something in your prompt (a timestamp, an unsorted JSON object, a rotating request ID) is silently breaking the prefix match. On OpenAI, the cached_tokens field inside prompt_tokens_details reports the same thing. Reported bugs where caching silently stops working, sometimes inflating costs 10 to 20 times for a session, are usually traced back to exactly this kind of prefix drift.
What is the minimum prompt length before caching kicks in?v
On Claude, the minimum cacheable prefix is model dependent: 4,096 tokens on Opus and Haiku tiers, 2,048 tokens on Fable 5, and 1,024 tokens on some Sonnet-generation models. A shorter prefix silently will not cache at all, no error, it just shows zero cache-read tokens. On GPT-5.4, OpenAI applies caching automatically above roughly 1,024 tokens with no configuration needed.
Should I use the 5-minute or 1-hour cache TTL on Claude?v
Use the 5-minute default when your requests against the same prefix are frequent, at least one every few minutes, since the write premium is lower (1.25x vs 2x) and you will re-pay it less often anyway. Use the 1-hour TTL when your traffic is bursty with gaps longer than 5 minutes but the same prefix still gets reused within an hour, for example a support bot that goes quiet overnight then gets a morning rush. The break-even hit rate is higher on the 1-hour TTL (about 53% vs 22%), so only switch if you are confident the longer window will actually raise your hit rate enough to clear it.
Does caching work the same way for GPT-5.4 as it does for Claude?v
The discount on a cache hit is close, 90% off standard input pricing on both. The mechanics differ in two ways that matter for cost. First, OpenAI caching is automatic and requires no cache_control markers or opt-in; Claude requires you to mark which content blocks are cacheable. Second, and more importantly for your bill, OpenAI charges no premium on a cache miss, while Claude charges 1.25x to 2x. That asymmetry is why a low hit rate can make Claude caching a net loss while GPT-5.4 caching cannot go net negative.
Related Tools
Anthropic API Pricing Calculator
Full Claude bill with caching and batch discount toggles
LLM API Token Cost Calculator
Compare per-token pricing across providers by use case
Context Window Calculator
Check whether your content fits before you plan a caching strategy
Claude API Pricing Calculator
Real-time cost estimates across Opus, Sonnet, and Haiku