Birthday Problem (All Distinct)

P=N!(Nn)!  NnP = \frac{N!}{(N - n)! \; N^{\,n}}

Enter your known values, leave one input blank, and solves for the missing one. Try different units for next level excitement!

Learning zone

Line the picks up one at a time: the first is free, the second must dodge 1 used value out of N, the third must dodge 2, and so on, giving the product (N/N)((N−1)/N)((N−2)/N)… with n factors. With N = 365 days and n = 23 people, P(all birthdays distinct) ≈ 0.4927 — so the chance of a shared birthday is about 50.7%, the result Richard von Mises popularised in 1939 and which still startles people. Any World Cup squad of 23 is a coin flip for a shared birthday, and in practice about half of them have one.

The surprise dissolves once you count pairs rather than people: 23 people form 23 × 22/2 = 253 pairs, each with a 1/365 chance of matching. The classic trap is confusing this with "someone shares my birthday", which needs 253 other people to pass 50%. The same maths sets the cost of hash collisions — a 64-bit hash collides with even odds after only about 5 billion items, not 18 quintillion — a fact cryptographers call the birthday attack. Try three dice: n = 3, N = 6 gives (6 × 5 × 4)/6³ = 120/216 ≈ 0.556 for three different faces. Neither n nor N can be recovered in closed form, so this calculator solves for P.

Birthday Problem (All Distinct)
P=N!(Nn)!  NnP = \frac{N!}{(N - n)! \; N^{\,n}}
Where
  • PP= Probability all picks differ
  • nn= Number of picks
  • NN= Number of options
Missing one of these? Work it out first, then come back