What Is the Birthday Paradox?
The birthday paradox (or birthday problem) asks a deceptively simple question: in a group of n people, what is the probability that at least two of them share the same birthday? The surprising answer is that you only need 23 people for the odds to exceed 50%, and just 70 people pushes the probability above 99.9%. It feels paradoxical because people instinctively compare against their own birthday, when in fact every pair in the group is a chance for a match.
How to Use This Calculator
Enter the group size n (the number of people) and read off the probability p(n) that at least one pair shares a birthday, shown as a percentage. The result table also shows the complementary probability that all birthdays are different. The calculator assumes a 365-day year with every day equally likely and ignores leap-year February 29 births.
The Formula Explained
It is easiest to compute the probability that no one shares a birthday and then subtract from 1. The first person can have any birthday (\(365/365\)). The second must avoid the first (\(364/365\)), the third must avoid the first two (\(363/365\)), and so on:
$$\bar{p}(n) = \frac{365}{365} \times \frac{364}{365} \times \cdots \times \frac{365 - n + 1}{365}$$
Then the probability of at least one shared birthday is $$p(n) = 1 - \bar{p}(n).$$ We compute the product iteratively to avoid factorial overflow.
Worked Example
For \(n = 23\), multiplying the 23 fractions gives \(\bar{p}(23) \approx 0.492703\), so $$p(23) = 1 - 0.492703 \approx 0.5073,$$ or about 50.73% — just over a coin flip. For the default \(n = 30\), \(\bar{p}(30) \approx 0.293684\), giving \(p(30) \approx\) 70.63%.
FAQ
Why does it work with so few people? Because a group of 23 people contains 253 possible pairs, and each pair is a fresh opportunity for a match.
What happens at 366 people? By the pigeonhole principle, with only 365 possible days a shared birthday is guaranteed, so the probability is exactly 100%.
Does it account for leap years? No. This model uses 365 equally likely days and excludes February 29, which keeps the classic result clean.