Birthday Problem Calculator
Chance that two of a group share a value, with the number of pairs and the group size for even odds.
Results
What this tool does
Uses the standard exponential approximation, which is accurate to well under a percentage point for group sizes up to a few hundred. Changing the number of possible values turns this into a collision calculator for anything: 365 for birthdays, 2^32 for a hash, or the size of any identifier space you are worried about running into itself.
Formula
P ≈ 1 − e^(−n(n−1) ÷ 2N)
Variables
| Symbol | Meaning | Unit |
|---|---|---|
nn | Number of people | — |
dd | Possible values | — |
PR | Probability | % |
PN | Probability | % |
PC | Pairs to compare | — |
N5 | Number of people | — |
Worked example
- Number of people23
- Possible values365
- Probability50.00018 %
- Probability49.99982 %
- Pairs to compare253
- Number of people23
Limitations
- The result is an estimate based only on the values you type. Real situations often include factors this calculator does not know about.
- The formula assumes ideal conditions: no friction losses, no air resistance and no efficiency losses unless you enter them.
- The calculation runs at full precision and only the display is rounded. If you copy an intermediate value and retype it, small differences can appear.
Frequently asked questions
Why does it only take 23 people?
Because what matters is the number of pairs, not the number of people, and pairs grow with the square. Twenty-three people make 253 pairs, and each pair is a separate chance of a match. The intuition that fails is comparing yourself against everyone else — that really does need about 253 people — rather than everyone against everyone.