Cryptography & Security
Advanced

Collision Probability

Approximate chance of a collision among n items in space N.

Formula

Pn22NP \approx \frac{n^2}{2N}

Variables

PCollision probability
nNumber of items
NSize of space

Example

n=1000, N=10^9: P ≈ 5×10⁻⁴

Did You Know?

UUID and nonce designers use this bound to pick sizes large enough that duplicates essentially never happen.

Share this formula