The birthday problem without formulas
In a room of 23 people, the chance that two share a birthday is just over one half. Most people guess something closer to 23/365, so it is worth seeing where the intuition goes wrong.
Count pairs, not people
The question is not whether someone shares your birthday. It is whether any two people match.
With 23 people there are 23 × 22 / 2 = 253 pairs, and each pair is a separate chance of a match.
Building the number
It is easier to compute the chance that nobody matches. The second person avoids the first with probability 364/365, the third avoids both with 363/365, and so on:
364/365 × 363/365 × … × 343/365 ≈ 0.493
So the chance of at least one match is about 1 − 0.493 = 0.507.
With 40 people it is around 89%, and with 60 it is above 99%.
The real world makes matches slightly more likely still, because births are not spread evenly across the year.