SOLVETUTORMATH SOLVER

Instrument MI-07-024 · Statistics

Birthday Paradox Calculator

It only takes 23 people in a room for the odds of a shared birthday to tip past even money — far fewer than most people's first guess, and entirely explainable by counting pairs.

Instrument MI-07-024
Sheet 1 OF 1
Rev A
Verified
Type 07 — Probability SER. 2026-07024

Probability at least two share a birthday

0.507297

P(no match) = ∏_{i=0}^{n-1} (365−i) ⁄ 365 ; P(shared) = 1 − P(no match)

0.492703 Probability of no shared birthday
The working Every figure verified twice
  1. n=23 -> P(no match)=0.492703, P(shared)=0.507297
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

The birthday paradox asks: in a group of n people, what's the probability that at least two of them share a birthday? It's called a paradox not because the math is wrong, but because the answer feels wrong — most people guess you'd need close to 183 people (half of 365) before shared birthdays become likely, when the real threshold is 23. The gap between intuition and the actual answer is the whole appeal of the problem.

The trick is that the question isn't about any one specific date being matched — it's about any pair among the group matching each other. With 23 people there are 23x22/2 = 253 distinct pairs of people, and each pair has its own small chance of sharing a birthday. Even though any single pair is unlikely to match, 253 independent chances at a match add up fast, which is why the probability climbs so much quicker than intuition expects.

The easiest way to compute it is backwards: find the probability that nobody shares a birthday, then subtract from 1. Adding people one at a time, the first person can have any birthday, the second must avoid the first person's date (364/365 odds), the third must avoid both taken dates (363/365), and so on — multiplying that shrinking fraction together for all n people gives the probability of no match, and 1 minus that is the probability of at least one shared birthday.

P(no match)=i=0n1365i365P(\text{no match}) = \prod_{i=0}^{n-1} \frac{365-i}{365}P(shared)=1P(no match)P(\text{shared}) = 1 - P(\text{no match})
n — number of people in the group · P(no match) — probability that all n birthdays are different, built by multiplying n shrinking fractions together · P(shared) — probability that at least two people share a birthday, the complement of P(no match).
  • Enter the size of the group into Number of people.
  • Read Probability at least two share a birthday for the chance of any match anywhere in the group.
  • Read Probability of no shared birthday just below it — the two figures always add up to exactly 1 (100%).
  • The calculator accepts group sizes from 2 up to 365; at 366 or more, a shared birthday is guaranteed by the pigeonhole principle, since there are only 365 possible dates to go around.
  • This assumes birthdays are spread evenly across all 365 days, ignoring leap years — real birth dates aren't perfectly uniform, which in practice makes matches very slightly more likely than the calculator shows.

Worked example — the classic 23-person group

Enter 23 into Number of people. The instrument multiplies 23 shrinking fractions together: 365/365 x 364/365 x 363/365 x ... x 343/365, giving Probability of no shared birthday ≈ 0.492703 (about 49.3%).

Subtracting that from 1 gives Probability at least two share a birthday ≈ 0.507297 (about 50.7%) — just past a coin flip. That's the famous headline result: with only 23 people, the odds already favor a shared birthday somewhere in the room, even though any two specific people are still very unlikely to match each other.

Questions

Why does it only take 23 people, not closer to 183?

Because the question is about any pair matching, not one specific date being hit. With 23 people there are 253 distinct pairs, and each pair independently has a small chance of matching — 253 chances add up far faster than most people's intuition expects, which is exactly why 23 feels too small at first.

What happens with more than 365 people?

The probability of a shared birthday hits exactly 100% once you reach 366 people, guaranteed by the pigeonhole principle — with only 365 possible birthdays and 366 people, at least two must share one, no probability calculation needed. This calculator caps the group size at 365 for that reason.

Does this account for leap years or uneven birth date distributions?

No — the calculation assumes exactly 365 equally likely birthdays and ignores February 29th and real-world seasonal birth-rate variation. In practice, real birthdays aren't perfectly uniform (certain months see more births than others), and that unevenness makes an actual shared-birthday match very slightly more likely than this idealized model predicts, never less.

How fast does the probability grow beyond 23 people?

Very fast. At 10 people it's only about 11.7%, but it crosses 50% by 23 people, reaches roughly 97% by 50 people, and is effectively certain well before the group reaches 100 — the probability climbs steeply because the number of pairs to compare grows much faster than the number of people does.

Is this the same math used in cryptography's 'birthday attack'?

Yes, the same counting principle. A birthday attack exploits the fact that finding any two inputs that produce the same hash output (a collision) takes far fewer attempts than finding one specific input matching a given output — roughly the square root of the total possibilities, mirroring how only 23 out of 365 possible birthdays is enough for a 50-50 shot at a match.

Who first worked out this result?

The birthday problem's exact solution appears in probability textbooks going back to the mid-20th century, notably William Feller's classic 'An Introduction to Probability Theory and Its Applications,' and it has since become one of the most widely used examples for teaching how combinatorics can defeat naive intuition.

References