Cache Hit Ratio Calculator
A cache hit is a request served from the cache; a miss has to fall through to slower storage or an origin server. The hit ratio is how often you hit, and it drives the average access time your users experience. Enter your hit and miss counts and the latency of each path to get the hit ratio, miss ratio and effective access time.
Cache hit ratio formula
Total accesses = hits + misses
Hit ratio = hits / total accesses
Miss ratio = 1 - hit ratio
Effective access time = hit ratio * hit time + miss ratio * miss time
Effective access time is the access-frequency-weighted average of the two paths. As the hit ratio climbs, the average is pulled down toward the fast hit time.
Worked example
With 950 hits and 50 misses, total accesses = 1,000. Hit ratio = 950 / 1,000 = 95.00 percent, miss ratio = 5.00 percent. With a 1 ms hit and 50 ms miss, effective access time = 0.95 times 1 plus 0.05 times 50 = 0.95 plus 2.50 = 3.45 ms.
Cache hit ratio: frequently asked questions
How do you calculate cache hit ratio?
Hit ratio is the number of cache hits divided by the total number of accesses (hits plus misses), usually expressed as a percentage. Miss ratio is one minus the hit ratio, or misses divided by total accesses.
What is effective access time?
Effective (average) access time weights the fast hit path and the slow miss path by how often each occurs: effective time = hit ratio times hit time plus miss ratio times miss time. A higher hit ratio pulls the average toward the fast hit time.
What is a good cache hit ratio?
It depends on the workload, but content-delivery and CPU caches often aim for hit ratios well above 90 percent. The right target is whatever keeps effective access time and origin load within your performance budget. Use this tool to test scenarios.
Can I enter the hit ratio directly?
This tool derives the hit ratio from the hit and miss counts you enter, so the two stay consistent. To explore a target ratio, set hits and misses to numbers in that proportion, for example 95 hits and 5 misses for a 95 percent hit ratio.
Sources and notes
- Hit ratio, miss ratio and effective access time are standard definitions from computer-architecture memory-hierarchy theory.
- Latency values are measured from your own system; enter the figures observed for your cache and origin.
Reviewed by the CalculatorHub team, edited by James Graham, 19 June 2026. See our methodology.