How prompt caching is charged
With caching, the start of your prompt (everything up to a cache breakpoint) is stored after the first request. Each later request that begins with exactly the same tokens reads it back instead of processing it again. Three prices apply to input tokens:
- Cache write. The first request pays a little more than normal for the cached part: 1.25 × the input price for the shorter lifetime on both Claude and the latest GPT models, and 2 × (Claude, 1 hour) or 2.5 × (GPT, 12 hours) for the longer one.
- Cache read. Later requests pay a small fraction for the same tokens. On Claude it's 0.1 × the input price on most models, 0.05 × on Opus 5.5 and Sonnet 5.5, and 0.025 × on Fable 5.2. On GPT-6.2 Astra and Sol it's 0.05 ×.
- Normal input for everything after the cached part, and the normal output price for what the model writes.
The calculator assumes each request in a session arrives before the cache expires. Reading the cache restarts its timer on both providers, so steady traffic keeps it warm.
When it pays off
A short-lifetime cache pays for itself as soon as it's read once, because the extra 0.25 × on the write is less than what one read saves. A long-lifetime cache needs two reads on Claude's pricing. If requests are more than the lifetime apart, every request pays the write price and caching costs more, so check how your traffic is spread out.
Things to know
- The prefix must match exactly. Put fixed content first (tools, system prompt, documents) and anything that changes, such as a timestamp or the user's question, after it.
- There's a minimum length. Shorter prompts aren't cached and are charged normally. It's 512 tokens on current Claude models and 1,024 tokens on GPT-5.6 and later. The tool warns you if your prefix is too short.
- It stacks with batch processing on Claude, which halves input and output prices for work that can wait.
- Claude Haiku 5.5 has higher prices for prompts over 100,000 tokens. The calculator switches to them automatically.
- Gemini bills its context caching differently, with an hourly storage charge, so it isn't included here. Use the custom option with your own prices if you want a rough comparison.