University of Illinois at Urbana-Champaign
Office for Mathematics, Science, and Technology Education
College of Education @ University of Illinois

The Birthday Problem

The Birthday Problem, MSTE, University of Illinois


Happy Birthday! There's a birthday in your class today! Or will there be two? How likely is it that two people in your class have the same birthday? Say your class has 28 students.

There are a number of ways to approach this problem. The most common is to take a survey and see if it happens that two birthdays fall on the same day. But if it happens in the surveyed class, will it occur in another class with different students? The question of how likely it is for any given class is still unanswered.

Another way is to survey more and more classes to get an idea of how often the match would occur. This can be time consuming and may require a lot of work. But a computer can help out. Below is a simulation of the birthday problem. It will generate a random list of birthdays time after time.


Choose a number for your class size and run several trials with that size. tThe simulation will graph the average calculated probability of each class size. The list on the right will display the last set of birthdays generated.

The results table at the bottom of the simulation will display trial statistics for the current class size.

The class size can be changed by clicking on the graph, entering a new number in the text box, or using the arrow keys while the graph is selected.

Click in the grid or type a number between 1 and 60 to select the size of the group to simulate. Then click Calculate a few times to see the likelihood that 2 people in a group of that size have the same birthday.
Note: Duplicate birthdays will be highlighted and in bold
Contains trial statistics such as experimental probability or average number of duplicate dates
Number of dates duplicated 0
Average # of dates duplicated 0.0
Trial effect on average 0.0
Experimental probability 0.0
Number of trials 0

Now what do you think the probability of a match is? It may surprise you that there were so many matches. Let's look at an explanation for this problem.


Applet Source, Written by Nicholas Exner, modified by Michael McKelvey, converted to javascript and HTML5 by Daniel Hefner.


Social Media Links:

Additional navigation options:

1994-2016 MSTE | 505 East Green St., Suite 102, Champaign, IL 61820 | (217) 244-7486