Cache Cruncher

Cache · Memory · Virtual Memory bit calculator

Enter any combination of values you know — derived fields fill in automatically as you type. Leave fields blank if unknown.

Cache Parameters

Memory & Virtual Memory

Cache Configuration

Memory Configuration

Formulas used

About the Cache Cruncher calculator

Cache Cruncher is a free online cache and memory bits calculator designed for students taking computer architecture or computer organization courses. Type any combination of values you already know — cache size, block size, associativity, address width, page size, TLB rows — and every derived field fills in automatically. Because the solver is bidirectional, you can drive it from either side of an equation: edit num_blocks and cache_size recomputes; edit cache_size and num_blocks recomputes.

What can you calculate?

Example: a 32 KB, 4-way set-associative cache with 64-byte blocks

Enter cache_size = 32 KB, block_size = 64, associativity = 4, and address_size = 32. Cache Cruncher derives 512 blocks, 128 sets, 7 index bits, 6 offset bits, and 19 tag bits — instantly, with no submit button.

Frequently asked questions

How do I calculate index bits in a cache?

Index bits = log₂(number of sets). Number of sets equals the cache size divided by (block size × associativity). For a direct-mapped cache, associativity is 1.

How do I calculate tag bits?

Tag bits = address size − (index bits + offset bits). Offset bits = log₂(block size in bytes).

How do I calculate TLB tag bits?

TLB tag bits = virtual page number bits − log₂(TLB rows), where VPN bits = virtual address size − page offset bits.

Is my data sent anywhere?

No. Cache Cruncher runs entirely in your browser. There is no backend, no analytics, and no tracking. The Cloudflare Worker only serves the static HTML, CSS, and JavaScript.