How prompt caching economics actually work
Related: Token counter · LLM API price comparison · RAG cost calculator · AI agent cost calculator
Only the reusable prefix moves
Caching discounts one thing: the identical prefix that rides along on many requests — a long system prompt, tool schemas, few-shot examples, or a document you keep querying. Your fresh per-request input and every output token are billed at the normal rate whether or not you cache, which is why this tool leaves those two rows the same across both columns. The whole savings story lives in the prefix line.
Write premium vs read discount
A cache miss writes the prefix — some providers charge a small premium over the base input rate for that, others charge nothing extra. Every cache hit reads the prefix at a deep discount, often around a tenth of the base rate. Your blended prefix cost is therefore a mix of cheap reads on hits and premium-priced writes on misses, weighted by your hit rate. The more you reuse the same prefix, the more the cheap reads dominate.
The break-even hit rate
Caching pays off once the blended prefix cost drops below the base rate. Solving for that gives a break-even hit rate of (1 − write-multiplier) ÷ (read-multiplier − write-multiplier). With a 1.25× write and a 0.10× read it lands near 22% — reuse the prefix on more than roughly a fifth of requests and you save; less than that and the write premium costs you. When a provider charges no write premium, that break-even is zero and caching helps at any reuse above nothing. The calculator recomputes this line for whatever multipliers you enter.
The sovereign floor: $0 per token
Prompt caching is a discount on tokens you are still renting. A model running locally on a GPU you own has no per-token bill at all — prefix, fresh input, and output are all free at the margin, with only electricity as the variable cost. Above a modest scale, owning the model beats caching a rented one, and the gap widens as volume grows. ABUZ8 OS runs locally by default and only reaches for a paid API when a hosted model clearly beats your local one.
Is my data sent anywhere?
No. This calculator runs entirely in your browser. Nothing you enter is uploaded, logged, or stored.