Hash Collision Probability
Birthday paradox math for hashes and IDs.
Probability of any collision
< 1×10⁻⁹
Bit width: 122
Total ID space: 5.32e+36
Items at 50% collision risk: 2.71e+18
Birthday paradox math: with N items in a space of size 2^bits, expected first collision at √(2 × space × ln 2) items. UUIDs have 2^122 ≈ 5.3 × 10³⁶ possible values; you'd need quintillions of generated IDs before collision becomes plausible. 64-bit IDs collide at ~5 billion items.
About
Pick a hash or ID type (MD5, SHA-256, UUID, custom bit width) and how many items you'll generate. Get the probability of any two colliding plus the 'birthday' threshold (50% chance of any collision).
How to use
- Pick hash type.
- Enter number of items.
- Read collision probability.
FAQ
Are UUIDs really unique?+
v4 UUIDs have 122 random bits. You'd need to generate quintillions of them before collision becomes plausible. Practically, treat them as unique for any normal application.