Experimental

Birthday Paradox Calculator

Calculate the chance of a shared birthday in any group size, and apply the same arithmetic to hash collisions, UUID duplicates and short identifiers.

Last reviewed by the Radiatus Cloud team

Results appear here.

Need this done properly for your business?

Radiatus delivers secure cloud, DevOps & compliance engineering.

Book a free consult

Twenty-three people give a better than even chance

The surprise comes from counting pairs rather than people. Twenty-three people form 253 pairs, and each pair has a small chance of matching; the chance that none of them match is what falls quickly. People instinctively compare their own birthday against the others, which is 22 comparisons and gives about 6 percent, and that is a different and much rarer question than whether any two people match. The paradox is a misreading of the question rather than anything counterintuitive about probability.

The same arithmetic governs hash collisions

Replace 365 days with the number of possible hash values and the formula is unchanged. A 64-bit hash has about 1.8 times ten to the nineteen values, and a 50 percent chance of collision arrives at roughly five billion items, not at anything close to the full space. The general rule is that collisions become likely at around the square root of the space size, which is why a 128-bit identifier is chosen for a system that will never hold anything close to 2 to the 128 records: the working number is 2 to the 64.

Random UUIDs are safe because the space is enormous, not because they are unique

A version 4 UUID has 122 random bits. Generating a billion per second for a century gives a collision probability of roughly one in ten billion, which is a defensible engineering answer rather than a guarantee. The uniqueness is probabilistic, and the reason it holds is entirely the size of the space; halving the bits does not halve the safety margin but squares the risk.

Related tools

Frequently Asked Questions

Why does 23 people feel too few?

Because people compare themselves against the group, which is 22 comparisons and about a 6 percent chance. The question asks whether any two of the 253 pairs match, which is a different and much more likely event.

Does this apply to hashes?

Directly. Replace 365 with the number of possible values and the formula is unchanged. Collisions become likely at roughly the square root of the space size.

At what point do 64-bit hashes collide?

A 50 percent chance arrives at about five billion items, which is the square root of the space rather than anything close to the space itself.

Are UUIDs guaranteed unique?

No, they are probabilistically unique. A version 4 UUID has 122 random bits, and the safety comes entirely from the size of the space rather than from any mechanism preventing repeats.

Does the leap year matter?

Marginally, and real birthdays are not uniformly distributed either, which slightly increases the collision chance. The uniform model is close enough for the point it makes.

Privacy & Security

Everything runs in your browser; nothing is uploaded.

Data: None
Client-side-Side
Active
v1.0

How to Use

Enter a group size to see the collision probability.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.