Skip to content
You asked, we listened. Applied Digital Skills is now better integrated with Google Classroom. Seamlessly import your classes, student roster, and more.

3. Count Ways to Roll Dice with a Function

Playback Speed:

In the previous video, you created a table of possible outcomes when rolling two dice.

In this video, you will count the number of chances your teacher has of rolling each number.

First, list all the possible outcomes, or sums of the two dice, in row J of your spreadsheet.

List the lowest number in your table...

And keep adding outcomes until you reach the highest number in your table.

Next, count the number of ways your teacher could roll each outcome.

Some outcomes appear several times, like 5...

And some outcomes appear only once, like 12.

If your teacher rolls a 2 with the purple die and 3 with the orange die, the result would be five.

But your teacher could also get a five by rolling a 3 with the purple die and a 2 with the orange die.

Or a 4 and a 1.

But there’s only one way to roll a 12.

If you choose an outcome with multiple combinations, you’ll have a better chance of getting your longer lunch.

Scan the table to find the number of ways your teacher can roll a two.

Two appears only once in the possible outcomes table, so type one in cell K3.

You could continue counting how many times each number appears in the table yourself, or you could use the COUNTIF function.

Functions make calculations easier, faster, and more accurate.

The COUNTIF function counts the number of times a specific value appears in a range of cells.

In this example, the COUNTIF function is comparing the possible outcomes with the possible numbers that can be rolled.

In the first cell of the Number of Ways to Roll column, type an equals sign, then COUNTIF.

Select the COUNTIF formula from the menu.

Then, select all the possible outcomes in the table.

Hold down the shift key, then click on cells C4 and H9.

This is the range, or list of numbers to include.

The second number is the criterion, or the condition to be met.

In this case, it’s the value of the outcome.

Type a comma, then select the first cell in the Possible Outcomes column.

In this example, it’s J3. Close the parenthesis to end the function and press enter.

The function calculates how many times the number 2 appears in the range you selected.

Next, to use the same range with different criterion, make the range references absolute.

The range of cells in your table stays the same while the possible outcome changes.

Add dollar signs around the cell references in the range.

Finally, copy the formula to calculate the ways to roll the other outcomes.

Nice work!

Now you can see exactly how many ways your teacher can roll each number.

Use the COUNTIF function to examine all kinds of data.

You could count: How many number one hits your favorite band had in the last decade Or how many of your classmates joined a school club last semester.

In the next video, you will use this data to calculate the probability of each outcome.

Now, it’s your turn: List the possible outcome, Count the number of possible combinations, And use the COUNTIF function to find the number of ways your teacher could roll each number.


  1. List the possible outcomes.
  2. Count the number of possible combinations.
  3. Use the COUNTIF function to find the number of ways your teacher could roll each number.