The probability of two people having a birthday X days apart when N people are in room is calculated using a monte carlo simulation . Note that due to the nature of simulations the results will vary during consecutive runs using the same numbers