This is quite a famous problem called the birthday paradox. The way to do it is via the reverse, what is the probability that in a group of n people two of them do not share the same birthday?

Well do it like this, suppose we have two people, then the probability they don't share a birthday is . Now for the next person there are 363 days left, so then in a group of 3 the probability they don't share any birthdays is (the probability that first two do not share the birthday and the probability that the third one does not share the birthday of the other two).

Now induct to come up with a formula for n people and then solve it. Let me know if you have any problems.