Interview Prep

Birthday Paradox Answer: 23 People [Solved]

Birthday paradox answer featured image: 23 people, one shared birthday

Answer: 23 people. The birthday paradox answer is 23 people, because a group of 23 gives a 50.73% chance that two people share a birthday. With 22 people, the chance is only 47.57%. So 23 is the smallest group where a shared birthday becomes more likely than not.

The question sounds simple. You walk into a room and ask how many people you need before two of them probably share a birthday. Most candidates guess a large number. They think of 365 days and guess 183, or half the year. That guess feels safe, but it answers a different question. It answers how many people you need before someone probably shares your birthday. This puzzle asks about any two people sharing a birthday with each other. That one word changes everything.

Interviewers ask this question in probability and quant interviews because it tests how you think, not what you memorised. A strong candidate states the assumptions first, flips the problem around, and checks the boundary between 22 and 23. A weak candidate guesses 183 and stops there. This walkthrough shows the full method, so you can answer it cold in an interview.

The Birthday Paradox Answer in Four Steps

Start with two ground rules. First, assume a year has 365 days and ignore 29 February. Second, assume every birthday is equally likely and birthdays are independent. These are simplifications, but they are the standard interview setup. Real birthdays cluster in some months, and that clustering only raises the chance of a match, so the interview answer stays safe.

Step 1: Flip the question. Counting shared birthdays directly is messy, because many pairs could match at once. Instead, count the opposite case: the chance that nobody shares a birthday. Then subtract that chance from 1. This complement trick is the key move in the whole puzzle.

Step 2: Walk people into the room one by one. The first person can have any birthday, so the chance of no clash so far is 365 out of 365. The second person must avoid the first birthday, so the chance is 364 out of 365. The third person must avoid two birthdays, so the chance is 363 out of 365. Each new person has one fewer safe day.

Step 3: Multiply the chances. For 23 people, the chance that all birthdays differ is the product of 365/365, 364/365, 363/365, and so on down to 343/365. That product comes to 49.27%. Now subtract from 100%. The chance of at least one shared birthday is 100% minus 49.27%, which is 50.73%.

Step 4: Check the boundary. For 22 people, the same product gives a 52.43% chance of no match, so the chance of a match is 47.57%. That is below half. Add one more person and the chance crosses 50%. So 23 is the exact tipping point, not a rough guess.

How Fast the Chance Grows

The chance does not creep up slowly. It jumps, because every new person adds a whole set of new pairs to check. A group of 10 people has 45 pairs. A group of 23 people has 253 pairs. A group of 30 people has 435 pairs. Each pair is a fresh chance for a match, so the total chance climbs far faster than most people expect.

People in the room Chance of a shared birthday
10 11.69%
20 41.14%
22 47.57%
23 50.73%
30 70.63%
40 89.12%
57 99.01%

Notice the jump from 22 to 23. It is small in people but decisive in probability, because it crosses the 50% line. By 57 people, a shared birthday is almost certain at 99.01%. And if you want a guarantee rather than a probability, you need 366 people under the 365-day setup, because the 366th person must repeat a birthday already taken. Count 29 February as a real date and the guarantee number becomes 367.

Why the Birthday Paradox Answer Feels Wrong

The puzzle feels like a paradox because your brain answers the wrong question. When you hear “shared birthday”, you picture yourself in the room and ask whether anyone shares your birthday. That is a much harder event. With 22 other people, the chance that one of them shares your birthday is only 5.86%. You would need 253 other people before that chance passed 50%. That number, 253, is a coincidence: it is also the number of pairs in a group of 23, but the two facts are different ideas.

Here is a second way to see it. Think of pairs, not people. In a group of 23, there are 253 pairs, and each pair has a 1 in 365 chance of matching. A rough estimate multiplies 253 by 1/365, which gives about 0.69 expected matching pairs. An expected value near 0.7 points to roughly a 50% chance of at least one match. The estimate is not exact, because pairs overlap, but it shows why 23 lands near the tipping point instead of 183.

Now try a small case by hand, because interviewers love a small case. Take 5 people. The chance of no match is 365/365 times 364/365 times 363/365 times 362/365 times 361/365, which is 97.29%. So the chance of a match is only 2.71%. With 2 people, the chance is just 0.27%, or 1 in 365. These small cases confirm the method works before you trust it at 23.

What the Interviewer Is Testing in the Birthday Paradox Answer

First, the interviewer tests whether you spot the complement trick. Direct counting of matches is a trap, and candidates who walk into it usually stall. Flipping to “no match” and subtracting from 1 shows clean probabilistic thinking.

Second, the interviewer tests whether you count pairs instead of people. The gap between 23 and 183 is the whole puzzle. Candidates who explain the 253 pairs show they understand why the answer is small. Candidates who just quote 23 without the pairs reasoning have memorised an answer, and a good interviewer will notice.

Third, the interviewer tests whether you state assumptions and handle edge cases. Mention the 365-day simplification, the leap-day note, and the difference between “any two people” and “someone matching you”. Those three points turn a one-line answer into a complete interview performance.

Finally, the interviewer may push you further. A common follow-up asks how many people you need for a 99% chance. The answer is 57. Another follow-up asks for a guarantee. The answer is 366 under the 365-day setup. If you know the table above, both follow-ups are easy.

Common Traps to Avoid

Do not say 183. That is half of 365, and it is the answer to a different question. Do not say 365. That is the number of days, not the tipping point. Do not claim the answer is exact in real life. Real birthdays are not uniform, twins exist, and leap years add a day. The 23-person result is exact under the stated assumptions, and in the real world the chance is slightly higher, not lower.

Also, do not confuse “at least one match” with “exactly one match”. The 50.73% figure covers one match, two matches, and even a triple birthday. The complement method handles all of those cases at once, which is exactly why it is the right tool here.

Try Another Puzzle

Ready for the next one? Try the Missing Dollar Riddle, where $27 plus $2 seems to lose a dollar, or Cheryl’s Birthday Puzzle, where three short statements pin down one exact date. Both use the same skill this puzzle rewards: slow down, restate the question, and check what is actually being asked.

Frequently asked questions

Is the birthday paradox answer really 23? Yes, under the standard assumptions of 365 equally likely birthdays. A group of 23 gives a 50.73% chance of a shared birthday, while 22 gives only 47.57%.

Why is it called a paradox? It is not a true logical paradox. It is called a paradox because the answer contradicts most people’s first guess. Your intuition counts people, but the math counts pairs, and pairs grow much faster.

How many people give a 99% chance? You need 57 people for a 99.01% chance of a shared birthday. With 70 people, the chance reaches 99.92%.

One response to “Birthday Paradox Answer: 23 People [Solved]”

Leave a Reply

Your email address will not be published. Required fields are marked *