Birthday Sharing Odds

Your Birthday | Other People's Birthdays

Other People's Birthdays

To many people, perhaps to most people, one's birthday holds a special place in their heart. Of the 365 possible days you could have been born... one day is yours; it's special. Your birthday is special, in part, because it's unlikely that you know anyone personally that shares your birthday. Indeed, at any given social event, you're very unlikely to find/meet someone who shares your birthday.

However, finding other people that share the same birthday (not yours) is actually quite easy. To those particular people, discovering that they share that same birthday is quite remarkable. But to you, oh reader of this page, you know better.

In fact, get 367 people together, and you are guarranteed to have two people sharing the same birthday. And if you discount leap year babies, you'd only need 366.

Given that certainty, and the fact that you've bothered to read this far, let's ask about smaller social gatherings. Say, a small party. At that party, let's ask the following question:

or put another way: To answer this (these) questions, let's first make some assumptions:
  1. All years have 365 days (we'll ignore leap years)
  2. All birthdays are equally likely (this is not acually true; birthrates vary slightly by season).
  3. You have no prior knowledge of attendees' birthdays (if you already know everybody's birthday... well, there's not much point in doing this exercise, now is there?) The fact that you know your own birthday is OK. Unlike calculating the probability of matches to your own birthday, we'll consider you to be part of the group of party-goers represented by n.
Now, A single person doesn't have anybody to share a birthday with, so let's start with two people at the party instead of a solo deal. With two people, the chances they share the same birthday are pretty slim -- only 1 in 365 (~0.3%). Or conversely, there's a 99.7% chance (364 in 365) that they don't share the same birthday.

For two people (n=2):


For three people (n=3):

Adding a third person to the group starts to get a little complicated. Assuming that person #1 and person #2 don't share the same birthday (otherwise our search criteria would have already been met), then person #3 might share a birthday with person #1 or person #2. Put another way, the only way that person #3 won't share a birthday with someone at the party is if he was born on one of the 363 days remaining in the year -- 365 days minus the 2 already "taken" by the first two guests. For this there is a 363/365 chance, but don't forget we are also assuming that the first two guests have different birthdays.

To help visualize this, imagine a huge calendar laid out on the floor. As people arrive, they go and stand on the spot on the calendar corresponding to their birthday. As they do, the calendar fills up. As more people show up, it becomes more and more likely that their birthday "spot" will already be occupied by an earlier guest. Once that happens, our search criteria has been met -- two guests share the same birthday.

In words:
Probability that at least two of the three people at the party have the same birthday =
(100% of the time) - [ Probability (that Person #1 and Person #2 don't share a birthday) and (that Person #3 doesn't share a birthday with either Person #1 or Person #2) ]

In numbers:


For four people (n=4)

For five people (n=5)

By now you probably see a pattern. With each increase in people, we multiply the quantity within the parentheses by another fraction that is:

where n is the total number of people. In a more instructive (if less simplified) form:

this fraction can be explained as the total number of remaining days in the year [before this last person showed up -- which is where the (n-1) comes from] divided by all the days in the year.
We can keep tacking on additional fractions until we reach 365 people. For 365 people (n=365):

And as you can imagine, once you reach 365, the floor calendar is full. If two matching people have not yet been found, the next person through the door is guarranteed to make a match. That is, once we get 366 people, we're certain to have a match.

In practice, the probability rises so fast that we have a >99.9% chance by the time we hit 69 people. So, for all intents and purposes, the chance of finding at least one match in 365 people is already 100%.

Representing this generally for any number of people (n) is not hard, but unfortunately, the result isn't something your handheld calculator is going to be able to stomach. So, I'll be giving you a partial table of probabilities a little later to help with betting. To derive the general expression, let's start by taking the five person example above (n=5):

which we can rearrange to:

You'll notice that all those 365's in the donominator are easily handled by an exponential:

The top part is more tricky. With those descending numbers all being multiplied together, it looks like the factorial 364! (a VERY large number), except the factors don't go all the way to 1. But, if we're willing to do some big time cancellations (unfortuantely, your handheld calculator probably isn't), we can use two factorials to accomplish our goal:

The 360! in the bottom cancels with 360! in the top, leaving us with the desired (364 · 363 · 362 · 361) in the top.


This is pretty nice, because now we can create a general expression for the probability (x) using the number of people present (n):

Or to be a bit more tidy, we can multiply the overall fraction by 365/365 and rearrange to yield this equivalent:

Let's return to the original question(s) posed at the top of the page. Because, really, you wouldn't have read this far unless you were really interested in winning money off of your friends at parties: Now that we have a general equation, in theory we could figure this out straight away. In practice, however, neither my handheld calculator, nor Microsoft Excel is willing to calculate 365!, so I present a table here instead. However, to answer the question, it's 23 people. The probability of any two people sharing a brithday within a group of 23 people is 0.5073.

Now, here's that table:
# of people (n)ProbabilityFair OddsRecommended odds
20.0027(1:364)(1:400)
30.0082(1:121)(1:150)
40.0164(1:60)(1:70)
50.0271(1:36)(1:40)
100.1170(1:8)(1:10)
150.2529(1:3)(1:4)
200.4114(2:3)(1:2)
250.56873:2even
300.70633:12:1
350.81444:13:1
400.90328:15:1
450.948318:115:1
500.970433:130:1
550.986372:150:1
600.9941169:1150:1
The probabilities given above are accurate within the assumptions we made near the top of this page. The recommended odds are for making money. That is, if you give those odds (or take odds in the case of those in parentheses), over the long term you can expect to come out ahead. However, many people underestimate the chances of finding two people with the same birthday, and so are willing to make an even money bet against even fairly large groups. So, a good strategy might simply be to offer even money for groups larger than 25. However, a bold 10:1 offer if you know the group to be larger than 45 people is sure to start a conversation... Although, they may simply accuse you of prior knowledge.

As long as we're talking about betting, here are some things to remember:

  1. Don't blame me, this page, or the entity hosting it if you lose a bet, even if it's because I gave you misleading, bad, or erroneous advice and/or data.
  2. Do not bet money you are not already resigned to lose.
  3. People do not like losing money, and will likely begrudge you for taking it from them. This can be counterproductive socially. It can also lead to various bad things including expulsion from parties, loss of friends, injury, and death.
Having said that, it's also worth pointing out that discovering two birthday-sharing people can be a fun and social activity. The most direct method involves individually querying a significant number of people, convincing them you are simply a nerd and not a psycho, writing down their birthdays, and finally, coming up with a scheme to identify them later if you find their match (a very important practical consideration). For certain people, this can be fun. If nothing else, it gives you an excuse to introduce yourself to strangers without the risk of trapping yourself in a long and boring conversation.
Why does the probability of people sharing a birthday rise so fast as the number of people increases?

Good question. Indeed, the fact that a group of 23 people has a 50% chance that at least two people share a birthday does strike many people as unusual. After all, the chance of finding a match for your own birthday in a group of 23 people (excluding yourself) is only 6%. You would need to gather a group over 10 times that size (253 people) to have a 50% chance of finding someone with your own birthday.

So, why the big difference? The general explanation is that, in both cases, your chances of finding a match increase with increasing numbers of people (n). That just makes good sense. However, in the case of searching for people that match your own birthday, the probability that your will find a match with any given person is fixed -- about 364/365 or about .00274. The situation is different when you no longer care about any particular birthday, but rather just matches in general. In that case, the chance of finding a match with any given person is not fixed, but rather depends on the number of people in the group (n). This makes sense, because as n increases, so do the number of ways we can find a match for any newcomer to the party.

To help understand this, consider the case of a group of 118 people. Instead of asking people their birthday, we'll just roll a die for each person, and we'll consider them a match if we roll a '1'. In both cases (i.e., searching for your birthday, or searching for any two people with the same birthday) we get to roll the die once for each person -- 118 times in each case. However, the type of die in each case is different. In the case of searching for your own birthday, the die has 365 sides (only one represents your birthday). In contrast, when searching for any two people that match you get to roll a 6-sided die (a regular cube-shaped die). As you can imagine, it's much easier to roll a '1' using 118 throws of a 6-sided die than it is to roll a '1' using the same number of throws of a 365-sided die.

OK, sure, rolling a certain number is easier when you use dice with 6 sides than dice 365 sides. But where are you getting this 6-sided die for 118 people? What's that all about?

Admittedly, the 6-sided die is a little contrived, but in representing the probabilities involved, it is accurate nonetheless. Let me explain.


In the case of finding matches to your own birthday, we find that the probability of finding a match (x) is dependent on the number of people in the group (excluding yourself) (n) such that:

That is, 100% minus [the Probability (that you don't find a match with Person #1) and (that you don't find a match with Person #2) and (that you don't find a match with Person #3) and ... etc until you reach Person #n]. This is exactly like rolling a 365-sided die for each person in the group. You're never guarranteed to roll a particular number (e.g., '1'), but given enough rolls you'll probably do it.
In the case of finding any two people that have matching birthdays, we found the probability (x) was:

It's somewhat difficult to understand what this expression means. To help ourselves, let's suppose (as we did above), that this expression can be represented by rolling dice a number of times dictated by the number of people in our group (n), but that the type of die that we roll, in turn, depends on n as well. That's actually not difficult. We're simply looking for a way to represent the above equation so that it looks like:

where y is just some equation that involves n (i.e., y is a function of n). To figure out what that function is, we set the two equations equal to each other and solve for y.

a little subtraction and multiplication gets us to

which then allows us to take the nth root of both sides and get an expression for y:

which I find a little more tidy as:

We now have a new, but still equivalent, way of expressing the probability of two people within a group sharing the same birthday:

Grand. But, let be clear about what y means. It's a way to shoehorn our "real" expression for sharing birthdays into a expression that can be represented by throwing dice. You might think of y as being an "equivalent per person" probability of finding a match. But really, if you're going to derive the proper probabilities for the group (as we did earlier in the page), you don't use y.
Like I said before, in the case of finding people that share your birthday, we can simply say y = 364/365 or .00274 no matter how big n gets. But in the case of looking for any two people that share the same birthday, y gets bigger as n gets bigger. Exactly how y and n are related in this case is what we just solved for. Unfortunately, as we've encountered before, 365! isn't something your handheld calculator, or even Micorsoft Excel is willing to compute for you, so I've made a graph. I'll also mention a few highlights.

As you can see from the graph, y starts out the same in both cases [this makes sense -- consider a group of 2 people (including yourself)], but as you can see, y gets big quite quickly when you're not looking for matches to your own birthday. In fact, by the time the group has grown to 20 people, y is 10 times larger for finding any two matches than for finding a match to your own birthday.

I mentioned before that 23 people is around the 50/50 spot for finding a pair of people with matching birthdays. At 23 people, y = 0.032 (~1/30). So, continuing with our dice-rolling analogy, you would have 23 rolls to roll a '1' on a 30-sided die. The fact that your chances of doing this is about 50/50 may be intuitive. To be sure, this is a lot easier than rolling a '1' on a 365-sided die in as many tries!

I also mentioned that at 69 people, there is a greater than 99.9% chance that at least two people will share a birthday. At 69 people, y = 0.096 (~1/10). So, that's like having 69 chances to roll a '1' on a 10-sided die. Too true, one would be very surprised to not roll a '1' during such a trial.

Around 300 people, y gets close to 0.5, which is like flipping a coin for every person, and you need only get a single 'heads' to garner a match. In 300 flips of a coin, there's essentially no way that you won't see it come up 'heads' at least once.

Right at 365 people, y is not close to 1, which you might have otherwise expected. Instead, the last entry for y is 0.630. The fact that this is equivalent to 1 - (1/e) is probably no accident, but I'm at a loss to explain why, especially since it doesn't appear to approach this value asymptotically. If you can explain why this happens, I'd love to hear from you.

Happy Birthday.

Noca's Home Page