Birthday Paradox Calculator - Group Size & Collision Probability
Math Calculators
Calculate the probability that at least two people in a group share a birthday. See why just 23 people gives a 50% chance and visualize the probability curve.
50.73%
probability that at least two people share a birthday in a group of 23 (with 365 day year)
Probability all birthdays are different
49.27%
Possible pairs checked
253
Any one pair matching counts as a collision.
Expected matching pairs
0.6932
Under uniform independent birthdays, each of the 253 pairs has a 1 / 365 chance to match.
Minimum for 50%: 23 people (actual probability 50.73%)
Different question: does someone match your birthday?
For a fixed person, P(at least one match) = 1 − ((days − 1) / days)^(group size − 1). With 23 people and 365 equally likely birthdays, that probability is 5.86%. The classic result asks whether any pair matches, which is a different question.
How to use this tool
- Enter the group size to see the probability of a shared birthday.
- Adjust the number of days in a year (default 365) for other scenarios.
- View the curve chart to see how probability rises with group size.
Why Is It a Paradox?
Most people intuitively guess you need ~180 people to have a 50% chance of a shared birthday. The real answer - just 23 - feels deeply wrong. The key insight is that every pair of people is checked, not just "does someone share my birthday." With 23 people there are 253 unique pairs, which quickly accumulates probability.
The probability formula
It is easier to calculate the complement - the probability that no two people share a birthday:
P(no match) = 365/365 × 364/365 × 363/365 × … × (365 − n + 1)/365
P(at least one match) = 1 − P(no match)
Each fraction represents the probability that a new person's birthday is different from all previously checked people. As more people are added, the product shrinks rapidly.
Probability table
| People (n) | Probability of a shared birthday |
|---|---|
| 5 | 2.7% |
| 10 | 11.7% |
| 15 | 25.3% |
| 20 | 41.1% |
| 23 | 50.7% - crosses 50% |
| 30 | 70.6% |
| 40 | 89.1% |
| 50 | 97.0% |
| 57 | 99.0% |
| 70 | 99.9% |
Generalizations
The paradox generalizes to any scenario with a fixed number of equally likely outcomes:
- Days of the week (7 options): only 4 people are needed for a >50% chance of two sharing a weekday birthday.
- Months of the year (12 options): only 5 people needed to exceed 50%.
- Hash collisions: the same math applies to cryptographic hash functions. A 256-bit hash needs approximately 2¹²⁸ hashes before a collision is likely - an astronomically large number, which is why SHA-256 is considered collision-resistant in practice.
Frequently asked questions
Why is 23 people enough for a 50% chance?
With 23 people there are C(23,2) = 253 unique pairs, each with a small chance of a match. When you multiply the complements together the no-match probability falls below 50%, making a match more likely than not.
Does this assume every birthday is equally likely?
Yes. The classic formula assumes a uniform distribution. In reality some dates are slightly more common, which slightly increases collision probability.
Related tools
- Probability CalculatorCombine the collision probability with complements or another event.
- Permutations & CombinationsInspect the counting principles that make pair collisions grow so quickly.
- Distribution CalculatorCompare collision behavior with other discrete probability models.
- Random NumbersGenerate bounded random values for a simple collision simulation.