Prompt Cache Savings Calculator (OpenAI, Anthropic, DeepSeek)
See how much prompt caching saves you. Enter your cached prefix size, per-request tokens, volume, and hit rate to compare cost with and without caching across models that support it. 100% local.
Last updated:
CommentsEnter your cached prefix size, per-request tokens, request volume, and expected cache hit rate to see the cost with and without prompt caching — and exactly how many dollars caching saves. Runs locally.
Cost without caching
$175.00
Cost with caching
$95.80
You save
$79.20 (45.3%)
What is Prompt Cache Calculator?
Prompt caching is one of the biggest cost levers in LLM apps. Providers let you cache a repeated prompt prefix — a long system prompt, few-shot examples, or a fixed document — so that on subsequent requests those tokens are billed at a steeply discounted cache-read rate (often around 10% of the normal input price) instead of full price every time. The savings depend on how large the cached prefix is relative to the fresh per-request tokens, and on your cache hit rate. This calculator models all of that against each model's real cached-input price so you can see whether restructuring your prompt to be cache-friendly is worth it.
How to estimate caching savings
- 1Pick a model that supports prompt caching.
- 2Enter the cached prefix size and the fresh / output tokens per request.
- 3Set your request volume and expected cache hit rate.
- 4Compare the cost with and without caching.
Key Concepts
- Cache hit rate
- Share of requests that reuse the cached prefix rather than re-paying full price.
- Cached-input rate
- The discounted per-token price charged on a cache hit. Compare across models.
Frequently Asked Questions
What is prompt caching?
Providers cache a repeated prompt prefix (system prompt, few-shot examples, fixed documents) so subsequent requests that reuse it are billed at a much lower cache-read rate — often 10% of the normal input price.
What hit rate should I assume?
The first request always misses (it writes the cache). In steady state with a stable prefix, hit rates of 80–95% are common. Lower it if your traffic is bursty and the cache expires between requests.
Which models support it?
The dropdown only lists models with a published cached-input rate in our daily-refreshed pricing data — currently several OpenAI, Anthropic, and DeepSeek models.
Try Next
Text Chunker
Split long text into overlapping chunks for embedding and RAG pipelines. Preview recursive, paragraph, sentence, or fixed strategies with live token counts. Runs 100% in your browser.
Related Tools
Context Window Checker
Check whether your prompt fits a model's context window before you send it. Estimates prompt tokens, reserves room for the response, and shows remaining headroom across GPT-4o, o1, Claude, Gemini, DeepSeek and more. 100% local.
Prompt Token Breakdown
Break a prompt into segments and see how many tokens — and how much cost — each part uses. Find the heaviest section (system, few-shot examples, or user input) so you know exactly what to trim. 100% local.
Schema → Tool Definition
Turn a sample JSON payload into function-calling / tool definitions for OpenAI, Anthropic, and Gemini — side by side. Strict-mode toggle adds required + additionalProperties: false. 100% local, paste straight into your tools array.
Chat Messages Validator
Validate a Chat Completions messages array before you send it — checks roles (system/user/assistant/tool), required content, and common mistakes that cause a 400. 100% local.
Prompt Template Tester
Write a prompt with {{variable}} placeholders, fill in values, and preview the final prompt. Detects every variable and flags any you left unfilled. 100% local.
Prompt Diff
Compare two versions of a prompt line by line and see the token delta between them — so you know exactly what changed and whether an edit made the prompt cheaper or more expensive. 100% local.