Hash Collision Probability
Estimate birthday collisions in a uniformly random hash space.
Your numbers
Approximate collision probability
Uniform independent hashes only. Up to 10,000 hashes use the no-collision product in log space; larger counts use the birthday approximation. More hashes than possible outputs guarantee a collision. This is not a cryptographic security proof or a model of adversarial collisions.
Scenario comparison
Up to three snapshots in this tab. Loading one replaces the current inputs.
Formula
n is the hash count and b is the width in bits. For n ≤ 10,000, P = 1 − ∏(1 − k/2^b), k = 0…n−1. Larger counts use P ≈ 1 − exp[−n(n−1)/(2×2^b)]. If n > 2^b, P = 1.
Estimate birthday collisions in a uniformly random hash space.
Worked example
- Generated independent hashes
- 1000000
- Hash width (bits)
- 64
- Approximate collision probability
- 2.7105027E-6 %
Scope and limitations
Uniform independent hashes only. Up to 10,000 hashes use the no-collision product in log space; larger counts use the birthday approximation. More hashes than possible outputs guarantee a collision. This is not a cryptographic security proof or a model of adversarial collisions.
Inputs are checked for missing values and allowed ranges. A result outside the finite numeric range is not displayed. Rounding affects display, while the calculation uses the model’s numeric precision.
Check your units and assumptions before relying on a result. Changing a label does not convert a currency or physical unit.
Formula version: 769d59f888b0 · Example checked: