Created by Rita Rain and Davide Borchia
Reviewed by Dominik Czernia, PhD, Jack Bowater and Anna Szczepanek, PhD
Last updated: Jun 05, 2023

The birthday paradox calculator allows you to determine the probability of at least two people in a group sharing a birthday. All you need to do is provide the size of the group. Imagine going to a party with 23 friends. What is the probability that at least two of them were born on the same day of the year? Assume that there are no leap days or twins, and each date is equally likely.

The analysis of this problem is called the birthday problem, and it yields some fairly unintuitive results.

The birthday problem concerns the probability that, in a group of randomly chosen people, at least two individuals will share a birthday. It's uncertain who formulated it first. Some suspect Harold Davenport - an English mathematician specializing in number theory. An American scientist and mathematician - Richard von Mises -introduced an earlier version of the paradox. The math behind the birthday problem is applied in a cryptographic attack called the birthday attack.

Going back to the question asked at the beginning - the probability that at least two people out of a group of 23 will share a birthday is about 50%. Moreover, with 75 people in the room, the probability rises from a 50/50 chance to a 99.95% probability. Those numbers may seem odd, considering that there are 365 possible dates and only 75 people.

If you are unconvinced, let's look into the logic of the birthday problem in the next section of this birthday paradox calculator.

## The math behind the birthday problem

At any party organized on Earth, at least two people in the group share a birthday or no one matches with anyone. So the probability that the first or the opposite scenario will occur is 100%.

As it is much easier to do, we begin by calculating the probability of the situation in which no one shares a birthday - the event complementary to the one described in the birthday problem. It is simpler because for the case of at least two people sharing a birthday, we would have to calculate the probability of two people sharing a birthday, three people sharing a birthday, two people sharing a birthday, and the other two sharing another birthday, and so on. We would have to consider all these situations, from having one pair of people sharing a birthday to all having the same date.

Once we've calculated the probability of a no-birthday match, we subtract it from 100% and check whether it is really a 50/50 chance. Let's get down to it.

## How do you get 50/50 chance

1. Determine the chance of 2 people having different birthdays:

Let's say person A was born on 20th January. It leaves 364 other days out of the 365 days in a year for person B.

P(A) = 364/365

If you're unsure how it works, think about a simpler event like rolling a dice. The probability of getting 5 is 1/6 because there are six options possible, and one of them is 5, and the chance of getting a number that is different from 5 equals 5/6.

2. Calculate the number of possible pairs in the group:

pairs = people × (people - 1) / 2

where:

• pairs - number of all possible pairs that can be formed in the group; and
• people - number of people in the group.

In our example, this would be:

pairs = 23 × 22 / 2; and

pairs = 253.

What we calculated here is the number of combinations. Remember, this differs from permutations which is explained in our permutations calculator.

3. Raise the probability of two people not sharing a birthday to the power of 253 (use the exponent calculator), as the situation when two people have different birthdays has to repeat 253 times (each person has to have a different birthday from the rest):

P(B) = P(A)pairs

P(B) = (364/365)253

P(B) ≈ 0.4995

