Birthday Paradox Calculator
Calculate the probability of shared birthdays in a group. Visualize the Birthday Paradox with exact probabilities, interactive charts, and threshold analysis.
| Person # | P(no match so far) | P(≥1 match) |
|---|
About
The Birthday Paradox states that in a group of just 23 people, the probability of at least two sharing a birthday exceeds 50%. This result is counterintuitive because humans compare themselves against the group (1⁄365) rather than counting all n(n − 1)2 pairwise comparisons. The paradox is not a true paradox but a failure of probabilistic intuition. Misunderstanding this principle leads to flawed collision estimates in hash functions, flawed cryptographic nonce generation, and underestimation of duplicate risk in datasets. This calculator computes exact probabilities using the complement method with logarithmic accumulation to maintain numerical precision for groups up to 10,000. It assumes uniformly distributed birthdays across d days and ignores leap years by default, though a custom day count is supported.
Formulas
The probability that all n people in a group have distinct birthdays across d possible days is computed as:
The probability of at least one shared birthday is the complement:
For numerical stability with large n, the logarithmic form is used:
The well-known approximation using the Taylor expansion ln(1 − x) ≈ −x yields:
Where: n = number of people in the group, d = number of possible equally-likely birthdays (default 365), k = iteration index, P(match) = probability that at least two people share a birthday.
Reference Data
| Group Size (n) | Probability of Shared Birthday | Odds (approx.) | Notable Context |
|---|---|---|---|
| 2 | 0.274% | 1 in 365 | Single pair comparison |
| 5 | 2.71% | 1 in 37 | Small team |
| 10 | 11.69% | 1 in 9 | Dinner party |
| 15 | 25.29% | 1 in 4 | Small classroom |
| 20 | 41.14% | 2 in 5 | Tutorial group |
| 23 | 50.73% | Better than even | The classic threshold |
| 30 | 70.63% | 7 in 10 | School class |
| 40 | 89.12% | 9 in 10 | Large lecture section |
| 50 | 97.04% | 33 in 34 | Office floor |
| 57 | 99.01% | 100 in 101 | 99% threshold |
| 70 | 99.92% | 1,249 in 1,250 | Near certainty |
| 100 | 99.99997% | 3.3M in 3.3M+1 | Lecture hall |
| 183 | > 99.999...% | Pigeonhole imminent | Half of 365 |
| 366 | 100% | Guaranteed | Pigeonhole Principle |
| All values assume d = 365 equally likely days (no leap year). | |||