Roll dice in the browser: type an expression such as two six-sided dice plus three, or pick a common set. You see every die, the total and the exact chance of each total, and each die comes from your browser’s secure random generator.

Not drawn yet
2d6 · totals 2 to 12 · average 7
Chance of each total
212

Dice

Examples: 2d6, d20+5, 3d8-2, 4d6kh3 (roll four, keep the highest three).

History

    Your draws appear here. They stay in this tab unless you turn on “Save on this device”.

    Share this setup

    The dice expression goes into the link.

    More in Random and decisions

    What is the Dice Roller?

    This Dice Roller is a virtual replacement for physical dice. Choose how many standard six-sided dice you want — anywhere from 1 to 6 — and the tool instantly rolls each die fairly and shows you every face along with the combined total. It is handy when you have lost your dice, need a quick random number, or want a clean way to play board and dice games like Yahtzee, backgammon, craps, or dice poker.

    Six six-sided dice showing faces one through six
    A standard set of six-sided dice, each showing a face from 1 to 6.

    How to use it

    Pick one of the quick picks, 1d6 to 6d6 for one to six six-sided dice, or type any dice expression: 2d6+3, d20, 3d8-2, or 4d6kh3 to roll four dice and keep the highest three. Press Roll or the Space bar. Every die is shown, dropped dice are struck out, and the total appears with its exact chance.

    The bar chart shows the chance of every possible total for your dice, computed exactly rather than simulated, and the total you rolled is highlighted. Copy result copies the total and each die, Full screen shows the result to a table, and Copy link shares your dice. Past rolls stay in this tab; turn on Save on this device to keep them.

    How fair is the draw?

    Every result comes from crypto.getRandomValues, the cryptographic random generator built into your browser. The tool turns those numbers into an outcome with rejection sampling, so no outcome gets an extra chance from a leftover remainder, and the animation only replays a result that was decided before it started. Nothing is sent to our server.

    Random does not mean even in the short run: in ten coin flips, seven heads or more happens about one time in six. Over many draws the counts settle near the stated chances. The tool cannot prove to someone else that you did not draw again, so for a prize draw, draw in front of the people taking part.

    The formula explained

    For each die the tool generates a uniform random number \(r\) between 0 (inclusive) and 1 (exclusive), then computes $$\text{face} = 1 + \lfloor r \times 6 \rfloor.$$ Because \(r\) is uniform, each of the six outcomes 1, 2, 3, 4, 5, 6 occurs with probability \(\tfrac{1}{6}\), exactly like a fair die. The total is simply the sum of all faces: $$\text{total} = \sum_{i=1}^{n} \text{face}_i.$$ For \(n\) dice the total ranges from \(n\) (all ones) to \(6n\) (all sixes).

    Advertisement
    Diagram mapping a random number between 0 and 1 to a dice face from 1 to 6
    A random value in [0,1) is split into six equal bands, each mapping to a die face.

    Worked example

    Suppose you roll 2 dice and the random draws are 0.83 and 0.05. Die 1: $$1 + \lfloor 0.83 \times 6 \rfloor = 1 + \lfloor 4.98 \rfloor = 1 + 4 = 5.$$ Die 2: $$1 + \lfloor 0.05 \times 6 \rfloor = 1 + \lfloor 0.30 \rfloor = 1 + 0 = 1.$$ So the faces are [5, 1] and the total is \(5 + 1 = 6\).

    Two-Dice Total Probabilities

    With two fair six-sided dice there are \(6 \times 6 = 36\) equally likely ordered outcomes (first die, second die). The probability of any total is simply the number of ordered pairs that produce it divided by 36:

    $$P(\text{Total} = t) = \frac{ {\text{number of pairs summing to } t}}{36}$$

    Note that order matters when counting: (1,3) and (3,1) are two different outcomes, which is why 4 is three times as likely as 2.

    Total Combinations (ordered pairs) Count out of 36 Fraction Probability
    2 1+1 1 1/36 ≈ 2.78%
    3 1+2, 2+1 2 2/36 = 1/18 ≈ 5.56%
    4 1+3, 2+2, 3+1 3 3/36 = 1/12 ≈ 8.33%
    5 1+4, 2+3, 3+2, 4+1 4 4/36 = 1/9 ≈ 11.11%
    6 1+5, 2+4, 3+3, 4+2, 5+1 5 5/36 ≈ 13.89%
    7 1+6, 2+5, 3+4, 4+3, 5+2, 6+1 6 6/36 = 1/6 ≈ 16.67%
    8 2+6, 3+5, 4+4, 5+3, 6+2 5 5/36 ≈ 13.89%
    9 3+6, 4+5, 5+4, 6+3 4 4/36 = 1/9 ≈ 11.11%
    10 4+6, 5+5, 6+4 3 3/36 = 1/12 ≈ 8.33%
    11 5+6, 6+5 2 2/36 = 1/18 ≈ 5.56%
    12 6+6 1 1/36 ≈ 2.78%

    The counts add up to \(1+2+3+4+5+6+5+4+3+2+1 = 36\), so the probabilities sum to exactly 1. The shape is a symmetric triangle centred on 7 — the single most likely total, and the reason 7 is the pivotal number in dice games such as craps. Totals of 2, 3, 11 and 12 each sit at the edges with only one or two combinations apiece.

    Advertisement

    Totals and Odds by Number of Dice

    Each extra die multiplies the size of the sample space by 6, shifts the possible range upward, and tightens the distribution around the middle. For \(n\) dice:

    $$\text{Outcomes} = 6^{n}, \qquad \text{Min} = n, \qquad \text{Max} = 6n, \qquad E[\text{Total}] = 3.5n$$
    Dice (n) Possible outcomes (6ⁿ) Min total Max total Most likely total Expected total (3.5n) All dice the same face (1/6ⁿ⁻¹)
    1 6 1 6 all equally likely (1–6) 3.5 1 (certain)
    2 36 2 12 7 7 1/6 ≈ 16.67%
    3 216 3 18 10 and 11 (tied) 10.5 1/36 ≈ 2.78%
    4 1,296 4 24 14 14 1/216 ≈ 0.463%
    5 7,776 5 30 17 and 18 (tied) 17.5 1/1,296 ≈ 0.077%
    6 46,656 6 36 21 21 1/7,776 ≈ 0.0129%

    Two patterns are worth noting. First, when \(n\) is even the expected total \(3.5n\) is a whole number and is itself the single most likely total; when \(n\) is odd the expected value falls halfway between two integers, and those two neighbouring totals tie for most likely (10 and 11 with three dice, 17 and 18 with five). Second, the extreme totals get rarer very fast: rolling the maximum has probability \(1/6^{n}\), so six sixes occur once in 46,656 rolls on average, while a single six occurs once in six.

    The "all dice the same face" column fixes the first die and requires each remaining die to match it, giving \(6 \cdot (1/6)^{n} = 1/6^{\,n-1}\). With one die the condition is trivially satisfied, which is why the probability is 1.

    Key Terms Explained

    • Fair (unbiased) die — a six-sided die on which each face has probability exactly \(1/6\). This roller simulates fair dice, so no face is weighted and no total is "due" after a dry spell. A physical die can be slightly biased by rounded corners, drilled pips or manufacturing tolerance; a simulated one cannot.
    • Uniform distribution — a distribution in which every value in the range is equally likely. A single die face is uniform on \(\{1,2,3,4,5,6\}\), which is why the one-die row of the table above has no single "most likely" result. Note that the total of two or more dice is not uniform, even though each die is.
    • Independent events — events where the outcome of one tells you nothing about the other. Each \(d_i\) in the formula is drawn independently, so the probability of a specific ordered outcome is the product of the individual probabilities: \(P(6,6) = \tfrac{1}{6} \cdot \tfrac{1}{6} = \tfrac{1}{36}\). Independence is also what makes \(6^{n}\) the correct count of outcomes.
    • Floor function ⌊x⌋ — the greatest integer not exceeding \(x\); it simply discards the fractional part of a non-negative number. In \(d_i = 1 + \lfloor 6 \cdot \text{random}() \rfloor\), the raw value \(6 \cdot \text{random}()\) lies in \([0, 6)\), the floor turns it into one of the integers 0–5, and adding 1 shifts that to a die face of 1–6. For example \(\lfloor 4.87 \rfloor = 4\), giving a face of 5.
    • Outcome vs. event — an outcome is one complete, indivisible result of the roll, such as the ordered pair (3, 4) on two dice. An event is any set of outcomes you care about, such as "the total is 7", which collects the six outcomes (1,6), (2,5), (3,4), (4,3), (5,2) and (6,1). Probabilities of events are found by counting the outcomes inside them.
    • Sample space — the complete set of possible outcomes. For \(n\) six-sided dice its size is \(6^{n}\): 6 for one die, 36 for two, up to 46,656 for six. Because every outcome in this sample space is equally likely, \(P(\text{event}) = (\text{outcomes in the event}) / 6^{n}\).
    • Expected value — the long-run average of a quantity, not a value you should expect on any single roll. For one die it is \(E[d] = \frac{1+2+3+4+5+6}{6} = \frac{21}{6} = 3.5\), and because expectation adds across independent dice, \(n\) dice average \(3.5n\). Note that 3.5 is not even a possible face — the average of a discrete variable need not be attainable.
    • Pseudorandom number generator (PRNG) — the algorithm behind \(\text{random}()\). It produces a deterministic sequence of numbers in \([0, 1)\) that passes statistical tests for randomness but is computed from an internal seed rather than a physical process. For games, classroom demonstrations and probability experiments a standard PRNG is entirely adequate; cryptographic keys and regulated gambling equipment require certified hardware or cryptographically secure generators instead.

    FAQ

    Are the dice fair? Yes. Each face has an equal \(\tfrac{1}{6}\) chance, and the dice are independent of each other.

    What is the most likely total with two dice? A total of 7 is the most common, occurring with probability \(\tfrac{6}{36} = \tfrac{1}{6}\), while 2 and 12 are the rarest at \(\tfrac{1}{36}\) each.

    Why do I get different results each time? The roller uses a random source, so like real dice the outcome changes on every roll.

    Last updated:

    Most popular in Math and Statistics

    View all Math and Statistics calculators