Dice Probability in Excel
Build a two-dice probability calculator in Excel with an outcome grid, COUNTIF formulas and exact fractions.
Make a two-D6 outcome grid
Enter 1 through 6 in cells B1:G1 and A2:A7. In B2 enter =$A2+B$1, then fill across B2:G7. Each of the 36 cells is one equally likely ordered outcome. Both (2,5) and (5,2) appear separately.
Calculate exact and cumulative dice probabilities
For Exactly 7 use =COUNTIF(B2:G7,7)/36, which returns 1/6. For At least 7 use =COUNTIF(B2:G7,">=7")/36, giving 7/12. For At most 7 use =COUNTIF(B2:G7,"<=7")/36, also 7/12. Format the output as a percentage or fraction; formatting changes the display, not the value.
List sums 2 through 12 in I2:I12 and enter =COUNTIF($B$2:$G$7,I2)/36 in J2, filling down. A column chart of those probabilities shows the triangular two-dice distribution.
Change the target and check your spreadsheet
Put a target total in L2. Use =COUNTIF($B$2:$G$7,L2)/36 for that exact total, or =COUNTIF($B$2:$G$7,">="&L2)/36 for at least that total. The ampersand joins the comparison operator to the target cell; keep the outcome range fixed when copying the formula.
Check that the outcome grid contains 36 numbers, that =SUM(J2:J12) equals 1 before display rounding, and that totals 2 and 12 each have probability 1/36. Total 7 must have probability 1/6. A target below 2 has an at-least chance of 100%; a target above 12 has 0%. The dice probability calculator provides a separate outcome table for comparison.
A random spreadsheet roll is a simulation
=RANDBETWEEN(1,6)+RANDBETWEEN(1,6) samples one two-D6 total. It changes when the worksheet recalculates and cannot replace the exact 36-outcome table. A short simulation will not have exactly the theoretical proportions; save sampled values separately if you need to retain them.
Microsoft documents the COUNTIF criteria and cell-reference syntax, VAR.P population variance and RANDBETWEEN recalculation behaviour.
Expected value and larger dice distributions
Use =AVERAGE(B2:G7) for mean 7. This grid represents the full population, so =VAR.P(B2:G7) returns 35/6 and =STDEV.P(B2:G7) about 2.415. For a weighted single die, divide SUMPRODUCT(face_range,weight_range) by SUM(weight_range).
Larger dice counts require a recurrence or a larger enumeration, rather than treating possible sums equally. The exact dice probability calculator builds those distributions directly and displays an outcome table for checking your spreadsheet. These formulas assume English Excel function names and comma separators; your locale may use different names or separators.
