How to use (3 steps)
- Select Days (d=365/366) or Bits (d=2^b).
- Enter n (or switch to “Target → n”).
- Copy a shareable URL or run a simulation.
Inputs
Results
- P(collision)
- —
- P(no collision)
- —
- Approx (Poisson)
- —
- Approx error (abs / rel)
- — / —
Target → required n
- Required n (exact)
- —
- Required n (approx)
- —
Graph
P(collision) vs n (blue). Orange line marks your current n.
Tip: hover (or tap) the graph to see the probability at a specific n. The quick table below provides accessible values.
Quick table
| n | P(collision) | p (0..1) |
|---|
Simulation (Monte Carlo)
- Estimated P(collision)
- —
- 95% CI (Wilson)
- —
- |p̂ − p_exact|
- —
Notes & formulas
- Exact: P(no collision) = (d)_n / d^n, P(collision) = 1 − P(no collision).
- Approx: P(collision) ≈ 1 − exp(−n(n−1)/(2d)).
- This assumes a uniform distribution over d values.
Examples
Classic: d=365, n=23
P(collision) is about 0.5073 (≈ 50.7%).
Hash collisions: 32-bit
Use bits mode with b=32 (d=2^32). Target 0.5 gives n≈77,164.
FAQ
What is the birthday paradox?
It is the collision probability when drawing n samples from d equally likely values. With d=365, n=23 already gives about 50%.
Why does it exceed 50% with only 23 people?
The number of possible pairs grows as C(n,2), so collisions become likely quickly.
What is the exact formula?
P(no collision) = (d)_n / d^n, and P(collision) = 1 − P(no collision).
How do you compute the required n for a target probability?
We search the smallest integer n such that P(collision) ≥ target.
How does this relate to hash collisions (32-bit / 64-bit)?
Use bits mode (d=2^b). For 32-bit, the 50% point is about n≈77,164.
What is the seed in the simulation?
A seed makes the simulation deterministic and reproducible.
Are real birthdays uniform?
Not perfectly. This tool uses the standard uniform model.