Birthday paradox calculator
Enter a group size and see the chance that at least two people share a birthday. With only 23 people the chance is already just over 50%, which surprises almost everyone. Includes the formula, a table and worked examples.
How many people are in the group?
How to use it
- Type the number of people in your group, such as a class, a team or a theatre row.
- Read the chance that at least two of them share a birthday.
- Change the number and watch how quickly the chance climbs.
How it works
The trick is to calculate the opposite: the chance that nobody shares a birthday. The first person can have any birthday. The second must avoid one date, so their chance of a different birthday is 364/365. The third must avoid two, so 363/365, and so on. Multiply those together to get the chance that all birthdays are different, then subtract from one:
P(match) = 1 − (365/365 × 364/365 × 363/365 × … × (365 − n + 1)/365)
The calculator assumes 365 equally likely birthdays and ignores 29 February and the fact that real birthdays are not perfectly spread through the year. Those details nudge the numbers slightly but do not change the story. The table below is generated by the same function the calculator uses.
| People | Pairs | Chance of a shared birthday |
|---|---|---|
| 5 | 10 | 2.7% |
| 10 | 45 | 11.7% |
| 15 | 105 | 25.3% |
| 20 | 190 | 41.1% |
| 23 | 253 | 50.7% |
| 30 | 435 | 70.6% |
| 40 | 780 | 89.1% |
| 50 | 1225 | 97.0% |
| 60 | 1770 | 99.4% |
| 70 | 2415 | 99.9% |
Why it feels wrong
We usually ask "what is the chance someone shares my birthday?", and that needs a much bigger group (you would need about 253 people for a 50% chance). The paradox asks about any two people matching, and a group of 23 contains 253 different pairs. Each pair has only a 1 in 365 chance of matching, but with 253 chances the total is high.
Worked examples
A school class of 30
The chance that two pupils share a birthday is about 70.6%. A teacher could check this with a real class and will be right more often than not.
A family of six
Six people give about 4.0%: low, but not as low as most people guess.
A theatre of 2,000
With more than 365 people a shared birthday is certain, and in an audience of 2,000 there will be many shared birthdays. If you are at one of the Come Fry With Me shows, you could try asking the people around you.
Did you know?
You need 23 people for the chance to pass 50%: the chance at 22 people is 47.6% and at 23 people it is 50.7%.
Tips and common mistakes
- Do not confuse "any two people" with "someone shares your birthday": they are different questions.
- The result is a probability, not a guarantee. A group of 40 will not always have a match.
- Real groups are not random: birthdays cluster in some months, which makes matches slightly more likely.
- Use the table to check your calculation at common group sizes.
Who this is for
- Students meeting probability for the first time.
- Teachers who want a classroom demonstration.
- Anyone heading to a maths-flavoured show who wants a good fact for the interval.
Related tools and pages
- Monty Hall simulator: another probability result that defies intuition.
- The Mathematics of Love: Hannah Fry's short book on probability and relationships.
- Where to start with Hannah Fry's books: which to read first.
- What to expect at the show: an evening of chance, chaos and questionable decisions.
- All tools: planners, finders and maths toys.
Questions about this tool
What is the birthday paradox?
It is the surprising result that in a group of just 23 people there is a better than 50% chance that two of them share a birthday. It feels wrong because we compare ourselves with others, but a group has many pairs.
Is it really a paradox?
Not in the logical sense. It is a veridical paradox: the answer is true but contradicts intuition. The maths is straightforward once you count pairs of people rather than individuals.
How many people do you need for a 99% chance?
About 57 people give roughly a 99.0% chance, and 70 people give about 99.9%. Certainty only arrives with 366 people, and that is under the simplifying assumptions the calculator uses.
Does the calculator include leap years?
No. It assumes 365 equally likely birthdays. Real birthdays are not perfectly even and leap-day birthdays exist, but the effect on the answer is small.
Why is the chance so high with so few people?
Because the number of pairs grows fast. With 23 people there are 253 pairs, and each pair has a small chance of matching. Those chances add up quickly.
How does this relate to Hannah Fry's work?
Hannah Fry often uses surprising probability results to show how poor our intuition for chance can be, a theme that runs through her talks and books such as The Mathematics of Love and Hello World.
Sources and method notes
- Birthday problem (Wikipedia): derivation, approximations and history.
- Hannah Fry on TED: talks on the maths of everyday life.
Last reviewed 2026-10-06. Spotted a mistake? Tell us. This tool is free and runs entirely in your browser: nothing you enter is sent anywhere.