Birthday Problem Calculator
How many people need to be in a room before it's more likely than not that two of them share a birthday? The counterintuitive answer is just 23 — the famous birthday paradox. This calculator computes the exact probability of at least one shared birthday for any group size (assuming 365 equally-likely birthdays and ignoring leap day), gives the Poisson approximation, finds the smallest group that reaches any target probability, and plots the probability curve. Everything runs locally in your browser.
Probability for this group
Find n for a target probability
Probability vs group size
Key milestones
| n | P(at least one shared) | P(no shared) |
|---|
The birthday problem. With n people and d equally-likely birthdays, the probability that no two share a birthday is the product ∏k=0n−1(d−k)/d — each new person must avoid all previously-seen birthdays. The probability of at least one shared birthday is one minus that: P = 1 − ∏(d−k)/d. It climbs far faster than intuition because the number of pairs grows as n(n−1)/2, so the chance of a collision is driven by roughly n²/2 comparisons, not n. The Poisson approximation P ≈ 1 − e−n(n−1)/(2d) treats collisions as rare independent events and is close for small n. By the pigeonhole principle, once n > d a shared birthday is certain (P = 1). The 50% threshold falls at n = 23 for a 365-day year; 90% at 41; 99% at 57. Pairs with the Combinatorics, Binomial Distribution, and Hash Collision (birthday-bound for hash spaces) tools. Everything runs locally — nothing leaves your browser.