How to Calculate the Probability of a Shared Birthday
At a glance
- 1. Set the assumptions
Assume birthdays are independent and equally likely on 365 days, with leap day excluded.
- 2. Find no matches
Calculate the probability that every person has a different birthday by multiplying successive remaining-day fractions.
- 3. Take the complement
Subtract the no-match probability from 1 to get the probability of at least one shared birthday.
- 4. Check the group size
For more than 365 people, a shared birthday is guaranteed under the 365-day model.
The probability depends on how many people are in the group. The usual birthday-problem model assumes 365 possible birthdays, excludes February 29, and treats each person’s birthday as independent and equally likely on any day.
Under those assumptions, calculate the probability that everyone has a different birthday, then subtract that probability from 1. This complement method is much simpler than counting every possible way a pair or larger group could match.
The formula
For the first person, any birthday is possible. For the second person to avoid a match, 364 of the 365 dates remain. For the third person, 363 dates remain, and so on.
For people, the probability that all birthdays are different is
Therefore, for ,
The equivalent factorial form is
For or , the probability is 0: there are not enough people for a shared birthday. If , the probability is 1 by the pigeonhole principle, because more than 365 people must occupy at least one of the 365 birthday dates.
Worked example: 23 people
For 23 people, the probability that all birthdays differ is
So the probability that at least two people share a birthday is
That is about 50.7%. The result can feel surprising because the comparison is between every pair of people, not just between each person and one chosen birthday. With 23 people there are distinct pairs that could match.
For comparison, with 10 people the no-match probability is
so the chance of at least one shared birthday is about , or 11.7%.
What “at least two” means
“At least two people have the same birthday” means there is one or more matching pairs. It does not mean that exactly one pair matches, nor does it require three people to share a date. The complement calculation includes every outcome with a match: one pair, several separate pairs, or a group of three or more.
If you instead want the chance that exactly one pair shares a birthday and everyone else has a different date, that is a different event and needs a separate count.
Common mistakes
- Leaving out the group size: The answer cannot be a single probability unless the number of people is specified. Use the formula with the given .
- Counting only one pair: There are many possible pairs in a group. The complement method accounts for all of them at once.
- Multiplying match probabilities: Pair-match events overlap and are not independent. Multiplying the chance for one pair by the number of pairs does not give the exact probability.
- Using the wrong number of dates: The standard calculation uses 365 days. Including February 29 changes the model to 366 dates; real birthday frequencies are also not perfectly uniform.
The 365-day result is a useful idealized estimate. If you have actual birthday-frequency data for a population, use those day-specific probabilities instead of assuming every date is equally likely.
References
- Sheldon Ross, A First Course in Probability
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.