LRU Cache Trace Calculator
Calculate cache hits, misses and evictions for an explicit least-recently-used block-access trace.
YOUR CALCULATION
Result
β
Calculation steps
Work through one step at a time or reveal the complete calculation. The steps use your current inputs.
How to calculate
Simulate an initially empty fully associative cache, updating recency on every access.
Hit: move referenced block to MRU; miss: evict LRU if full and insert at MRU
Worked example
For A B A C A B with capacity 2, accesses 3 and 5 hit. There are 2 hits,4 misses and a 33.3333333% hit rate; final MRU-to-LRU order is B,A.
Assumptions and input details
Use 1β200 references and capacity 1β32 blocks. IDs are case-sensitive, 1β16 letters, digits, dots, underscores or hyphens; they already represent blocks, not byte addresses. Cache starts empty. No set mapping, block-size conversion, prefetch, write-back, coherence or miss latency is modeled. This computes the given trace, without measuring a real program or claiming a future hit rate.
References: Cornell: cache replacement policies
Using this calculator
Can I enter my own problem?
Yes. Replace the example values with your own inputs. The result, calculation steps, tables and applicable diagrams update from those inputs. Blank or invalid values clear the result; example values are never silently substituted for missing inputs.
Are the results exact?
Results use floating-point arithmetic and displayed rounding. Read the formula, assumptions and any stated data precision before interpreting the result.
Is my input uploaded?
The calculation runs in your browser. No account, file upload or external AI service is required. Inputs are not saved between page reloads.
Calculate average memory access time and path probabilities for serial L1, L2 and memory lookups.
Estimate in-flight data and a receive-window throughput ceiling using entered path bandwidth and round-trip time.
Estimate theoretical RAID 0, 1, 5, 6 or 10 capacity with identical drives and optional dedicated spares. Separate raw, usable, redundancy and spare capacity.
Reserved advertising space.