Skip to content
MasterMath

Birthday Paradox Calculator

In a group of just 23 people there is already better than a 50 % chance that two share a birthday. Check the figure for any group size.

That at least two match

—

That at least two match—
That nobody matches—
Possible pairs—
People needed to reach 50 %—

How this was worked out

    The formula

    P(any match) = 1 − (365/365 × 364/365 × … × (365−n+1)/365)

    Where it comes from

    It is worked out through the complement because that is far easier: the probability that everyone has a different birthday is the product of knocking one day off for each person. What is left after subtracting from one is the probability of at least one match.

    How to work it out by hand

    1. Work out the chance that everyone has different days: 365/365 × 364/365 × 363/365…
    2. Multiply as many factors as there are people
    3. Subtract the result from 1

    What is worth knowing

    It feels wrong because the brain compares everyone against oneself, and for that you do need around 253 people to reach 50 %. But the question is a different one: every possible pair is compared against every other, and a group of 23 holds 253 pairs. Hence the coincidence of figures, which is no coincidence at all. Cryptography uses it under the name birthday attack: it explains why an n-bit hash function falls to a collision in the order of 2^(n/2) attempts rather than 2^n.

    Frequently asked questions

    Why is 23 people already over 50 %?

    Because it is not each person against one fixed person, but every pair against every other: a group of 23 holds 253 pairs.

    How many people make it certain?

    366 guarantee a match. At 70 people it is already past 99.9 %.

    What about someone sharing my birthday specifically?

    That is a different question, and it needs about 253 people to reach 50 %.

    Is this useful for anything beyond a curiosity?

    Yes, for the birthday attack in cryptography: it is why finding collisions in a hash function is far easier than it looks.