About this tool
Compute cache hit ratio, backend load reduction and effective latency (AMAT) from hit and miss counts and latencies.
The Cache Hit Ratio Calculator computes a cache's hit ratio — hits ÷ (hits + misses) — and turns it into the numbers that matter for capacity planning: effective request latency via the AMAT formula (hit time + miss rate × miss penalty, from Hennessy & Patterson), the speedup versus running uncached, and the share of traffic that still reaches the backend. Feed it counters from Redis INFO, Memcached stats, a CDN dashboard or an application cache and it shows what the cache is really buying you.
Open Cache Hit Ratio Calculator on AltFTool — it loads instantly in your browser.
Enter Cache hits and Cache misses (for Redis, the keyspace_hits and keyspace_misses counters from INFO), plus Cache lookup latency (ms) and Backend fetch latency (ms).
Optionally fill the Traffic rate (requests/second) field to size how much load still reaches the origin at your hit ratio.
Read the Hit ratio headline with the Effective latency (AMAT), Speedup and Backend requests/second rows, then press Copy result or Reset.
Uses AMAT (hit time + miss rate × miss penalty) rather than pretending misses cost nothing.
Shows the exact requests/second your origin still serves at a given traffic rate and hit ratio.
Flags configurations where the cache lookup is slower than the backend it fronts.
Hit ratio = hits ÷ (hits + misses). For example 900 hits and 100 misses give 900/1000 = 90%. In Redis the counters are keyspace_hits and keyspace_misses in INFO stats; in Memcached they are get_hits and get_misses.
It depends on workload, but content and CDN caches commonly target 90%+ while database query caches may sit lower. The marginal value is nonlinear: going from 90% to 99% cuts backend traffic by another factor of ten (10% of requests down to 1%), which is why the last few percentage points matter most.
AMAT (average memory access time) = hit time + miss rate × miss penalty, from Hennessy and Patterson's computer architecture texts. With a 2 ms cache, a 50 ms backend and a 90% hit ratio: 2 + 0.10 × 50 = 7 ms average, a 7.1× speedup over the uncached 50 ms.
Exactly the hit ratio: at 90% hits only 10% of requests reach the backend, so 1,000 req/s of traffic becomes 100 req/s of origin load. This calculator multiplies your traffic rate by the miss ratio to give the residual backend requests per second.
Add the Cache Hit Ratio Calculator widget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.
<iframe src="https://www.altftool.com/embed/widget/cache-hit-ratio-calculator"
title="Cache Hit Ratio Calculator — free AltFTool widget"
width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
loading="lazy" referrerpolicy="no-referrer-when-downgrade" allow="clipboard-write"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/cache-hit-ratio-calculator?utm_source=embed&utm_medium=widget" rel="nofollow">AltFTool — free online tools</a></p>