Computing & Software
Count-Min Sketch Error & Memory Sizing Calculator
Calculate standard Count-Min Sketch width and depth from additive relative error and failure probability targets.
How the calculation works
Sketch width = ceil(e/epsilon) counters. Sketch depth = ceil(log(1/delta)) rows. Counter memory excluding metadata = ceil(e/epsilon)*ceil(log(1/delta))*counter_bytes bytes.
Worked example
Example inputs — Additive error fraction epsilon: 0.01; Failure probability delta: 0.01; Bytes stored per counter: 4. Expected results — Sketch width: 272 counters; Sketch depth: 5 rows; Counter memory excluding metadata: 5440 bytes.
Assumptions and limits
Analytical software/hardware scenario, not a benchmark or a live provider quote. Use the actual architecture, workload and billing definitions; overheads not named in the model are excluded. Standard nonnegative-update Count-Min construction with appropriate independent hash functions. Bounds scale with total stream weight; collisions overestimate counts and overflow is not modelled.
Reference and further reading
Read the underlying subject reference. Calculith is an independent implementation; the reference does not endorse or certify this tool.
Related calculators
- Password Entropy & Brute-Force Time Estimate
- CPU Instruction Count & CPI Runtime Calculator
- Amdahl & Gustafson Parallel Speedup Calculator
- Roofline Arithmetic Intensity Performance Calculator
- Memory Bus Theoretical Bandwidth Calculator
Example values are editable. Results are estimates where assumptions apply. Calculations run in your browser. Updated 2026-11-16.