If your team is deploying LLM applications to production in 2026—whether for agentic coding, multi-turn RAG, or continuous background summarization—your single largest operational expense is almost certainly input token repetition.

Most engineering leaders budget for LLMs using static cost formulas:
$$\text{Total Cost} = (\text{Input Tokens} \times \text{Input Rate}) + (\text{Output Tokens} \times \text{Output Rate})$$

In modern production architectures, this static model is completely broken. Leading foundation model providers (Anthropic, DeepSeek, and Google) now support KV Prompt Caching, which cuts input token costs by up to 90% on cache hits. However, each provider implements caching economics differently, introducing nuances like minimum threshold sizes, cache write surcharges, and varying time-to-live (TTL) limits.

In this deep dive, we break down the exact mathematics of prompt caching across providers and show how to model your break-even workload using the interactive simulator at ModelPricing.xyz.

1. How Providers Price Prompt Caching

A. Anthropic (Claude 3.5 Sonnet & Claude 3.7 Sonnet)

Anthropic charges an initial write surcharge (+25%) to serialize the KV state into memory for 5 minutes, but gives an 80% discount on all subsequent cache reads:

  • Uncached Input: $3.00 / 1M tokens
  • Cache Write: $3.75 / 1M tokens (+25%)
  • Cache Read: $0.30 / 1M tokens (-90% discount)
  • Minimum Cache Threshold: 1,024 tokens

$$\text{Effective Rate} = \frac{\text{Cache Write Rate} + (N-1) \times \text{Cache Read Rate}}{N}$$

Rule of thumb: If a cached prompt segment is read at least 2 times within the 5-minute TTL window, you achieve positive ROI over uncached calls.

B. DeepSeek (DeepSeek V3 & DeepSeek R1)

DeepSeek employs an automated prefix-caching architecture at the infrastructure level with zero user-side breakpoint configuration:

  • Uncached Input: $0.14 / 1M tokens
  • Cache Read: $0.014 / 1M tokens (90% discount)
  • Cache Write: $0.14 / 1M tokens (No write surcharge)

Because DeepSeek does not charge a write penalty, any cache hit yields immediate net savings.

C. Google Gemini (Gemini 2.0 Flash & Gemini 1.5 Pro)

Google supports both implicit caching and explicit context caching for large context windows:

  • Context Cache Read: $0.025 / 1M tokens (-75% discount)
  • Minimum Cache Threshold: 32,768 tokens
  • Hourly Storage Fee: $1.00 / 1M tokens per hour

2. Standardized 10M Token Production Faceoff

To illustrate the dramatic variance in real-world spending, consider a standardized production workload of 10,000,000 tokens (7,000,000 prompt tokens + 3,000,000 output tokens) with a typical 60% prompt cache hit ratio:

Foundation Model Uncached Cost (10M) With 60% Cache Hit Net Monthly Savings
Claude 3.5 Sonnet $66.00 $54.66 -17.2%
OpenAI GPT-4o $37.50 $32.25 -14.0%
DeepSeek R1 $7.01 $6.42 -8.4%
DeepSeek V3 $1.81 $1.22 -32.6%
Gemini 2.0 Flash $1.90 $1.48 -22.1%

(Live multi-variable figures calculated via ModelPricing.xyz Comparison Engine)

3. Best Practices for Maximizing Cache Hit Ratios

  1. Order Prompts by Volatility: Place static system instructions and few-shot examples at the very beginning of the prompt. Dynamic user messages and variables must always be placed at the end.
  2. Standardize System Prompts: Avoid injecting dynamic timestamps or user IDs into the system message; doing so invalidates the cache prefix for every request.
  3. Model Your Architecture Before Deploying: Test your anticipated token volume, caching ratio, and reasoning token depth using an interactive simulator like ModelPricing.xyz.

Interactive Calculator & Open Dataset