Prompt Cache Savings Calculator
See how much repeated system prompts, examples, and RAG context can save on your LLM API bill each month.
Uncached monthly
—
Cached monthly
—
Savings / month
—
Best provider
—
| Provider | Input $/1M | Cached $/1M | Output $/1M | Uncached / mo | Cached / mo | Savings / mo | Effective input $/1M |
|---|---|---|---|---|---|---|---|
| OpenAI GPT-4o gpt-4o | $2.50 | $1.250 | $10.00 | — | — | — | — |
| OpenAI GPT-4o-mini gpt-4o-mini | $0.15 | $0.075 | $0.60 | — | — | — | — |
| Anthropic Claude 3.5 Sonnet claude-3-5-sonnet-20240620 | $3.00 | $3.750 | $15.00 | — | — | — | — |
| Anthropic Claude 3 Haiku claude-3-haiku-20240307 | $0.25 | $0.030 | $1.25 | — | — | — | — |
Frequently asked questions
What is prompt caching and how does it save money?
Prompt caching stores repeated context — system prompts, few-shot examples, knowledge-base chunks — so you only pay the standard input rate for new tokens. Tokens read from the cache are billed at a discounted cached-input rate, which lowers per-request cost for long-context agents.
Which providers support cached input pricing?
OpenAI GPT-4o and GPT-4o-mini, plus Anthropic Claude 3.5 Sonnet and Claude 3 Haiku, publish cached-input rates. Other providers may not offer context-cache discounts. Prices are reviewed monthly; confirm current rates on each provider's pricing page.
What tokens should I mark as cached?
Enter the portion of each request that is identical across calls — typically system instructions, examples, document context, or RAG chunks. The higher the share and cache-hit rate, the bigger the savings.
Does this include output-token cost?
Yes. Output tokens are billed at the standard output rate whether or not the input is cached, so the calculator includes them in both the cached and uncatched totals.