I think most have heard something like you only need suprisingly few people in a room before two people in the room end up sharing a birthday. But I never bothered to work it out. Let me do that.
First, forget leap years. Let a year have days. Note that if you have 366 people in the room you are guaranteed that someone will share a birthday. On the other end of the spectrum, if there are only two people in the room then the probability that the two of them share a birthday is given by one minus the number of ways they cannot share a birthday divided by the number of ways we can assign them a birthday:
.
In general, let’s say there are people in the room. The following gives the number of ways to assign different birthdays to each of the
people.
The number of ways to assign any birthday to each of the people.
So, the probability that at least one pair out of will share a birthday is given by
Graphing it below. By the probability is already at
.

Probability of sharing a birthday