ratio.

Find a tool

Browse all tools and categories ↗
CACHE ADDRESS TAG INDEX

Cache Address Tag Index Calculator

Split physical byte addresses into tag, set-index and block-offset bits for a power-of-two set-associative cache.

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

    Count the addressable data lines and sets, then assign low bits to within-line offset and the following bits to set selection.

    Sets=capacity/(line bytes×ways); offset=log2(line); index=log2(sets); tag=address bits−index−offset

    Worked example

    32-bit addresses, 32 KiB data, 64-byte lines and eight ways give 64 sets, six offset bits, six index bits and 20 tag bits.

    Assumptions and input details

    Capacity excludes tags and metadata. Capacity, line and ways must be exact powers of two with at least one set. No virtual-index aliasing, replacement state, ECC, sectoring or hardware latency model.

    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 · COMPUTINGLRU Cache Trace Calculator

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

    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 · COMPUTINGNumber Base Converter

    Convert a signed integer between bases 2–36 using exact arithmetic. Compare binary, octal, decimal, hexadecimal and base-36 values with place-value steps.

    ADVERTISEMENT

    Reserved advertising space.