Number of days in a year = 365
Therefore, total possible outcomes = 365
If their birthday was on the same day then no. of favorable outcomes =1
Then, required Probability would have been = 1365
Hence, the probability that two friends have different birthdays = 1 – 1365=364365