What is the birthday paradox?
The birthday paradox is the surprising fact that in a group of just 23 people there is a better-than-even chance that two of them share a birthday. It feels wrong because people imagine matching their own birthday, but the calculation counts any matching pair, and the number of possible pairs grows quickly with group size. This is pure probability and applies everywhere.
How to use this calculator
Enter the smallest group size ("Group size from"), the largest ("Group size to"), and optionally change the days in a year (365 by default, or 366 to include February 29). The tool builds a table with one row per group size and reports two probabilities for each: the chance that no two birthdays match, and the chance that at least one pair does. It also tells you the first group size where the match probability reaches 50%.
The formula
Let D be the number of days in a year. The probability that all n people have different birthdays is the product of the shrinking pool of free days: $$\bar p(n) = \frac{D}{D} \times \frac{D-1}{D} \times \cdots \times \frac{D-n+1}{D}$$. The chance that at least one pair matches is simply \(p(n) = 1 - \bar p(n)\). We multiply iteratively to avoid huge factorials, and once n exceeds D the no-match probability is forced to 0 by the pigeonhole principle.
Worked example
With D = 365 and n = 23, multiplying (365/365)(364/365)...(343/365) gives \(\bar p(23) \approx 0.492703\), so $$p(23) \approx 0.507297$$ about a 50.73% chance. For n = 2 the chance is only 0.27%, and by n = 50 it rises to about 97.04%.
Common Thresholds: How Many People for a Given Probability?
The classic birthday paradox surprises people because the probability of a shared birthday grows much faster than intuition suggests. The table below shows the smallest group size \(n\) at which the probability \(P(n)\) of at least one shared birthday first reaches each common threshold, assuming \(D = 365\) days and uniformly distributed birthdays (ignoring leap years and seasonal birth patterns).
| Target probability | Group size \(n\) | Actual \(P(n)\) at that size |
|---|---|---|
| 10% | 9 | 11.6% |
| 50% | 23 | 50.7% |
| 90% | 41 | 90.3% |
| 95% | 47 | 95.0% |
| 99% | 57 | 99.0% |
| 99.9% | 70 | 99.92% |
The most famous milestone is just 23 people, which is enough to make a shared birthday more likely than not. Note that the probability climbs steeply through the middle range — going from a 50% chance at 23 people to a near-certain 99% at only 57 — and then flattens as it approaches 100%, since each additional person adds fewer new pairing opportunities relative to those already present.
FAQ
Why does it cross 50% so early? Because 23 people form 253 distinct pairs, and any of those pairs can match.
Does it account for leap years or birthday clustering? No. It assumes 365 (or 366) equally likely birthdays; real clustering only raises the match probability.
What happens above 365 people? A match is guaranteed, so \(p(n) = 1\).