How many people in your class share a birthday? The answer is probably more than you think. In a class of 30, there’s a good chance – 70% – that two people will be blowing out their candles together.

At first that seems crazy. Ignoring leap years, there are 365 days in a year and unless you are the Queen you only get one birthday in that time. So the chance of you and any one of your classmates sharing your special day is 1 in 365. If you have 29 other classmates, who each have a 1 in 365 chance of being born on the same day, you’d think there would be an overall probability of 29 in 365 – or an 8% likelihood of finding someone with a matching birthday.

### It’s not just about you

The trick is that the question asks how likely it is that *any* two people in your class will have the same birthday – neither of them has to be you. It could be any pair of people from your class. We need to work out all the different possible ways of pairing up your classmates and then check to see if any of those pairs have a matching birthday.

If there are 30 people in the class then they could each be paired with 29 other people. Mathematically then, there are (30 × 29)/2 different ways of pairing people up. You have to divide by two to avoid counting each pair twice. If you’ve already checked your birthday against Alice’s, then you don’t want that counted again when Alice comes to check her birthday against yours. So there are 435 ways of dividing your class of 30 people into pairs, which gives us 435 different chances for a match between birthdays. That is not the 29 chances you might first have thought.

### Match-making

But checking each of the 435 possible pairs for a matching birthday would take you a long time. This is where maths can make life a whole lot easier. You might remember from maths lessons that the probability that something happens, plus the probability that it doesn’t happen, is always equal to one. This is because the event either has to happen or not. As above the chances of any pair having a matching birthday is 1/365. So the probability of it not happening for each possible pair is (364/365) or 0.997 (**careful**, this has been rounded!)

If there were just two possible pairs then we would multiply 0.997 by 0.997 to give us the answer. But we have 435 possible pairs so we need to multiply 0.997 by itself 435 times. Mathematically, we can do this by raising 0.997 to the power 435. Just as 3 multiplied by itself 3 times, or 3 x 3 x 3, can be written 3^{3}, 0.997 multiplied by itself 435 times can be written as 0.997^{435}. However, we need to use the original fraction of (364/365) in our calculations because 0.997 has been rounded. Plugging (364/365)^{435} into a calculator gives the answer 0.30.

### A 70% chance

Remember though, this is the probability of two people in your class **not** sharing a birthday. We were after the probability that they do eat birthday cake on the same day. To find that we just need to subtract our answer from 1. This gives us 0.7 – a 70% chance that, in a class of 30, two people share a birthday.

Can you find the smallest group needed to make it more likely than not to have two matching birthdays? Said another way: how big does your group need to be before you hit a 50% chance of two people being born on the same day? By playing with this application you can see how the probability of finding a match changes depending on the size of the group.