The Birthday Paradox: Why 23 People Is All It Takes
Ask most people how many people fit in a room before two share a birthday. They say 183. The correct answer is 23. Here is the exact math explaining why.
Prefer to explore this visually? Try the Birthday Paradox Calculator →
Ask most people how many individuals you need in a room before it becomes more likely than not that two of them share a birthday. The intuitive answer is somewhere around 183, half of 365. The correct answer is 23. This gap between intuition and reality is so striking that mathematicians have given it a name: the birthday paradox. It is not a paradox in the logical sense. It is a paradox of intuition.
Why the intuition fails
When people estimate the problem, they unconsciously frame it as: "What is the probability that someone shares MY birthday?" That question requires around 253 people for a 50% chance. But the actual question is different: "What is the probability that ANY two people in the room share a birthday?" This includes all possible pairs, not just pairs involving you.
In a group of 23 people, there are 253possible pairs. Each pair has a 1/365 chance of sharing a birthday. That is a large number of chances for a match to occur.
The exact calculation
It is easier to calculate the probability that NO two people share a birthday, then subtract from 1. For a group of n people, the probability that all birthdays are different:
P(no match) = (365/365) × (364/365) × (363/365) × ... × ((365−n+1)/365) For n = 23: P(no match) ≈ 0.4927 P(at least one match) = 1 − 0.4927 ≈ 0.5073
Just over 50%. The crossover happens precisely at 23 people.
How it grows
| People | Probability of shared birthday |
|---|---|
| 10 | 11.7% |
| 20 | 41.1% |
| 23 | 50.7% |
| 30 | 70.6% |
| 40 | 89.1% |
| 50 | 97.0% |
| 57 | 99.0% |
| 70 | 99.9% |
| 366 | 100.0% (pigeonhole principle) |
The deeper principle
The birthday paradox illustrates a general pattern: problems involving pairwise comparisons grow combinatorially, not linearly. When you add one person to a group of n, you are not adding one new birthday to check. You are adding n new pairs. The number of pairs in a group of n people is n(n-1)/2, quadratic growth.
Our Birthday Paradox Calculator lets you slide through group sizes from 2 to 366 and watch the probability curve build. Notice how flat it starts, how steeply it rises through the 20–50 range, and how it reaches exactly 100% at 366, because with 366 people, the pigeonhole principle guarantees at least one shared birthday regardless of probability.
A quick formula you can use anywhere
The exact calculation multiplies many fractions, but there is an excellent shortcut. With n people and d equally likely days, the number of pairs is n(n − 1)/2, and each pair matches with probability 1/d. The chance of at least one match is approximately:
P(match) ≈ 1 − e^( −n(n − 1) / (2d) ) n = 23, d = 365: 1 − e^(−253/365) ≈ 0.500 (exact answer: 0.507)
The formula shows why the paradox works: what matters is the number of pairs, which grows roughly with the square of the group size. Twenty-three people form 253 pairs, and each one is a chance for a match. By 70 people a shared birthday is a 99.9% certainty.
Near matches are even more likely
Statisticians Persi Diaconis and Frederick Mosteller (1989) studied coincidences of all kinds. One of their examples: if you count birthdays on the same day or on adjacent days as a match, you need only 14 people for a better than even chance. Our own simulation of this question gives about 53% for 14 people.
The law of truly large numbers
Diaconis and Mosteller also stated what they called the law of truly large numbers: with a large enough number of opportunities, any outrageous thing is likely to happen. A one-in-a-million coincidence happens to about 300 people a day in a country of 300 million. The birthday problem is the classroom version of this idea, and it explains many stories of "impossible" coincidences in the news.
Beyond birthdays
The same mathematics appears in computer security, where it is called a "birthday attack". A digital fingerprint (hash) with 2^64 possible values can be expected to produce a collision after only about 2^32 random inputs, the square root of the number of possibilities, which is why modern systems use much longer fingerprints.
Question: Using the approximation, roughly how many people do you need for a 50% chance that two share the same birth month (d = 12)?
Answer: Solve n(n − 1)/24 ≈ ln 2 ≈ 0.69, so n(n − 1) ≈ 16.6, giving n ≈ 5. With only 5 people there is already about a 62% chance (exact value) of a shared birth month.
References and further reading
Peer-reviewed research behind this page. Links open the official publisher page; free PDFs are marked. Browse every source in our Research Library.
- Diaconis, P. and Mosteller, F. (1989). Methods for Studying Coincidences. Journal of the American Statistical Association, 84(408), 853 to 861.
Two Harvard and Stanford statisticians explain why "amazing" coincidences, including shared birthdays, are expected once you count all the ways they could happen.
Read the paper ↗DOI: 10.1080/01621459.1989.10478847 - Tversky, A. and Kahneman, D. (1974). Judgment under Uncertainty: Heuristics and Biases. Science, 185(4157), 1124 to 1131.
One of the most cited papers in social science. It describes the mental shortcuts that make people misjudge probabilities.
Read the paper ↗DOI: 10.1126/science.185.4157.1124
Put the theory into practice
Continue Reading
The House Edge: What 2.70% Actually Means Over Time
8 min readProbability Deep DiveThe Law of Large Numbers: Why More Flips Always Wins
6 min readProbability Deep DiveWhy the Bell Curve Appears Everywhere: The Central Limit Theorem
7 min read