Utilisation (3 étapes)
- Choisissez Jours (d=365/366) ou Bits (d=2^b).
- Saisissez n (ou passez en mode « Cible → n »).
- Copiez l'URL partageable ou lancez une simulation.
Entrées
Results
- P(collision)
- —
- P(no collision)
- —
- Approx (Poisson)
- —
- Approx error (abs / rel)
- — / —
Cible → n requis
- 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
Qu’est-ce que le paradoxe des anniversaires ?
It is the collision probability when drawing n samples from d equally likely values. With d=365, n=23 already gives about 50%.
Pourquoi dépasse-t-il 50 % avec seulement 23 personnes ?
The number of possible pairs grows as C(n,2), so collisions become likely quickly.
Quelle est la formule exacte ?
P(no collision) = (d)_n / d^n, and P(collision) = 1 − P(no collision).
Comment calcule-t-on le n requis pour une probabilité cible ?
We search the smallest integer n such that P(collision) ≥ target.
Quel lien avec les collisions de hachage (32 bits / 64 bits) ?
Use bits mode (d=2^b). For 32-bit, the 50% point is about n≈77,164.
À quoi sert la graine dans la simulation ?
A seed makes the simulation deterministic and reproducible.
Les anniversaires réels sont-ils uniformes ?
Not perfectly. This tool uses the standard uniform model.