Our birthday paradox calculator will tell you what's the probability of two people sharing the same birthday in a group. Have fun trying to guess or asking your friends to guess the answer to the birthday problem: the math may surprise you!

In this article, you will find:

  • A detailed explanation of the birthday paradox;
  • Two ways to calculate the probability of the same birthday in a group of people;
  • Why it's better to call it the "birthday problem" and not the "birthday paradox".

The birthday paradox:

Imagine being at a party: what are the odds of at least two people sharing the same birthday? This question is the birthday paradox or birthday problem. The birthday problem is an interesting — and amusing — exercise of statistics.

The most common version of the birthday problem asks the minimum number of people required to have a 50%50\% chance of a couple sharing their birthday. We will first address the general problem, then answer this question.

How to calculate the birthday paradox

We can calculate the birthday problem in two ways. The easiest but less straightforward one involves calculating the complement of the desired probability, which means calculating the probability that no one shares the same birthday in a set of nn people.

Set the number of guests at the party. We will try with n=28n=28. First, we need to calculate the possible number of pairs of people.

To do so, we need to compute a series. Out of nn people, the first person can create n1n-1 pairs. The second can create n2n-2, the third n3n-3, and so on. The result of the sum of these terms is famous in mathematics:


This corresponds to the combinations in samples with size 22. In our case, this value is equal to:

npairs=28272=378n_{\text{pairs}}= \frac{28\cdot 27}{2}=378

Now define the probability that any pair of people doesn't share the birthday date. How to calculate this quantity?

Take Alice and Bob. Alice has her birthday on any of the 365 days of the year. To fall on a different day, Bob's birthday has to be on any possible different date: 364364 days out of 365365. p=364/365p=364/365 is the probability we are looking for.

To calculate the probability of no pairs of people sharing the same birthday, we need to compute the probability of disjointed, and independent events. This equals computing the product of the probability of each event. In this case, we must multiplicate pp by itself for npairsn_{\text{pairs}} times:


Which corresponds to a probability of roughly the 36%36\% to have no pairs with the same birthday. Why the bar over PP? Because this is the complement of the probability we are looking for. To calculate the probability of at least two people sharing the same birthday, we simply have to subtract the value of Pˉ\bar{P} from 11.

P=1Pˉ=10.36=0.64P = 1-\bar{P} = 1 - 0.36 = 0.64

By the way, now we know that we need fewer than 2828 people to have that 50%50\% chance we will soon look for.

If you go in the advanced mode of our birthday paradox calculator, you can choose to use leap years instead of the standard 365365 days year. The results won't change much, though!

The other way to calculate the birthday problem

Instead of focusing on the pairs of people, we can consider the single individuals. Picking the guests one by one and "moving" them into a subset, we can define the following probabilities of not sharing their birthday:

  • The first guest has p0=365365p_0=\tfrac{365}{365} of not sharing the birthday with someone in the subset.
  • The second guest moved in the subset has probability p1=364365p_1=\tfrac{364}{365} of having an unique birthday.
  • The third guest has p2=363365p_2=\tfrac{363}{365}.
  • The fourth one has p3=362365p_3=\tfrac{362}{365}
  • ...
  • The kth guest has probability p=365(k1)365p=\tfrac{365- (k-1)}{365} of having an unique birthday.

Notice how they follow an arithmetic sequence (which you can calculate with the sum of series calculator).
Since the events are independent, multiply the probabilities by each other to find the probability of no-one sharing a birthday in the subset:

Pˉ=p1p2p3...pn2pn1\bar{P} = p_1\cdot p_2\cdot p_3\cdot ...\cdot p_{n-2}\cdot p_{n-1}

We ignored the first term p0p_0. It is straightforward that you can not share the birthday with yourself.

Now substitute the values and calculate the probability of 2 persons not having the same birthday:

Pˉ=364365363365362365...\bar{P} = \frac{364}{365}\cdot\frac{363}{365}\cdot\frac{362}{365}\cdot...

Stop at the desired number to calculate the birthday paradox result for your party!

🙋 Remember that with 366366 people at the party, the probability of someone sharing the birthday is P=1P=1 (there must be at least a repetition).

What's the number of guests to obtain a 50% chance of a pair sharing a birthday?

To answer to the most common form of the birthday paradox, let's start with the final result:

P=Pˉ=0.5P = \bar{P} = 0.5

This is the result of the formula for the birthday paradox:

Pˉ=364365npairs=0.5\bar{P} = \frac{364}{365}^{n_{\text{pairs}}} = 0.5

Use the logarithm base 364/365364/365 to find the ceiling value of npairsn_{\text{pairs}}:

npairs=log364365 0.5=253n_{\text{pairs}} = \left\lceil\log_{\frac{364}{365}}\ 0.5\right\rceil = 253

This is the result of the summation of all the possible pairs of people:


Which, when solved as a quadratic equation, yields n=23n=23. Try to input this number in our birthday problem calculator, and check if the result is correct!

The birthday paradox: not a paradox

Since we can calculate the birthday paradox under every aspect, and the math always checks out, we can't call the birthday problem a paradox! Some would say that it's a veridical paradox because it doesn't imply fallacious logic in it.

Similar misapprehension occurs, for example, regarding the displacement of an object, which can equal zero even if you have moved it. Check Omni Calculator's displacement calculator to see how it is possible.

Davide Borchia
Number of people
People also viewed…

Polynomial graphing

This polynomial graphing calculator evaluates one-variable polynomial functions up to the fourth-order, for given coefficients.

Schwarzschild radius

Discover the fundamental of black hole physics with our Schwarzschild radius calculator.

Tetrahedron volume

Obtain the volume of any regular tetrahedron with this tetrahedron volume calculator!
main background