← All Tools

๐ŸŽฒ Hash Collision Probability

Birthday-problem calculator for hash spaces. Given a hash bit size and a number of generated items, compute the probability of at least one collision.

Inputs

Supports scientific notation (e.g. 1e9, 2.5e12).

Presets

Results

Collision probability
โ€”
Hash space size
โ€”

Items before reaching probability

Formula

For n items in a hash space of size N = 2^bits, the approximate probability of at least one collision (birthday problem) is:

P โ‰ˆ 1 โˆ’ e^(โˆ’n(nโˆ’1)/(2N))

The 50% threshold is reached at roughly n โ‰ˆ 1.1774 ร— โˆšN.