Dice Probability Calculator
Counts every equally likely way fair dice can land and divides the results that meet a target by the total, the number of sides raised to the number of dice. Sums are built one die at a time by convolution. Rolls that keep the highest or lowest dice, such as advantage or 4d6 drop the lowest, are counted face by face. It reports the exact chance, the average, the standard deviation and the distribution around the target, without simulation.
Choose a roll, such as a d20 with advantage or 4d6 with the lowest die dropped, or set the dice yourself, then name a target. The calculator counts every way the dice can land and returns the exact chance of reaching the target, the average, the spread and the totals around the target. Choosing a roll fills in the four boxes under it, and moves the target to a typical one if the new dice cannot reach yours. Change any of the four and the roll switches to Custom.
How the calculation works
A fair die lands on each face equally often, so every ordered result of a roll is equally likely. Two d20s have 20 × 20 = 400 results, three d6s have 216, and in general the count is the number of sides raised to the number of dice. The chance of a total is the number of results that produce it, divided by all of them:
P(total = t) = ways(t) ÷ sidesdice
For dice that are added, the calculator builds the count one die at a time. Grinstead and Snell's Introduction to Probability calls this a convolution. The ways to reach a total with one more die are the ways to reach each of the totals from 1 to sides lower, added together:
waysn(t) = waysn−1(t − 1) + waysn−1(t − 2) + … + waysn−1(t − sides)
Rolls that keep only some of the dice need a different count. When one die is kept there is a shortcut, because the highest of several dice falls below a target only when every die does:
P(highest of n dice ≥ t) = 1 − ((t − 1) ÷ sides)n
To keep two or more dice, the calculator works down from the top face. For each face it chooses how many dice show it, counts the ways to pick those dice, and adds the face to the kept total until enough dice are kept. The dice left over may show anything lower. Keeping the lowest dice is the same count with the faces reversed. A modifier moves every total by the same amount, so it shifts the average and leaves the spread alone.
The average is each total weighted by its chance. The standard deviation is the square root of the weighted squared distances from that average.
A worked example at the defaults
The defaults roll a d20 with advantage against a target of 15. Of the 400 results, the roll fails only when both dice show 14 or less, which is 14 × 14 = 196 of them. The other 204 succeed, so the chance is 204 ÷ 400 = 51.00%, about 1 in 2. A single d20 reaches 15 on 6 faces of 20, or 30.00%. With disadvantage both dice must reach it, which happens in 36 results of 400, or 9.00%.
The average with advantage is 13.825, against 10.5 for one d20, and the standard deviation is 4.71. The most likely result is 20, at 9.75%, because 39 of the 400 results contain at least one 20. The table lists every total from 1 to 20 with the chance of rolling it exactly, that total or more, and that total or less. With a modifier of +5, the totals run from 6 to 25 and the chance of 15 or more rises to 79.75%.
What advantage is worth
The fifth-edition System Reference Document sets out the rule. When a roll has advantage or disadvantage, you roll a second d20 and use the higher of the two with advantage and the lower with disadvantage. Several sources of advantage do not stack, and a roll that has both has neither.
The gain depends on the target, and it is largest in the middle. When the die needs an 11, a plain d20 succeeds 50.00% of the time, advantage 75.00% and disadvantage 25.00%, a swing of 25 points either way. When it needs a 15 the gain is 21 points, and when it needs a 20 it is 4.75 points. A 20 on the die comes up 9.75% of the time with advantage, 5.00% without and 0.25% with disadvantage. A 1 is the mirror image, at 0.25% with advantage and 9.75% with disadvantage. Advantage lifts the average by 3.325, from 10.5 to 13.825, and disadvantage lowers it to 7.175. A third d20, keeping the highest, raises the chance of 15 or more to 65.70%.
4d6, drop the lowest
For random ability scores the same document says: "Roll four d6s and record the total of the highest three dice." That is the 4d6 roll here: four dice, keep the highest three. Its 1,296 results average 12.245 with a standard deviation of 2.85, and the most likely score is 13, at 13.27%. Three plain d6s average 10.5.
An 18 needs three sixes among the four dice, which happens in 21 results, or 1.62%. On 3d6 it is 1 result in 216, or 0.46%. A score of 15 or more comes up 23.15% of the time, against 9.26% on 3d6, and a score of 8 or less 10.49% of the time. The document's standard array of 15, 14, 13, 12, 10 and 8 averages 12.
Plain sums follow the same pattern on a smaller scale. On 2d6 a 7 is the most likely total, with 6 of the 36 results or 16.67%, and 2 and 12 have one result each, 2.78%. Eight d6 added together average 28 and reach 30 or more 38.02% of the time.
Three dice and a gambler's complaint
In a short note on dice printed in his collected works, Galileo takes up a puzzle that had been put to him. A 9 and a 10 can each be made from six combinations of three numbers, yet players had found from long observation that 10 was the better throw. He counts the 216 results of three dice and shows that 10 can be made by 27 of them and 9 by only 25. Grinstead and Snell date the question to the early 1600s. Set the calculator to 3d6 and exactly 10, and it reports 27 of 216, or 12.50%. For 9 it reports 25 of 216, or 11.57%.
Decades later the Chevalier de Méré brought his dice problems to Blaise Pascal. In a letter to Pierre de Fermat dated 29 July 1654, Pascal reports that the advantage of undertaking to throw a six with one die in four throws is as 671 is to 625. Keep the highest of four d6 with a target of 6 and the calculator finds the same 671 results of 1,296, or 51.77%. De Méré's complaint was that a double six in 24 throws of two dice was a losing bet, although 24 is to 36 as 4 is to 6. Grinstead and Snell note that Pascal showed 25 throws are needed for a favorable bet. The same letters settled how to divide the stakes of an unfinished game, and many believe they started the serious study of probability.
What the calculator leaves out
The count assumes fair dice that do not influence one another. It handles up to 20 dice with up to 100 sides each, keeps any number of the highest or lowest, and adds one fixed modifier. It does not model rerolls, exploding dice, dice of different sizes in one roll, or a contest between two rolls. Critical hits and automatic failures are rules of a game rather than of the dice, so the chance shown is only that of the total.
Nothing here is simulated. A random number generator rolls dice; this page counts results, so the same inputs always give the same answer. Percentages are rounded to two decimals, and a chance that is not exactly zero is never shown as 0%. It reads "under 0.01%", and a near-certainty reads "over 99.99%". The round-number line gives the nearest simple fraction, such as 2 in 9 for 23.15%. Above about 9 quadrillion possible results the calculator still gives the chance but stops listing exact counts.
Dice have no memory, but a deck does: each card taken changes what is left. For opening hands and draws, use the card draw probability calculator.
The roll rules described here come from the System Reference Document 5.2.1 by Wizards of the Coast LLC, which is licensed under the Creative Commons Attribution 4.0 International License.
Frequently asked questions
What is the chance of rolling 15 or higher with advantage?
51.00%. Of the 400 results of two d20s, 204 have at least one die showing 15 or more. A single d20 does it 30.00% of the time and a roll with disadvantage 9.00%. With a +5 modifier, the chance of a total of 15 or more with advantage rises to 79.75%.
How much is advantage worth as a bonus?
It depends on the target. When the die needs an 11, advantage lifts the chance from 50.00% to 75.00%, the same as a +5 bonus. When it needs a 15 the gain is 21 points, close to +4, and when it needs a 20 the gain is 4.75 points, less than +1. On average the higher of two d20s is 13.825, which is 3.325 above a single d20.
What is the average of 4d6 drop the lowest?
12.245, against 10.5 for 3d6. The most likely score is 13, at 13.27%. An 18 comes up 1.62% of the time, 21 results in 1,296, compared with 0.46% on 3d6, and a score of 15 or more comes up 23.15% of the time. The lowest score, 3, needs four ones: 1 result in 1,296, or 0.08%.
Why is 10 more likely than 9 on three dice?
Both totals can be made from six combinations of three numbers, but the combinations are not equally common. Three different numbers can land in 6 orders, a pair with a different number in 3, and a triple in 1. Counted that way, as Galileo did, 10 has 27 of the 216 results (12.50%) and 9 has 25 (11.57%). On 3d6 the totals 10 and 11 tie as the most likely.
What are the odds of each total on 2d6?
Two six-sided dice have 36 results. A 7 is the most likely total, with 6 results or 16.67%, and 2 and 12 are the rarest, with 1 result each or 2.78%. A total of 7 or more comes up 58.33% of the time. Choose the 2d6 roll and the table lists every total with the chance of rolling it exactly, that total or more, and that total or less.
Does the calculator simulate dice rolls?
No. It counts every equally likely result exactly, so the answer never changes from one run to the next. Sums are built one die at a time, and rolls that keep the highest or lowest dice are counted face by face. The limits are 20 dice and 100 sides per die.
Sources
- Grinstead and Snell's Introduction to Probability (second edition, GNU FDL version), Dartmouth College, 2006
- Concerning an Investigation on Dice (Sopra le scoperte dei dadi), Galileo Galilei, translated by E. H. Thorne, University of York, Department of Mathematics
- Fermat and Pascal on Probability: the letters of 1654 in English, University of York, Department of Mathematics
- System Reference Document 5.2.1 (CC BY 4.0), Wizards of the Coast LLC