The birthday paradox, explained
How many people do you need in a room before it is more likely than not that two of them share a birthday? Most people guess somewhere around 180, half the days in a year. The real answer is 23.
It is called the birthday paradox, although nothing about it is contradictory. It is simply a result that our intuition gets badly wrong. Move the slider below to see the odds for any group size, then fill ten thousand imaginary rooms and check that reality agrees with the formula.
Try it yourself
50.7% chance that at least two of them share a birthday. 23 people make 253 different pairs.
The odds for different group sizes
The chance of a shared birthday climbs far faster than the size of the group. It passes one half at 23 people and is close to certain long before the room holds as many people as there are days in the year.
| People | Pairs of people | Chance of a shared birthday |
|---|---|---|
| 5 | 10 | 2.7% |
| 10 | 45 | 11.7% |
| 15 | 105 | 25.3% |
| 20 | 190 | 41.1% |
| 23 | 253 | 50.7% |
| 30 | 435 | 70.6% |
| 40 | 780 | 89.1% |
| 50 | 1,225 | 97.0% |
| 57 | 1,596 | 99.0% |
| 70 | 2,415 | 99.9% |
These figures assume 365 equally likely birthdays and ignore 29 February. Only with 366 people is a match guaranteed, yet 57 people already get you to 99%.
Why our intuition gets it wrong
When people hear the question, they quietly answer a different one: how many people would it take for someone to share my birthday? That really does need a big crowd. With 23 people in the room, the chance that one of the other 22 shares your particular birthday is under 6%, and you need 253 people before it passes one half.
But the question is not about you. It asks whether any two people match, and the number of pairs grows much faster than the number of people. Two people make one pair. Ten people make 45 pairs. Twenty-three people make 253 pairs, and every one of those pairs is a separate chance of a match.
Each individual pair is unlikely to match: the chance is 1 in 365. But 253 unlikely chances add up. The chance that all 253 pairs miss is roughly 364/365 multiplied by itself 253 times, which comes to almost exactly one half.
The calculation, step by step
The neat way to work it out is to calculate the opposite: the chance that everybody has a different birthday. Then subtract that from 1.
- The first person can have any birthday: 365 choices out of 365.
- The second must avoid the first person's day: 364 out of 365.
- The third must avoid two days: 363 out of 365.
- Carry on until the 23rd person, who must avoid 22 days: 343 out of 365.
- Multiply all 23 fractions together. The result is 0.493, a 49.3% chance that nobody shares.
- Subtract from 1. That leaves a 50.7% chance that at least two people share a birthday.
The simulator at the top of this page does the same multiplication for whatever group size you choose, and the curve shows how quickly the answer rises.
Does it hold in real life?
It does, and there is a tidy natural experiment. Squads at the football World Cup have had 23 players, exactly the tipping point. A BBC analysis of the 2014 tournament found that 16 of the 32 squads contained at least one pair of players with the same birthday: half of them, just as the maths predicts.
Real birthdays are not spread perfectly evenly. In many countries more babies are born in late summer and early autumn, and fewer around major holidays. That unevenness can only help: when some days are more popular than others, matches become slightly more likely, not less. The formula gives the minimum.
The same effect on a spinning wheel
Swap birthdays for slices and the paradox explains something every wheel user notices: repeats turn up much sooner than feels right. On a wheel with equal slices, the chance of seeing the same result twice within a set of spins follows exactly the same sum.
| Wheel | Spins for a repeat to be more likely than not | Chance of a repeat by then |
|---|---|---|
| 10 slices | 5 | 69.8% |
| 100 slices (1 to 100) | 13 | 55.7% |
| 365 slices | 23 | 50.7% |
| 1,000 slices (1 to 1,000) | 38 | 50.9% |
So if the number wheel set to 1 to 100 gives you the same number twice in a dozen spins, nothing is broken. It is a little more likely than not after thirteen. If you need every result to be different, as in a raffle or a bingo call, switch the wheel to Elimination mode so each winner is removed. To check for yourself that the wheel is even, open its Odds tab and run the fairness test.
Where the birthday problem matters
The idea reaches well beyond party trivia. In computing, a hash function turns a file or a password into a short fingerprint, and two different inputs with the same fingerprint are called a collision. Collisions behave like shared birthdays, so they arrive after roughly the square root of the number of possible fingerprints, far sooner than a naive guess. A 64-bit fingerprint has more than 18 billion billion possible values, yet a collision becomes likely after only about five billion items. Cryptographers call exploiting this a birthday attack, and it is the reason secure fingerprints are made so long.
The same reasoning tells engineers how long a random ID must be before two customers are likely to be given the same one, and it warns investigators not to be too impressed by coincidences. In a large enough set of people, cases or numbers, some striking match is almost certain to exist somewhere. Our guide asking is computer randomness really random? covers more of what random numbers do behind the scenes.
Frequently asked questions
How many people do you need for a 50% chance of a shared birthday?
Twenty-three. With 23 people the chance that at least two share a birthday is 50.7%, assuming 365 equally likely birthdays.
Why is it called a paradox?
It is not a true paradox, because nothing about it is contradictory. The name stuck because the answer is so far from what most people expect.
How many people are needed for someone to share my birthday?
Far more. You need 253 other people for a better than even chance that at least one of them shares your specific birthday. The famous figure of 23 is about any two people matching.
How many people make a shared birthday 99% likely?
Fifty-seven people give a 99% chance. Seventy people give 99.9%.
Do leap years or uneven birth rates change the answer?
Only slightly. Including 29 February lowers the odds by a tiny amount, while the real-world unevenness of birth dates raises them a little. Twenty-three remains the tipping point.