Skip to content
cosmodev ~/tools/cache-savings-calculator

캐시 절약 계산기

AI & Agents

프롬프트 캐싱이 얼마나 절약해 주는지 확인하세요. N회 요청 기준 캐시 미적용과 적용 비용 비교, 그리고 쓰기 프리미엄의 손익분기점까지 보여 줍니다.

프롬프트 캐싱 절감액
절감 $0.33 (43.33%)
$0.75 비캐시 → $0.43 캐시 · 5 요청
손익분기: 13 캐시 히트 — 읽기가 쓰기 프리미엄 한 번을 회수해야 해요
계산식
비캐시 = hits × (prompt×in$/M + output×out$/M) / 1M
          = 5 × (10,000×$10 + 1,000×$50) / 1M = $0.75
캐시 = (prompt×write$/M + hits × (prompt×read$/M + output×out$/M)) / 1M
       = (10,000×$12.5 + 5 × (10,000×$1 + 1,000×$50)) / 1M = $0.43
break-even hits = ceil(write$/M / read$/M) = ceil($12.5 / $1) = 13

데이터 기준 2026-11-15T09:36:57.768Z

(문서는 영어)

What it does

The Cache Savings Calculator shows what prompt caching actually saves on a repeated workload. Enter your prompt and output token counts plus how many requests reuse the cached prompt, pick a model, and it compares the uncached bill against the cached one — including the honest case where caching costs more.

The key nuance it captures is the write premium: the first request pays extra to store the prompt, and every later hit pays a much cheaper cache-read rate instead of full input price. The break-even figure tells you how many hits it takes for the cheap reads to repay that one write.

How to use it

  1. Set Prompt tokens / request, Output tokens / request, and Cache hits with the steppers.
  2. Pick a Model — cache-priced models sort first; models without published cache rates are marked “no cache rates” and show the explanatory empty state.
  3. Read the headline: green when caching saves money, red when it costs more (too few hits to amortize the write).
  4. Check The math block — both formulas rendered with your model’s live rates and your numbers substituted in.
  5. Copy savings or Copy share link to send the exact scenario.

Examples

A repeated 10k-token prompt (5 hits)

Input: 10,000 prompt tokens, 1,000 output tokens, 5 cache hits, at $10/M input, $50/M output, $1/M cache read, $12.5/M cache write:

uncached = 5 × (10,000×$10 + 1,000×$50) / 1M = $0.75
cached   = (10,000×$12.5 + 5 × (10,000×$1 + 1,000×$50)) / 1M = $0.425
savings  = $0.325 (43.33%) · break-even = ceil(12.5 / 1) = 13 hits

A single request — caching loses

Same shape, 1 cache hit:

uncached = $0.15 · cached = $0.185 · savings = −$0.035

One hit never amortizes the write premium; the tool shows the negative result in an error tone rather than hiding it.

Good to know

  • Break-even counts reads, not requests. ceil(write$/M ÷ read$/M) is how many cache hits it takes for cumulative read spend to equal one write premium — below it, caching costs more.
  • Rates are a snapshot. Every figure flows from one dated model snapshot — check the “Data as of” line for freshness; models without published cache rates return no result instead of partial math.
  • Private: everything runs 100% client-side — no token counts or rates leave your browser.
  • Related tools: LLM Cost Calculator, Token Estimator, Embedding Chunk Planner.
소스 코드14개 언어

100% 클라이언트 측 · 데이터는 브라우저 밖으로 나가지 않습니다. 도움이 되었나요? 팀원에게 공유해 보세요.