Birthday Paradox Calculator

See the shared-birthday probability.

How it is calculated

The tool finds the chance that at least two people in a group share a birthday. It first computes the chance that everyone's birthday is different: Q = (365/365) × (364/365) × … × ((365 − n + 1)/365), multiplying one factor per person, then reports P = 100 × (1 − Q) as a percentage with two decimals. The model assumes 365 equally likely birthdays, with no 29 February and no seasonal clustering, so real groups differ slightly. n is the number of people and must be a whole number from 2 to 365; 0, 1, fractions and anything above 365 give no result. At 365 people the display reads 100.00 % (the true value is just below 100 %, rounded).

Worked example

Take a group of 23 people. The first has any birthday (365/365 = 1). The second differs from the first with probability 364/365, the third 363/365, and so on down to 343/365 for the 23rd. Multiplying all 23 factors gives Q ≈ 0.4927, the chance that nobody shares. Then 1 − 0.4927 = 0.5073. The calculator shows 50.73%, so a group of just 23 people has slightly better than even odds of a shared birthday.

Try this example →

Common mistakes

  • Thinking you need about 183 people (half of 365) for a 50 % chance. The count of pairs grows much faster than the group, so 23 is enough.
  • Reading the result as the chance that someone shares your birthday. This is the chance that any two people match, a much easier event.
  • Counting only matches with one fixed person. The tool compares every pair in the group.
  • Expecting leap days or uneven birth rates to be included. The tool assumes 365 equally likely dates.
  • Entering a number of birthdays or years instead of the number of people.

About this calculator

The birthday paradox asks how likely it is that at least two people in a group share a birthday, and the answer is famously counterintuitive: with just 23 people, the probability already exceeds 50%, and with 70 people it’s over 99.9%, even though there are 365 possible birthdays. The exact formula computes the probability of no shared birthday first — 365 ÷ 365 × 364 ÷ 365 × 363 ÷ 365, and so on for each additional person — then subtracts that from 1, since it’s the number of pairs of people, which grows much faster than the group size, that drives the effect.

The same birthday-problem math underlies the birthday attack in cryptography, where finding any collision in a hash function turns out to require far fewer attempts than finding a specific match, which is why hash output lengths are chosen with this square-root-scaling effect in mind. It’s also a standard teaching example in probability courses for demonstrating how intuition about random matching can badly mislead you.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators