The birthday paradox
With just 23 people, a shared birthday is more likely than not. The trick is counting pairs, not people.
Count pairs, not people
The paradox feels wrong because we picture ourselves: the chance that someone among 22 others shares your birthday is only about 6%. But any two people matching counts. With 23 people there are 23 × 22 / 2 = 253 different pairs, and each pair has a 1-in-365 chance of matching. That many chances add up fast.
The exact calculation
It is easier to compute the chance that nobody matches. Person 2 must avoid person 1's birthday (364/365), person 3 must avoid both (363/365), and so on:
P(all different) = 365/365 × 364/365 × 363/365 × … × (365 − n + 1)/365
For n = 23 that product is 0.4927, so the chance of at least one shared birthday is 1 − 0.4927 = 50.73%. With 57 people it passes 99%, and with 70 people it is 99.9%.
Assumptions
The calculation ignores 29 February and assumes every birthday is equally likely. Real births cluster somewhat (in the US more are born in September), which makes matches slightly more likely than this model says.
The same maths explains "birthday attacks" on cryptographic hash functions. The number of pairs comes from combinations: see the combination calculator.
Still not clicking? Ask the tutor
An AI tutor that sees the numbers you entered above and explains them. It can make mistakes, so check anything important against the worked steps.
Questions students ask
How many people do you need for a 50% chance of a shared birthday?
23. The probability is 50.73% with 23 people, about 70.6% with 30 and 97.0% with 50, assuming 365 equally likely birthdays.
How is the birthday probability calculated?
Work out the chance that everyone is different: (365/365) × (364/365) × … × ((365 − n + 1)/365). Subtract it from 1 to get the chance of at least one match.
Why does it feel wrong?
We imagine someone matching our own birthday, which really is unlikely. But 23 people form 253 different pairs, and any one of them matching counts.
Where is the birthday paradox used?
In computer security, the "birthday attack" uses the same maths to find hash collisions much faster than intuition suggests, and in checking how often random IDs clash.