Birthday Paradox Calculator

Written by Thierno Sadou Diallo, formula verified per our methodology • Last checked on 12/5/2026

In a group of 23 people, the probability that two of them share a birthday is 50.7%. It reaches 97% with 50 people. But the probability that someone shares YOUR birthday is only 5.9% with 23 people.

Explanation

The birthday paradox is not a logical contradiction, but a result that defies intuition. How many people do you need to gather for a better than even chance that two were born on the same day of the year? Most people answer about 183, half of 365. The right answer is 23. Intuition goes wrong because it thinks of its own birthday, whereas the question is about any pair of people. In a group of 23 there are 23 × 22 ÷ 2 = 253 possible pairs, and each one is a chance for a match. The calculation goes through the opposite event: the probability that all birthdays are different. The second person must avoid the first person's day, with probability 364 out of 365; the third must avoid two days, 363 out of 365; and so on. You multiply these fractions, then subtract the result from 1. For 23 people, you get 49.3% for all-different birthdays, hence 50.7% for at least one match. The calculation assumes 365 equally likely days and ignores February 29; in reality, births are not quite uniform across the year, which slightly raises the probability of a match. The same reasoning applies to other draws: with 12 birth months, 5 people are enough to pass 50%. In computing, it explains how often collisions occur in hash functions, and the birthday attack in cryptography. For other counting problems, use the permutations and combinations calculator; for the probability of a number of successes over several trials, the binomial distribution calculator.

Example: a class of 23 students

Inputs

23 people, 365 possible days.

Calculation

Probability that all birthdays differ = 365/365 × 364/365 × 363/365 × … × 343/365 ≈ 0.4927. Probability of at least one match = 1 − 0.4927 = 0.5073. Sharing YOUR day = 1 − (364/365)^22 ≈ 5.9%.

Result

There is a slightly better than even chance that two students share a birthday.

Frequently asked questions

Why 23 and not 183?

Because a match can happen between any two people in the group, not just with you. 23 people form 253 pairs, which multiplies the opportunities for a match.

How many people make a match certain?

Ignoring February 29, 366 people: there are then more people than days, so two must share a date. This is the pigeonhole principle. In practice, the probability exceeds 99.9% from 70 people.

Since births are unevenly spread, is the calculation wrong?

It is slightly conservative: a non-uniform spread makes matches a little more likely than in the theoretical calculation. The difference is small for real populations.

Related resources

Similar calculators