Search Ctrl K
Home / Tools
THE FEUTEX TOOLKIT

LLM Prefix Cache Token Savings

Estimate repeated prefill tokens avoided by caching an identical shared prefix.

AI Infrastructure workspace● Runs in your browser
01 Your input
02 Your result
View or copy raw result data
FormulaPrefill tokens avoided = (calls-1)*prefix*hit/100; Tokens still requiring prefill = calls*(prefix+unique)-(calls-1)*prefix*hit/100

Made for real tasks

  • Estimate repeated prefill tokens avoided by caching an identical shared prefix.
Explore step-by-step workflows →

Worked example

Inputs

Calls sharing prefix
1000 calls
Shared prefix
4000 tokens
Unique tokens per call
500 tokens
Cache hit share after first call
90 %

Expected results

Prefill tokens avoided
3596400 tokens
Tokens still requiring prefill
903600 tokens

Load the example in the workspace to reproduce these results. Display rounding does not change the underlying calculation.

How to use this tool

  1. Enter calls sharing prefix, shared prefix, unique tokens per call, cache hit share after first call in the displayed units.
  2. Calculate the scenario, then compare it with measurements before changing a system.

Try this example

{
  "calls": 1000,
  "prefix": 4000,
  "unique": 500,
  "hit": 90
}

Accuracy and scope

Counts exact prefix hits only; no provider pricing assumptions or cache capacity model.

Is my data uploaded?

This tool runs locally in your browser. Input and output are not sent to a processing server. Copy or download your result before leaving the page.