Birthday Problem (All Distinct)

P=N!(N−n)!  N nP = \frac{N!}{(N - n)! \; N^{\,n}}
sig figs

Worked example: 23 people, 365 days → all distinct 0.4927. Press Try an example to run it live, then adjust anything.

Enter your known values, leave one input blank, and solves for the missing one. Tap a variable’s symbol to see what it means, with a typical value. Change any unit and the answer follows.

Where Birthday Problem (All Distinct) fits

Your answer feeds
Learning zone

Birthday Problem (All Distinct) explained

nNP

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 the calculator finds them numerically, through the gamma function that extends the factorial between whole numbers: 23 people for an even chance among 365 birthdays.

Birthday Problem (All Distinct) formula

P=N!(N−n)!  N nP = \frac{N!}{(N - n)! \; N^{\,n}}
Where
  • PP= Probability all picks differ
  • nn= Number of picks
  • NN= Number of options
Revised 1 November 2026
Cite this page

formula.expert. (2026, November 1). Birthday Problem (All Distinct) Formula & Calculator. https://formula.expert/solvers/birthday-problem-distinct