---
title: "Prompt caching calculator: how much will caching save?"
description: "Estimate prompt caching savings: cacheable prefix size, hit rate and cached-token price. See the cost with and without caching and the break-even hit rate."
url: https://broadrouter.com/tools/prompt-caching-calculator/
lang: en
updated: 2026-11-16
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# Prompt caching savings calculator

Updated 2026-11-16

**In short:** Prompt caching bills a repeated prompt prefix at the cheaper cached-input price. Monthly saving ≈ prefix tokens × hit rate × (input price − cached price), minus any cache-write fee. On DeepSeek V4.1 Flash cached input is 97% cheaper, so a prompt with an 80% stable prefix and 70% hits cuts the input bill by about 54%.

Free, no sign-up, runs in your browser: nothing you type is sent anywhere.

Workload and pricesRequests a monthPrompt tokens per requestOutput tokens per requestCacheable prefix, % of promptCache hit rate, %ModelDeepSeek V4.1 FlashGLM 5.3Qwen3.8 27BCustom prices

Input, per 1MCached input, per 1MOutput, per 1M

Cache-write multiplier1 = no write fee (BroadNet lists none). Set it if your provider charges extra on the request that writes the cache, e.g. 1.25 for Anthropic's 5-minute cache.

Without caching

—

With caching

—

Saving

—

Break-even hit rate

—

## All models with a cached price, same workload

| Model | Without caching | With caching | Saving |
| --- | --- | --- | --- |

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=tools-prompt-caching-calculator&utm_content=tool) ·

Estimates, before tax. Model prices are BroadNet Inference's published per-1M-token prices, synced 2026-11-14. The hit rate is applied to the whole cacheable prefix; real caches also hit partially, so measure `cached_tokens` on live traffic.

