Hash Collision Probability Calculator

Estimate birthday-problem collision probability for any hash bit length, with 50% and safe-count thresholds.

Frequently Asked Questions

What is the birthday problem?

It is the result that in 23 people there is a 50% chance two share a birthday. Applied to hashing: collisions become likely around sqrt(2^b) items, far before you reach 2^b.

Why does MD5 have security concerns if the collision probability looks small?

This models random collisions. MD5's problem is vulnerability to chosen-prefix attacks where an attacker crafts collisions deliberately - that is a cryptographic weakness, not a birthday probability.

Is UUID v4 safe for primary keys in a large database?

Yes. With 122 random bits the 50% collision point is around 2.7x10^18 UUIDs - a database generating one per millisecond would need 85 million years to reach that count.

What does the negligible probability threshold mean?

It is the item count at which collision probability falls below 10^-18, smaller than the chance of a cosmic ray flipping a RAM bit. Below this threshold, hash collision is not a meaningful risk.

Important Disclaimer: Estimates for informational purposes only.

This calculator provides estimates for informational purposes only. Results are based on assumptions and may not reflect actual outcomes. Consult qualified professionals in relevant fields before making important decisions based on these results.