unspurious.calculators

Foundations · Probability

Birthday Paradox Calculator

In a room of just 23 people, the chance that two of them share a birthday is already better than even — about 50.7%. It feels wrong because we picture someone sharing our birthday, which is rare; the paradox is about any two of them matching, and with 23 people there are 253 possible pairs. This works out the probability for any group size, contrasts it with the someone-shares-yours version, and draws the famous curve.

Assumes birthdays are spread evenly across the year and are independent — real birthdays clump a little (so a true room is slightly more likely to match than this says). Leap years, twins and seasonal birth patterns are ignored.

Result

In plain English

The trick your intuition plays is to count the wrong thing. You imagine looking for your own birthday among the others — and with 22 other people that really is unlikely. But a shared birthday can be any pair, and the number of pairs grows far faster than the number of people: 23 people make 253 pairs, each with a 1-in-365 chance of matching. Add the chances up (carefully, since they overlap) and you are past 50% almost at once. It is not the people that matter, but the pairs.

the birthday problem
The probability that at least two people in a group of n share a birthday, assuming d equally likely days. Computed as 1 minus the chance everyone is different.
why “1 minus all different”
It is far easier to count the way it can fail to happen: the 2nd person dodges the 1st (364∕365), the 3rd dodges both (363∕365), and so on. Multiply those, subtract from 1.
any pair vs your birthday
The paradox is about any match among the group. The chance that someone shares your particular birthday is a different, much smaller number — 1 − (364∕365)ⁿ⁻¹ — and confusing the two is the whole illusion.
the pair count
A group of n has n(n − 1)∕2 pairs. That quadratic growth — not the count of people — is the engine behind the surprise.
the milestones
With 365 days: 23 people for a better-than-even chance, 57 for 99%, 70 for 99.9%. After 365 people a match is certain (the pigeonhole principle).
square-root rule of thumb
A coincidence among d possibilities becomes likely at around 1.2·√d items — about 23 for d = 365. The same maths underlies hash collisions and the “birthday attack” in cryptography.

Frequently asked

Why does it only take 23 people for a 50% chance of a shared birthday?

Because you are counting pairs, not people. With 23 people there are 23 × 22 ∕ 2 = 253 different pairs who could match, and each pair has about a 1-in-365 chance. The probability that no pair matches is (364∕365) × (363∕365) × … down to (343∕365), which works out to about 0.493 — so the chance that at least one pair does match is roughly 0.507, just over half. The growth is fast because pairs grow with the square of the group size.

How do you calculate the birthday-problem probability?

Compute the chance everyone is different and subtract from 1: P(match) = 1 − (365 ∕ 365)(364 ∕ 365)…((365 − n + 1) ∕ 365). Each factor is the probability the next person avoids all the birthdays already taken. For n = 23 the product of “all different” is about 0.4927, so the probability of a shared birthday is about 0.5073. For more than 365 people it is exactly 1 — there are not enough days to give everyone their own.

What is the chance someone shares MY birthday specifically?

Much smaller. That probability is 1 − (364 ∕ 365)ⁿ⁻¹, which for 22 other people is only about 5.9%. This is the version most people have in mind, and it really is unlikely — you would need around 253 other people for an even chance of someone matching your exact date. The birthday “paradox” is the gap between this intuitive number and the much larger probability of any two people in the room matching.

Does the birthday paradox hold for real birthdays?

Essentially yes, and if anything the real chance is a touch higher. Actual birthdays are not perfectly uniform — there are seasonal peaks and fewer births on some dates — and any departure from an even spread only makes matches more likely, never less. Twins, leap-year birthdays and local birth patterns add small wrinkles, but the headline result (23 people, just over even) is robust. The same counting logic powers the cryptographic “birthday attack,” where collisions appear far sooner than the size of the space suggests.