4. We calculated the probability of no one sharing a birthday - P(B). Now, remember that we wanted to determine the chance of at least two people celebrating on the same date - P(B'). As these are complementary events, the sum of their probabilities equals 1, so subtract P(B) from 1:

P(B') = 1 - P(B)

P(B') ≈ 1 - 0.4995 = 0.5005

P(B') ≈ 50.05%

We use prime B' to denote an event complementary to event B.

5. We arrived at the result - there is about a 50/50 chance that at least two individuals in a group of 23 random people were born on the same day of a year.

## Will someone share a birthday at your party?

Let's say you invited five people. Try to calculate the probability for a group of that size.

1. The probability of two people having different birthdays:

P(A) = 364/365

2. The number of pairs:

pairs = people × (people - 1) / 2

pairs = 5 × 4 / 2 = 10

3. The probability that no one shares a birthday:

P(B) = P(A)pairs

P(B) = (364/365)10

P(B) ≈ 0.9729

4. The probability of at least two people sharing a birthday:

P(B') ≈ 1 - 0.9729

P(B') ≈ 0.0271

P(B') ≈ 2.71%

5. The result is 2.71%, quite a slim chance to meet somebody who celebrates their birthday on the same day.

## The second way of calculating the chances of being born on the same day

1. Imagine you are alone in a room (no horror plot following, just maths). The chance that you will share a birthday with no one in the room is 365/365.

2. Your friend Balthasar comes in. You've already taken one day, so to have a unique birthday, he has 364 options to choose from out of the 365 possible days. The probability that he won't share a birthday with you is 364/365.

3. Cosmo joins. You and Balthasar have already taken two dates, so he has 363 options - the probability of him not sharing a birthday is 363/365.

4. Delphine - the 4th person - will have the probability equal to 362/365 and Emma - the 5th person - 361/365. These values form an arithmetic sequence. Its last element can be calculated in this way:

last element = (365 - (people - 1)) / 365.

last element = (365 - 4) / 365.

last element = 361/365.

5. Now, we have to multiply the probabilities for each person:

P(B) = 365/365 × 364/365 × 363/365 × 362/365 × 361/365

365/365 equals 1, so we can omit that one. It's presented to you to see that there are five people and five probabilities assigned to them. The result is:

P(B) ≈ 0.9729

6. As we did above, we should now calculate the complementary event:

P(B') ≈ 1 - 0.9729

P(B') ≈ 0.0271

P(B') ≈ 2.71%.

You don't have to do the maths by yourself. You can simply input the number of people into the birthday paradox calculator, and voila! - you have the result.

The values are rounded, so if you enter 86 or a larger number of people, you'll see a 100% chance when in fact, it is slightly (very slightly) smaller. If we don't consider leap years, we reach 100% certainty once the group has 366 people. If you want to calculate probability taking into account leap years, switch on the advanced mode and choose the "with leap years" option in the "days in a year" field. The number of days will then equal 365.25 (there is one extra day every four years, so that's an average of 1/4 of a day every year). In this case, you would need 367 individuals to be 100% sure no one shares a birthday.

## Is the birthday problem a paradox?

A paradox is a statement in which, despite using true premises and valid reasoning, the conclusion is illogical or self-contradictory.

One of the best-known paradoxes is the liar’s paradox. Imagine a scenario - John says to you, "I am lying," or "this sentence is a lie." Now, this statement should be either true or false. If it's true, then he's lying, but he isn't because it's true. If the statement is false, it means he isn't lying, but then it would mean he is. Either way, we end up with a contradiction.

Coming back to the birthday problem - it is not a paradox. The logic behind it is valid. It's only called a paradox because it's very unintuitive, and most people find it strange. It's sometimes called a veridical paradox - a result that seems absurd but is demonstrated to be true. If you think about it, the name - "veridical paradox" means a "true paradox", which itself is paradoxical...

## Why do results seem weird?

In the birthday problem, as the number of people in the group rises, the chances increase exponentially - and humans aren't very good at comprehending nonlinear functions. To understand the relationship better, try drawing five dots, connecting each one with a line, and then counting the lines. Then draw another group of six dots and do the same. Can you see the difference?

You may think that you've been to so many parties, and rarely has it turned out that somebody shares a birthday. But how many times have you asked everyone at the party for their birthday? Maybe next time you have an occasion, you can determine the probability with the birthday paradox calculator and check if this situation occurs.

You can also try it by looking at your Facebook account and checking the birth dates of your friends - you'll probably find quite a few people that celebrate on the same date as somebody else.

Rita Rain and Davide Borchia
Number of people
Probability
%
People also viewed…

### Circumference

Use this free circumference calculator to find the area, circumference and diameter of a circle.

### Linear regression

The linear regression calculator determines the coefficients of linear regression model for any set of data points.

### Podcasts

Do you feel like you could be doing something more productive or educational while on a bus? Or while cleaning the house? Well, why don't you dive into the rich world of podcasts! With this podcast calculator, we'll work out just how many great interviews or fascinating stories you can go through by reclaiming your 'dead time'!

### Two dice probability

Use the two dice probability calculator to find the likelihood of running different types of two dice.