Birthday Paradox Calculator
Enter a group size to find the probability that at least two people share the same birthday. You can also flip to reverse mode and enter a target probability to find the minimum group size needed. The result updates instantly, and a chart shows how the probability grows from 2 to 70 people.
What is the birthday paradox?
The birthday paradox is the surprising result that in a group of just 23 randomly chosen people, the chance that at least two of them share the same birthday exceeds 50%. It is called a paradox not because it breaks any logic, but because the answer contradicts most people's first intuition. Most people reason "I need to compare my birthday against all the others," which suggests a large group is needed. The correct framing is that every possible pair of people can share a birthday, and the number of pairs grows with the square of the group size. In a group of 23 there are 253 pairs, and each one adds a small independent chance of a match.
How the probability is calculated
The calculation uses the complementary approach: it is easier to compute the probability that no two people share a birthday, then subtract from 1. For the first person, any birthday works, so the probability of uniqueness is 365/365 = 1. The second person must avoid the first person's birthday: 364/365. The third must avoid both: 363/365. This continues, multiplying fractions (365-k+1)/365 for each new person k, until all n people are covered. The product is P(no shared birthday). Subtracting from 1 gives the probability of at least one shared birthday: P = 1 - (365/365) x (364/365) x (363/365) x ... x (365-n+1)/365.
Why the result feels so surprising
Human intuition about probability is calibrated to "what is the chance this specific person shares a birthday with me?" For that question, the answer is roughly 1/365 per person, and you would need about 183 people before the odds reached 50%. But the birthday problem asks about any pair sharing any birthday. A group of 23 people has 253 different pairs, each with a small but non-zero chance of matching. When those chances are combined, the total exceeds 50% much sooner than expected. This is the same mathematical structure as the coupon-collector problem, hash collisions in computing, and many other phenomena where the number of interactions grows quadratically.
Leap years, custom year length, and real-world adjustments
This calculator lets you choose between a standard 365-day year, 365.25 days to account for the average effect of leap years, or a full 366-day leap year. The difference in the results is small: the 50% threshold moves from 23 to 24 people when you switch from 365 to 366. The real world adds further wrinkles: birthdays are not actually uniformly distributed across the year (more people are born in certain months in most countries), which slightly lowers the threshold. Some analysts use 364 or 365.2425 for different reasons. For most purposes the standard 365-day model is accurate enough.
Birthday paradox probability milestones
| Group size (people) | Probability (%) | Number of pairs | Interpretation |
|---|---|---|---|
| 5 | 2.71 | 10 | Very unlikely |
| 10 | 11.70 | 45 | Unlikely |
| 15 | 25.29 | 105 | Possible |
| 20 | 41.14 | 190 | Getting likely |
| 23 | 50.73 | 253 | 50-50 threshold |
| 30 | 70.63 | 435 | More likely than not |
| 40 | 89.12 | 780 | Highly probable |
| 50 | 97.04 | 1225 | Near certain |
| 57 | 99.01 | 1596 | 99% threshold |
| 70 | 99.92 | 2415 | Near certainty |
| 100 | 99.9997 | 4950 | Essentially certain |
| 366 | 100.00 | 66795 | Guaranteed (pigeonhole) |
Key group sizes and their probability of at least one shared birthday in a standard 365-day year.
Frequently asked questions
How many people do you need for a 50% chance of a shared birthday?
In a standard 365-day year, you need 23 people for the probability of at least two sharing a birthday to exceed 50% (it reaches approximately 50.73% at exactly 23 people). This number rises to 24 people if you use 366 days for a leap year.
How many people guarantee a shared birthday?
By the pigeonhole principle, if you have more people than there are days in the year, at least two must share a birthday. That means 366 people guarantee a shared birthday in a standard year (all 365 days could be filled by 365 people, so the 366th must match someone), and 367 in a leap year. This gives a probability of exactly 100%.
What is the probability in a group of 30 people?
In a group of 30 people, the probability that at least two share a birthday is approximately 70.63% in a standard 365-day year. There are 435 possible pairs of people in a group of 30, which is why the probability has already climbed well past the 50% mark.
Is this the same as asking if anyone shares my birthday?
No, and this distinction is the heart of the paradox. The question "does anyone in the group share my birthday?" requires you to compare your specific birthday against every other person. For that, you need about 253 people to reach 50%. The birthday paradox asks whether any two people share any birthday, which counts all possible pairs and grows much faster.
Does the distribution of birthdays affect the calculation?
Yes, slightly. This calculator assumes birthdays are uniformly distributed across all days of the year, which is the standard mathematical model. In practice, birthdays are not uniform: more people are born in late summer and early autumn in many countries, and fewer are born on certain public holiday dates. A non-uniform distribution means the true probability of a shared birthday is slightly higher than the uniform model predicts, so the real threshold is actually a bit below 23 people.