DEVELOPER TOOL

Prompt Cache Calculator

Estimate reusable-prefix cache savings using dated model prices, expected hits and provider-specific write/read behavior.

Runs locallyRuns locally in your browser. Your data is not uploaded.

Reusable workload

Hit rate is an assumption, not a guarantee. Every hit reuses the whole prefix. Every miss writes that prefix at the selected duration’s replacement rate. Changing input and output remain billable on every request. A 100% hit scenario assumes an already warm cache; earlier writes are outside this workload.

Estimated workload cost

Compare a no-cache baseline with expected reads, writes and uncached tokens.

Enter token counts and a workload.

Models one stable explicit prefix: misses write at the selected 30-minute rate; changing suffix is uncached. Actual implicit breakpoints can also write changing content. Known minimum: 1024 reusable tokens.

Standard global API text rates. Above 272,000 total input tokens, long-context rates apply to the entire request. Regional/Fast/Batch charges are not modeled. Cache rules effective 2026-10-13. Pricing effective unavailable. Fractional expected hits are allowed; costs use integer picodollars with rounding only at the displayed workload components.

· Cache policy · verified 2026-10-13

A reusable prefix, an explicit assumption.

The ordinary cost calculator estimates a workload. This tool compares that workload against prefix caching. Hits reuse the full prefix; changing input and output are charged on every request. A partial rate models expected fractional hits across the workload, not a promise of provider behavior.

Writes are not free.

OpenAI’s reviewed GPT-6 models and Claude charge a replacement cache-write rate on misses. Select the available lifetime; writes are not added on top of ordinary input pricing for the same tokens. Gemini Interactions uses implicit caching: misses pay ordinary input rates and this tool does not create or price explicit cache objects.

Compare honestly.

A 100% hit rate assumes a previously populated cache; prior warm-up costs are outside the entered request count. A low hit rate can produce negative savings when writes cost more. Below a known minimum, this estimate disables caching. Unknown thresholds remain explicitly unknown. One stable prefix is modeled; partial matches, concurrent cold writes, expiry and changing settings must be reflected in your chosen hit rate.

Dated prices and exact arithmetic.

All prices come from the existing central catalog. Effective dates and long-context bands apply; no second pricing database exists. Counts are whole numbers up to one billion, hit rate permits two decimals, and arithmetic uses integer picodollars. Taxes, regional rates, media, tools and explicit cache storage are excluded. No actual provider requests or billing data are used.

Find a tool or category

Tools & categories12 results