Skip to content
Omnikalc

Birthday paradox calculator: chance two people share a birthday

Find the probability that at least two people in a group share a birthday, and the chance that someone shares yours.

Updated on
Your inputs

Value out of range

Value out of range

Results

At least two people share a birthday

50.73%

Someone shares your birthday

5.86%

All birthdays are different
49.27%
Group size for a 50% chance of a shared birthday
23
Pairs of people in the group
253

The surprising answer

How many people must be in a room for there to be a better-than-even chance that two of them share a birthday? Most people guess around 180. The answer is 23.

Why it works

The question is not whether someone shares your birthday, but whether any two people share one. With 23 people there are 23 × 22 ÷ 2 = 253 pairs, and each pair is a chance for a match.

The formula

It is easier to compute the probability that all birthdays are different:

P(all different) = 365 × 364 × … × (365 − n + 1) ÷ 365ⁿ

and then P(at least one shared) = 1 − P(all different).

Worked example

For 23 people:

  1. P(all different) = 365 × 364 × … × 343 ÷ 365²³ ≈ 49.27%.
  2. P(shared) = 1 − 49.27% ≈ 50.73%.
  3. Chance that someone shares your birthday: 1 − (364 ÷ 365)²² ≈ 5.86%.

Probabilities by group size

People Chance of a shared birthday
10 11.7%
20 41.1%
23 50.7%
30 70.6%
40 89.1%
50 97.0%
70 99.9%

Beyond birthdays

The same math applies whenever items are assigned at random to a limited number of slots. The calculator lets you change the number of days to any number of categories.

  • Computer security: a “birthday attack” finds two inputs with the same hash much faster than expected. A hash with 2ⁿ possible values needs only about 2^(n/2) tries, which is why hash functions use at least 256 bits.
  • Lotteries: repeated winning numbers across many draws are far more common than intuition suggests.
  • Data: random identifiers collide sooner than expected if they are too short.

A handy approximation: a 50% chance of a collision needs about √(2 × d × ln 2) ≈ 1.18 × √d items, where d is the number of possible values.

Assumptions

The calculation assumes 365 equally likely birthdays and ignores February 29 and twins. Real births are slightly uneven across the year, which makes shared birthdays a little more likely than the formula says.

Frequently asked questions

How many people do you need for a 50% chance of a shared birthday?

Only 23. With 23 people there are 253 pairs, and the probability that at least two share a birthday is about 50.7%. With 70 people it exceeds 99.9%.

Why is it called a paradox?

Because most people expect a much larger number. The intuition compares one person with everyone else, while the question involves every possible pair in the group.

What is the chance that someone shares my birthday?

Much lower: with 22 other people, it is 1 − (364/365)^22 ≈ 5.9%. You need about 253 other people for a 50% chance.

Does the calculation account for February 29 or uneven birth dates?

It assumes 365 equally likely days. Real birth dates are slightly uneven, which makes shared birthdays a little more likely, so the result is a slight underestimate.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.