Skip to content
ENExplore Calculators

Cache Hit Ratio Calculator

Work out cache hit ratio instantly with clear inputs, formula shown and shareable results.

About Cache Hit Ratio Calculator

Effective latency is the hit ratio weighted average of hit and miss latency, which shows why the last few percentage points of hit ratio matter so much: at 84 percent hits with a 40-fold latency gap, the misses still contribute most of the average. Origin load reduction equals the hit ratio directly, which is usually the stronger justification for the cache.

Formula

Cache effectiveness

hit ratio = hits / (hits + misses); effective latency = ratio x hit latency + (1 - ratio) x miss latency

Worked example

With the default values below, Cache Hit Ratio Calculator returns Cache hit ratio of 84.00%. Change any input above and every figure here is recalculated in your browser.

Inputs used

Cache hitsminimum 0
8,400,000
Cache missesminimum 0
1,600,000
Latency on a hitminimum 0.001 ms
1.2 ms
Latency on a missminimum 0.001 ms
48 ms

Results

Cache hit ratio
84.00%
Blended effective latency
8.688 ms
Origin requests avoided
8,400,000
Origin load reduction
84.00%

Step by step

  1. 1Values used
  2. 2Cache effectiveness
  3. 3Cache hit ratio= 84.00
  4. 4Blended effective latency= 8.688 ms
  5. 5Origin requests avoided= 8,400,000
  6. 6Origin load reduction= 84.00

Assumptions and limits

  • The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 3 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Why does effective latency barely improve above 90 percent?

It does improve, but the remaining misses dominate. Going from 90 to 99 percent hits cuts the miss contribution tenfold, which is often a bigger win than it appears.

Should hit ratio be measured per key or per request?

Per request for latency purposes, and per key to find cache-unfriendly access patterns. A few hot keys can produce a high request hit ratio while most keys never hit.

Cache Hit Ratio Calculator – Calculate Cache hit ratio