ratio.

Find a tool

Browse all tools and categories β†—
COMPUTING

LRU Cache Trace Calculator

Calculate cache hits, misses and evictions for an explicit least-recently-used block-access trace.

Enter your values

01 / INPUT
Calculated on your device

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.

    RELATED TOOL Β· COMPUTINGTwo Level Cache Average Access Time Calculator

    Calculate average memory access time and path probabilities for serial L1, L2 and memory lookups.

    RELATED TOOL Β· COMPUTINGBandwidth Delay Product and TCP Window Calculator

    Estimate in-flight data and a receive-window throughput ceiling using entered path bandwidth and round-trip time.

    RELATED TOOL Β· COMPUTINGRAID Storage Capacity Calculator

    Estimate theoretical RAID 0, 1, 5, 6 or 10 capacity with identical drives and optional dedicated spares. Separate raw, usable, redundancy and spare capacity.

    ADVERTISEMENT

    Reserved advertising space.