Birthday Paradox Explained Simply
- Number of people
- 23 people
- You entered
This calculator works out the probability that at least two people in a group share a birthday, given the group size. You enter the number of people, and it returns the probability as a percentage, using the standard birthday problem formula. The result shows how surprisingly high the chance becomes with far fewer people than most expect.
Formula
The probability that at least two people share a birthday is:
P(shared) = 1 – (365! / ((365 – n)! × 365n))
where:
- n = number of people in the group (integer, at least 1)
- 365 = number of days in a year (ignoring leap years)
- ! = factorial (e.g., 5! = 5 × 4 × 3 × 2 × 1)
The term (365! / (365 – n)!) counts the number of ways to assign distinct birthdays to n people. Dividing by 365n gives the probability that no two share a birthday. Subtracting from 1 gives the probability that at least one pair shares.
Worked Example
Using the default of 23 people:
- Compute the number of ways to assign 23 distinct birthdays: 365 × 364 × … × 343.
- Divide by 36523 to get the probability of no shared birthday: about 0.4927.
- Subtract from 1: 1 – 0.4927 = 0.5073.
- Convert to a percentage: 50.73%.
So with 23 people, there is a 50.7% chance that at least two share a birthday. The calculator rounds to two decimal places, giving 50.73%.
Why It Feels Like a Paradox
Most people guess that you need around 183 people (half of 365) to have a 50% chance of a match. That intuition focuses on the chance that a specific person shares your birthday, which is only 1/365 per person. But the birthday problem asks whether any two people in the group share a birthday. With 23 people, there are 253 possible pairs (23 × 22 / 2). Each pair has a 1/365 chance of matching, and those many chances compound quickly. The result feels paradoxical because we instinctively compare to the 365 days, not to the number of pairs.
How to Read the Result
The output is the probability, as a percentage, that at least one pair of people in the group has the same birthday (month and day, ignoring year). For example:
- With 10 people, the chance is about 11.7%.
- With 23 people, it is 50.7%.
- With 30 people, it is 70.6%.
- With 50 people, it is 97.0%.
- With 70 people, it is 99.9%.
The probability rises steeply because each additional person adds n–1 new pairs. By the time you reach 70 people, a match is almost guaranteed, though not mathematically certain.
Common Mistakes and Misconceptions
- Confusing with “same as me” probability: The chance that someone shares your birthday with 23 people is only about 6.1%. The birthday paradox is about any pair, not a specific person.
- Assuming leap years are included: The standard formula uses 365 days. Including February 29 changes the result slightly (for 23 people, it shifts by a fraction of a percent), but the principle remains.
- Rounding too early: If you compute the factorial terms separately, you may lose precision. Use the full formula or a calculator that handles large numbers.
- Thinking “at least two” means “exactly two”: The formula includes cases where three or more share a birthday. If you need exactly one pair, the calculation is different and more complex.
Limits and Assumptions
The formula assumes that birthdays are uniformly distributed across 365 days and that each person’s birthday is independent of others. In reality, birth rates vary slightly by season, and some days (like holidays) have fewer births. However, these variations have a minimal effect on the probability for typical group sizes. The formula also ignores twins and other multiple births, which would increase the chance of a match. For very large groups (above 100), the probability is so close to 100% that the difference from real-world distribution is negligible.
Real-World Applications
The birthday paradox isn’t just a party trick. It appears in:
- Cryptography: The “birthday attack” on hash functions exploits the fact that collisions occur much sooner than expected. A hash with 128 bits has a 50% chance of a collision after about 264 tries, not 2128.
- Data matching: When joining datasets on IDs or names, the chance of accidental matches rises with the number of records, following the same math.
- Genetics: The probability of two people in a population sharing a genetic marker is often estimated using this principle.
- Sampling and polling: The number of random samples needed to see a duplicate value grows roughly as the square root of the total possible values, which is a direct consequence of the birthday problem.
Frequently Asked Questions
What is the birthday paradox in simple words?
It’s the surprising result that in a group of just 23 people, there is a 50% chance that two people share a birthday. You don’t need 183 people (half of 365) because the question isn’t about matching a specific date, but about any pair matching.
How many people do you need for a 99% chance?
You need about 57 people for a 99% chance. With 57 people, the probability is 99.0%. With 70 people, it’s 99.9%.
Does the birthday paradox work with leap years?
Yes, but the standard formula uses 365 days. Including February 29 changes the probability slightly—for 23 people, it goes from 50.73% to about 50.63%—but the general result is unchanged. The exact calculation with leap years is more involved because you have to account for the 366th day occurring only once every four years.
Why is it called a paradox if it’s true?
It’s called a paradox because it contradicts common intuition, not because it’s logically impossible. The math is straightforward; our intuition about probability is what fails.
What is the chance that I share a birthday with someone in a group of 23?
That’s a different question. The chance that at least one other person shares your specific birthday is about 6.1% (1 – (364/365)22). The 50.7% figure is for any pair in the group, not involving you specifically.
Can the probability ever be exactly 100%?
No, not unless the group has more than 365 people (or 366 including leap years). With 366 people, by the pigeonhole principle, at least two must share a birthday. For any number less than that, there is a tiny chance—though astronomically small—that all birthdays are distinct.
Related
Formula used
in n | Number of people | people | 23 | 1 out p | Probability of a shared birthday | % | (1 - (fact(365) / (fact(365 - n) * 365^n))) * 100 | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.