The Birthday Paradox, Explained
After reading this you can compute the probability that at least two people in a group share a birthday, explain why the answer feels surprisingly high, and avoid the mistakes that make people misjudge it.
What the birthday paradox is
Put 23 people in a room. The chance that at least two of them share a birthday is about 50.7%. Most people guess a much smaller number, because they picture their own birthday and ask how many others match it. That is the wrong question. The paradox counts every possible pair, not one fixed person against the rest.
The word "paradox" here means "surprising result," not "logical contradiction." Nothing about it breaks the rules of probability. The count of pairs grows fast, and that growth drives the answer up quickly.
The calculator uses a 365-day year, ignores February 29, and assumes every birthday is equally likely. Under those assumptions the numbers below are exact.
Why pairs, not people
In a group of n people, the number of distinct pairs is \binom{n}{2} = \frac{n(n-1)}{2}. With 23 people that is \frac{23 \times 22}{2} = 253 pairs. Each pair is one chance for a match. So you are not running 23 comparisons, you are running 253.
That is the intuition. If you want to compute or check pair counts directly, see the Combinations & Permutations Calculator.
The 50% mark sits at 23 people because 253 pairs is enough for the combined chance of at least one match to cross one half. The chance for any single pair is only 1/365 \approx 0.274\%, but they add up.
The formula and the intuition behind it
Computing "at least one shared birthday" directly is hard, because "at least one" hides many overlapping cases. The clean route is to compute the opposite event: everyone has a different birthday. Then subtract from 1.
Read the product from the inside out. The first person can have any birthday. The second must avoid the first, leaving 364/365 free days. The third must avoid two, leaving 363/365. Continue until the nth person, who must avoid n-1 earlier birthdays. Multiply those fractions to get the probability that all birthdays differ, then subtract from 1.
An equivalent closed form uses factorials:
Here 365^n counts every way to assign birthdays with repetition allowed, and the numerator counts the ways with no repeats. The ratio is the fraction of assignments with all distinct birthdays.
Worked example: the 23-person case
Reproducing the demo (n = 23)
Set n to 23, the default, and press Calculate. Here is how the number is built.
- Compute the "all different" product step by step. The first few factors are \frac{364}{365} = 0.99726, then \frac{363}{365} = 0.99452, and so on down to \frac{343}{365} = 0.93973.
- Multiply all 22 factors together. The result is P(\text{no share}) \approx 0.4927.
- Subtract from 1: P(\text{share}) = 1 - 0.4927 = 0.5073.
So the chance of at least one shared birthday among 23 people is about 50.7%. This is the footnote result on the calculator page. Just one more person, n = 24, pushes it to about 53.8%.
How the probability grows with group size
The curve rises steeply through the small groups, then flattens as it approaches 1. The table below gives exact values you can check against the calculator.
| People (n) | Pairs | P(share) |
|---|---|---|
| 10 | 45 | 0.1169 |
| 23 | 253 | 0.5073 |
| 30 | 435 | 0.7063 |
| 40 | 780 | 0.8912 |
| 50 | 1225 | 0.9704 |
| 70 | 2415 | 0.9992 |
Explore how fast it climbs
When to use it, and when not
The clean formula applies when three conditions hold: birthdays are independent, every day is equally likely, and you want the chance that some pair matches. That covers most classroom demonstrations and party bets.
The problem changes shape when the question changes. If you want the chance that someone shares your specific birthday, the answer is much smaller: 1 - (364/365)^{n-1}. With 23 people that is only about 5.9%, not 50.7%. Same group, different question, very different number. For that kind of "at least once" calculation with a fixed target, use the Probability Calculator.
Real birthdays are not perfectly uniform. Late summer months in many countries have slightly more births, and February 29 is rare. Non-uniform dates can only increase the chance of a match, never decrease it, so 50.7% at 23 people is a safe lower bound rather than an overstatement.
Common mistakes
- Comparing one person against the group
- The paradox counts all pairs. Asking whether anyone matches you personally gives 5.9% at 23 people, which is why the true 50.7% feels wrong.
- Dividing 365 by 2 to find the halfway point
- The 50% threshold is 23 people, not 183. The pair count, not the day count, sets the pace.
- Adding the pair probabilities directly
- You might multiply 253 pairs by 1/365 and get 0.693. That overcounts, because it ignores the chance that several pairs match at once. The correct method multiplies the "no match" fractions and subtracts from 1, which gives 0.5073.
- Forgetting the leap day matters little
- Using 366 days instead of 365 changes the 23-person answer from 0.5073 to about 0.5063. The effect is tiny, so the standard 365-day model is fine for almost any use.
Related calculators
Once the pairing idea is clear, several nearby tools build on the same probability reasoning. Use the Expected Value Calculator to find the average number of shared-birthday pairs in a group, which is simply \binom{n}{2} \times \frac{1}{365} and equals about 0.693 for 23 people. The Bayes' Theorem Calculator handles the reverse questions, updating a probability after you learn a fact. For a different flavor of exact combinatorics, the Dice Probability Calculator computes sums for any number of dice.
Frequently asked questions
Why does 23 people give a 50% chance of a shared birthday?
Because 23 people form 253 distinct pairs, and each pair is a separate chance to match. Multiplying the "all different" fractions gives a 49.27% chance that everyone differs, leaving 50.73% for at least one match.
How many people do you need for a 99% chance?
Fifty-seven people. At n = 57 the probability is about 0.9901. At 70 people it reaches 0.9992, so a full match becomes nearly certain well before you fill 365 days.
What is the chance someone shares my exact birthday?
That is a different question with a smaller answer: 1 - (364/365)^{n-1}. For 23 other people that is about 5.9%, and you need 253 people to pass 50% for your specific date.
Does the answer change if birthdays are not evenly spread?
Yes, but only upward. Any clustering of birthdays raises the chance of a match above the uniform figure. So 50.7% at 23 people is a lower bound for real populations.
How many pairs are in a group of n?
Exactly n(n-1)/2. For 23 people that is 253, for 30 people it is 435, and for 50 people it is 1225. The pair count grows roughly with the square of the group size, which is why the probability climbs so fast.