[Report a wrong price or number](mailto:info@broadnet.ai?subject=Wrong%20price%20or%20number%20on%20Prompt%20caching%20savings%20calculator&body=Page%3A%20https%3A%2F%2Fbroadrouter.com%2Ftools%2Fprompt-caching-calculator%2F%0A%0AWhat%20looks%20wrong%20(model%2C%20figure%20shown%2C%20correct%20figure%20and%20a%20source%20link%20if%20you%20have%20one)%3A%0A) (email to info@broadnet.ai, with this page's link and your inputs filled in).

## How it works

1.  Enter requests per month, prompt (input) tokens per request and output tokens per request.
2.  Set the cacheable prefix share (the part of the prompt that is the same every time) and your expected hit rate.
3.  Pick a model, or choose "Custom prices" and type input, cached input and output prices per 1M tokens. If your provider charges to write the cache, set the write multiplier.
4.  Read the monthly cost with and without caching, the saving and the break-even hit rate. Copy the link or download CSV.

## The formula

```
prefix          = prompt tokens × prefix share
without caching = prompt × input_price + output × output_price
with caching    = (prompt − prefix) × input_price
                + prefix × ( hit × cached_price + (1 − hit) × input_price × write_multiplier )
                + output × output_price
break-even hit  = (w − 1) × input_price / (w × input_price − cached_price)
```

All prices are per one million tokens; divide token counts by 1,000,000. Only the prefix can be cached, and only on a hit. The rest of the prompt and every output token are billed at the normal price, so caching never reduces the output part of the bill.

## Cached-input prices on BroadNet Inference

| Model | Input / 1M | Cached input / 1M | Discount |
| --- | --- | --- | --- |
| [DeepSeek V4.1 Flash](https://broadrouter.com/models/deepseek-v4.1-flash/) | $0.175 | $0.0055 | 97% |
| [GLM 5.3](https://broadrouter.com/models/glm-5.3/) | $0.78 | $0.173 | 78% |
| [Qwen3.8 27B](https://broadrouter.com/models/qwen3.8-27b/) | $0.175 | $0.0435 | 75% |

Prices synced 2026-11-14. A model without a cached price bills repeated input at the full input price.

## Worked example

An agent sends 100,000 requests a month with 10,000-token prompts, 80% of which is a stable prefix (system prompt, tools and shared context), and writes 400 output tokens. On DeepSeek V4.1 Flash without caching that is $195.80 a month. With a 70% hit rate it is $100.88, a 48% saving.

## How to raise your hit rate

1.  Put everything that never changes first: system prompt, tool definitions, examples, long reference documents.
2.  Move anything that changes per request (dates, user names, request IDs) to the end of the prompt.
3.  Keep tool lists and JSON keys in a fixed order; one reordered item breaks the match after it.
4.  Append to the conversation instead of rewriting or summarising earlier turns on every call.
5.  Send related requests close together; caches expire after a period of no use.
6.  Measure: log `usage.prompt_tokens_details.cached_tokens` and compare it with `prompt_tokens`.

More detail in [cached input tokens explained](https://broadrouter.com/blog/cached-input-tokens-explained/).

## Questions

### How much does prompt caching save?

It depends on three numbers: how much of each prompt is a stable prefix, how often that prefix is a cache hit, and the cached-input discount. On DeepSeek V4.1 Flash, cached input is 97% cheaper than normal input, so an agent that resends a long, stable context can cut its input bill by more than half. Output tokens are never discounted.

### What is a cache hit rate?

The share of requests whose prefix is found in the provider's cache. A hit needs the start of the prompt to match a recent request exactly, token for token. Read it from the API: `usage.prompt_tokens_details.cached_tokens` divided by prompt tokens.

### Does writing to the prompt cache cost extra?

With some providers, yes: they charge a premium on the request that writes the prefix into the cache, so a low hit rate can cost more than no caching. Set the cache-write multiplier to model that (for example 1.25 for a 25% premium). Leave it at 1 for providers that list no write fee, such as BroadNet Inference.

### What is the break-even cache hit rate?

The hit rate at which caching stops costing more than it saves. With no write premium, any hit saves money, so break-even is 0%. With a write multiplier w, break-even = (w − 1) × input price ÷ (w × input price − cached price).

### Why is my cache hit rate low?

Usually something near the start of the prompt changes each request: a timestamp, a request ID, a reordered tool list or user-specific text above the shared instructions. Put stable content first and variable content last. [How to structure prompts for caching](https://broadrouter.com/blog/prompt-structure-for-caching/).

### Do I need to turn caching on?

It depends on the provider. OpenAI caches by default on supported models; Anthropic is opt-in with a `cache_control` field and charges 1.25× input to write a 5-minute cache and 2× for 1 hour. Check your provider's docs, then confirm hits in `usage.prompt_tokens_details.cached_tokens`. [Provider differences](https://broadrouter.com/blog/cached-input-tokens-explained/).

## Go deeper

-   [Cached input tokens: how to cut an LLM API bill](https://broadrouter.com/blog/cached-input-tokens-explained/)
-   [Prompt structure for caching](https://broadrouter.com/blog/prompt-structure-for-caching/)
-   [Glossary: cached input tokens](https://broadrouter.com/glossary/cached-input-tokens/)
-   [LLM API cost calculator](https://broadrouter.com/tools/llm-api-cost-calculator/)
-   [BroadNet Inference prices](https://broadrouter.com/pricing/)

## More free tools

-   [**LLM API cost calculator**Price a workload on every model at once, with cache hits, reasoning and a flat-plan check.](https://broadrouter.com/tools/llm-api-cost-calculator/)
-   [**Speech-to-text cost calculator**Hours, calls or voice notes to a monthly transcription bill, against your current provider.](https://broadrouter.com/tools/speech-to-text-cost-calculator/)
-   [**LLM token counter**Exact token counts with each model's real tokenizer, with a token view and cost.](https://broadrouter.com/tools/token-counter/)
-   [**Arabic token counter**Arabic vs English token counts per tokenizer: the "Arabic tax" in tokens and money.](https://broadrouter.com/tools/arabic-token-counter/)
-   [**Tokens to words converter**Tokens ↔ words ↔ characters ↔ pages, by language and content type.](https://broadrouter.com/tools/tokens-to-words/)
-   [**Context window calculator**Will it fit? Window used per model, room left for output, cost to send.](https://broadrouter.com/tools/context-window-calculator/)
-   [**Flat-rate vs per-token LLM cost calculator**Break-even between an unlimited plan and paying per token, per agent.](https://broadrouter.com/tools/flat-rate-vs-per-token-calculator/)
-   [**Image token calculator**Tokens and cost per image under each model's documented rule. Drop an image; nothing is uploaded.](https://broadrouter.com/tools/image-token-calculator/)
-   [**Self-hosting vs API cost calculator**GPU rental against your current API and BroadNet per-token and flat-plan prices: cost per 1M tokens and break-even volume.](https://broadrouter.com/tools/self-hosting-vs-api-calculator/)
-   [**Embedding cost calculator**Index, update and query costs for a corpus at OpenAI, Google, Voyage, Mistral and Jina list prices.](https://broadrouter.com/tools/embedding-cost-calculator/)
-   [**LLM rate limit and concurrency calculator**Which limit binds first: RPM, TPM or concurrency, with Little's law.](https://broadrouter.com/tools/llm-rate-limit-calculator/)
-   [**JSON schema generator for LLM structured output**Sample JSON to strict schema, Pydantic, Zod and a ready request.](https://broadrouter.com/tools/json-schema-generator/)
-   [**OpenAI-compatible API request builder**One request, copied as curl, Python, Node or the OpenAI SDKs.](https://broadrouter.com/tools/api-request-builder/)
-   [**Audio file splitter for speech-to-text limits**Chunk count, overlap and copy-ready ffmpeg commands to fit a transcription file-size limit.](https://broadrouter.com/tools/audio-splitter-ffmpeg/)
-   [**Agent run cost estimator**Context growth per step, total tokens and cost of one agent run, with a DeepSeek session comparison.](https://broadrouter.com/tools/agent-run-cost-estimator/)
-   [**OpenAI to BroadNet migration helper**Paste OpenAI SDK code; get base URL, key and model edits, a diff and the checks that remain.](https://broadrouter.com/tools/openai-to-broadnet-migration/)
-   [**Arabic text normalizer**Tashkeel, tatweel, alef, ya, ta marbuta, digits and invisible characters, with a matching Python function.](https://broadrouter.com/tools/arabic-text-normalizer/)
-   [**RAG chunking calculator**Chunks, embedding tokens, input per query, context check and monthly LLM cost for a RAG pipeline.](https://broadrouter.com/tools/rag-chunking-calculator/)
-   [**max\_tokens calculator for reasoning models**Answer length + reasoning budget + margin = a max\_tokens that does not cut the answer off.](https://broadrouter.com/tools/reasoning-token-budget/)
-   [**LLM batch job planner**Run time, binding limit, cost per model and the flat sessions needed to finish a big job by a deadline.](https://broadrouter.com/tools/llm-batch-job-planner/)
-   [**LLM JSON output validator**Parse errors by line and column, safe repairs, cut-off detection and JSON Schema checks for model output.](https://broadrouter.com/tools/llm-json-output-validator/)
-   [**Prompt token diff**Two prompt versions side by side: changed lines, exact token delta and the monthly cost difference.](https://broadrouter.com/tools/prompt-token-diff/)

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=tools-prompt-caching-calculator&utm_content=page-cta) ·

**Sources**

-   [BroadNet Inference machine-readable prices (pricing.json)](https://inference.broadnet.ai/pricing.json?utm_source=broadrouter&utm_medium=referral&utm_campaign=tools-prompt-caching-calculator&utm_content=sources)
-   [BroadNet Inference prices](https://inference.broadnet.ai/pricing?utm_source=broadrouter&utm_medium=referral&utm_campaign=tools-prompt-caching-calculator&utm_content=sources)
-   [OpenAI prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
-   [Anthropic prompt caching docs (write multipliers)](https://platform.claude.com/docs/en/build-with-claude/prompt-caching)
