How many people must be there in a room to make the probability 50% that at least two people in the room have same birthday?

I am a former maths teacher and owner of DoingMaths. I love writing about maths, its applications, and fun mathematical facts.

How many people must be there in a room to make the probability 50% that at least two people in the room have same birthday?

The Birthday Paradox

ArdFern - Wikimedia Commons

What is the Birthday Paradox?

How many people do you need to have in a room before the probability that at least two people share the same birthday reaches 50%? Your first thought might be that as there are 365 days in a year, you need at least half that many people in the room, so maybe you need 183 people. That seems like a sensible guess and many people would be convinced by that.

However, the surprising answer is that you only need to have 23 people in the room. With 23 people in the room, there is a 50.7% chance that at least two of those people share a birthday.

Don't believe me? Read on to find out why.

Probability is one of those areas of mathematics that can seem quite easy and intuitive. However, when we try and use intuition and gut feeling for problems involving probability, we can often be a long way off the mark.

One of the things that makes the birthday paradox solution so surprising is what people think of when they are told two people share a birthday. The initial thought for most people is how many people need to be in the room before there is a 50% chance of somebody sharing their own birthday. In this case, the answer is 183 people (just over half as many people as there are days in the year).

However, the birthday paradox doesn't state which people need to share a birthday, it just states that we need any two people. This vastly increases the number of combinations of people available which gives us our surprising answer.

Now we've had a bit of an overview, let's look at the mathematics behind the answer.

In this hub, I have assumed that every year has exactly 365 days. The inclusion of leap years would lower the given probabilities slightly.

Two People in the Room

Let's start off simply by thinking about what happens when there are just two people in the room.

The easiest way to find the probabilities that we need in this problem will be to start off by finding the probability that the people all have different birthdays.

In this example, the first person could have a birthday on any of the 365 days of the year, and in order to be different, the second person must have their birthday on any of the other 364 days of the year.

Therefore Prob(no shared birthday) = 365/365 x 364/365 = 99.73%

Either there is a shared birthday or there isn't, so together, the probabilities of these two events must add up to 100% and so:

Prob(shared birthday) = 100% - 99.73% = 0.27%

(Of course, we could have calculated this answer by saying the probability of the second person having the same birthday is 1/365 = 0.27%, but we need the first method in order to calculate for higher numbers of people later).

Three People in the Room

What if there are now three people in the room?

We are going to use the same method as above. In order to have different birthdays, the first person can have a birthday on any day, the second person must have their birthday on one of the remaining 364 days and the third person must have their birthday on one of the 363 days not used by either of the first two. This gives:

Prob(no shared birthday) = 365/365 x 364/365 x 363/365 = 99.18%

As before, we take this away from 100% giving:

Prob(at least one shared birthday) = 0.82%.

So with three people in the room, the probability of a shared birthday is still smaller than 1%.

Four People in the Room

Carrying on with the same method, when there are four people in the room:

Prob(no shared birthday) = 365/365 x 364/365 x 363/365 x 362/365 = 98.64%

Prob(at least one shared birthday) = 100% - 98.64% = 1.36%.

This is still a long way off the 50% that we are looking for, but we can see that the probability of a shared birthday is definitely rising as we would expect.

Ten People in a Room

As we are a long way from reaching 50%, let's jump a few numbers and calculate the probability of a shared birthday when there are 10 people in a room. The method is exactly the same, only there are more fractions now to represent more people. (By the time we get to the tenth person, their birthday cannot be on any of the nine birthdays owned by the other people, so their birthday can be on any of the remaining 356 days of the year).

Prob(no shared birthday) = 365/365 x 364/365 x 363/365 x ... x 356/365 = 88.31%

As before, we take this away from 100% giving:

Prob(at least one shared birthday) = 11.69%.

So if there are ten people in a room, there is a slightly better than 11% chance that at least two of them will share a birthday.

The Formula

The formula we have been using so far is a reasonably simple to follow one, and fairly easy to see how it works. Unfortunately, it is quite long and by the time we get to 100 people in the room, we will be multiplying 100 fractions together, which will take a long time. We are now going to look at how we can make the formula a little simpler and quicker to use.

How many people must be there in a room to make the probability 50% that at least two people in the room have same birthday?

Creating a formula for the nth term

Explanation

Look at the equation above.

The first line is equivalent to 365/365 x 364/365 x 363/365 x ... x (365 - n + 1)/365

The reason we end at 365 - n + 1 can be seen in our previous examples. The second person has 364 days left (365 - 2 + 1), the third person has 363 days left (365 - 3 + 1) and so on.

The second line is a little trickier. The exclamation mark is called factorial and means all of the whole numbers from that number downwards multiplied together, so 365! = 365 x 364 x 363 x ... x 2 x 1. our multiplication on the top of the first fraction stops at 365 - n +1, and so to cancel out all of the numbers lower than this from our factorial, we put them on the bottom ((365 - n)! = (365 - n) x (365 - n - 1) x ... x 2 x 1).

The explanation for the next line is beyond the scope of this hub, but we get a formula of:

Prob(no shared birthdays) = (n! x 365Cn) ÷ 365n

where 365Cn = 365 choose n (a mathematical representation of the number of combinations of size n in a group of 365. This can be found on any good scientific calculator).

To find the probability of at least one shared birthday we then take this away from 1 (and multiply be 100 to change into percentage form).

Probabilities for different sized groups

Number of peopleProb(shared birthday)

20

41.1%

23

50.7%

30

70.6%

50

97.0%

70

99.9%

75

99.97%

100

99.999 97%

Using the formula, I have calculated the probability of at least one shared birthday for groups of different sizes. You can see from the table, that when there are 23 people in the room, the probability of at least one shared birthday is over 50%. We only need 70 people in the room for a probability of 99.9% and by the time there are 100 people in the room, there is an incredible 99.999 97% chance that at least two people will share a birthday.

Of course, you cannot be certain that there will be a shared birthday until you have at least 365 people in the room.

In order to continue enjoying our site, we ask that you confirm your identity as a human. Thank you very much for your cooperation.

Do you know someone with a birthday today?  

Probably.  Or is the answer “probability”?   

For us here at DragonBox, “probably” gets the mathematical treatment, and turns into “probability”.  Try out this fun fact and impress your friends at school, or at the office, with this remark...

We are all players in the Birthday Paradox

How many classmates does your little one have?  How many co-workers do you have at your office?  How many people are in the coffee shop you’re sitting in right now?  

If there are 23 people in the same room, there is a 50/50 chance that two people have the same birthday.  

Sounds a bit surprising, but it’s mathematically true!  In a room with a certain number of randomly chosen people, a pair of them will probably be born on the same day.  The chances of the pairing increases or decreases depending on the number of people in the room.  In a room of 70 people, there is a 99.9% chance that two people will have the same birthday.  

The "Birthday Paradox” is a fascinating example of probability.  Probability theory is used in mathematics, finance, science, computer science, and game theory, just to name a few.  But let’s take a step back…

How do we learn probability?

To fully understand and learn probability, you must have a solid foundation in less complex forms of mathematics.  Learning math is sort of like playing with blocks.  You have to have a solid foundation in order to keep building.  In math, this foundation is called “number sense”.

Number sense is an intuitive understanding of what numbers are, how they work, and what you can do with them.  Having number sense means that your child will have the ability to understand the relationship between one number to another number.  

Many children lack this essential skill set. Understanding mathematical problems like the “Birthday Paradox” stems from having number sense, this deeper conceptualization of how numbers work.  Giving someone the opportunity to have a solid foundation in math is beyond value.  

Learn more about how you can give the gift of math here!