Dice games

Online Dice Explained: Virtual Dice Rollers, Polyhedral Dice Odds and Dice Games for Money

Quick answer

Online dice use a random number generator to pick each face, so a fair virtual die gives every face the same chance: 1 in 4 on a d4, 1 in 20 on a d20. Sums of several dice are found by counting combinations. Free dice rollers have no payout; gambling dice add a multiplier and a house edge.

Key facts
Fair d20, any face1 in 20 (5%)
Average roll of a dN(N + 1) ÷ 2, e.g. 10.5 on a d20
3d6 outcomes6 × 6 × 6 = 216 equally likely
Most likely 3d6 totals10 and 11, 27 of 216 ways each (12.5%)
Free dice rollersNo stake, no payout, no house edge
Crypto diceYou choose the win chance; multiplier set by the house edge

Online dice are virtual dice rolled by a computer instead of your hand. You'll find them in two very different places: free dice rollers for board games and tabletop role-playing games, and dice games for money in online casinos. Both rely on the same idea. A fair online die gives every face an equal chance, so a d6 lands on each number 1 time in 6 and a d20 lands on each number 1 time in 20.

This guide explains how a dice roller turns random numbers into faces, gives the exact probabilities for the full polyhedral set from d4 to d20 (the dice used for Dungeons & Dragons and similar games), shows how to work out sums like 3d6, and explains where gambling dice differ from a plain roller. For crypto dice specifically, see our dice crypto guide.

How online dice rollers work

Every online die starts with a random number generator (RNG): code that produces a stream of numbers with no usable pattern. Most software uses a pseudo-random generator, which is an algorithm that produces numbers that behave randomly for practical purposes. The roller then maps that number onto the faces of the die.

The mapping is where a roller can go wrong. Suppose the generator produces a random byte, a whole number from 0 to 255, and the roller computes "byte mod 6" to choose a face:

256 = 42 × 6 + 4

256 possible bytes don't divide evenly into 6 faces. Four faces get 43 bytes each and two faces get 42, so those four come up slightly more often (43/256 = 16.80% vs 42/256 = 16.41%).

Well-written rollers avoid this "modulo bias" by discarding the leftover values and drawing again, or by using a large enough random number that the bias becomes negligible. You can't usually see a free roller's code, but you can test it (see the fairness check below).

Gambling dice add one more layer. A provably fair crypto dice game derives each roll from a hash of a server seed, a client seed and a counter, as one operator's implementation notes describe, so the result can be recomputed after the bet. A tabletop roller has no need for that, because nobody is paid on the result.

Polyhedral dice probabilities: d4 to d20

A standard polyhedral set has six shapes: d4, d6, d8, d10, d12 and d20. On a fair die every face is equally likely, which makes the math straightforward. Probability is favourable outcomes divided by total outcomes, as Britannica's guide to gambling odds puts it:

P(any one face on a dN) = 1 ÷ N average roll = (N + 1) ÷ 2

d20: 1 ÷ 20 = 5%, average (20 + 1) ÷ 2 = 10.5. d8: 1 ÷ 8 = 12.5%, average 4.5.

Exact probabilities for a fair polyhedral dice set (calculated)
DieFacesChance of any one faceAs a percentageAverage rollChance of the top half
d441 in 425.00%2.575.0% (2+)
d661 in 616.67%3.566.7% (3+)
d881 in 812.50%4.562.5% (4+)
d10101 in 1010.00%5.560.0% (5+)
d12121 in 128.33%6.558.3% (6+)
d20201 in 205.00%10.555.0% (10+)

The last column is the chance of rolling at least half the maximum: for a d20 that's 10 or more, which is 11 faces out of 20 (55%). Notice that "half or better" is always a little over 50%, because the halfway face itself counts.

Rolling a target number or higher on a d20

Many tabletop games ask you to roll a target number or higher on a d20. Count the faces that succeed:

P(roll ≥ X on a d20) = (21 − X) ÷ 20

Need 15 or higher: (21 − 15) ÷ 20 = 6 ÷ 20 = 30%.

A common variant is to roll two d20s and keep the higher (or the lower). The two dice are independent, so the multiplication rule applies: the chance that both dice miss is the single-die miss chance squared.

keep higher: P = 1 − ((X − 1) ÷ 20)² keep lower: P = ((21 − X) ÷ 20)²

Need 15+: keep higher = 1 − (14/20)² = 1 − 0.49 = 51%. Keep lower = (6/20)² = 9%.

Chance of hitting a target on a d20, one die vs two (exact)
Target on a d20One d20Two d20, keep higherTwo d20, keep lower
5+80.00%96.00%64.00%
8+65.00%87.75%42.25%
10+55.00%79.75%30.25%
12+45.00%69.75%20.25%
15+30.00%51.00%9.00%
18+15.00%27.75%2.25%
20+5.00%9.75%0.25%

Keeping the higher of two dice helps most in the middle: a 10+ goes from 55% to 79.75%. A natural 20 goes from 5% to 9.75%, nearly double but still rare.

Sums of several dice

When you add dice together, totals in the middle become more likely, because more combinations reach them. The method is always the same: count the combinations. The multiplication principle says that if one step can happen m ways and the next n ways, together they happen m × n ways.

number of outcomes for k dice with N faces = N^k

3d6: 6 × 6 × 6 = 216 equally likely outcomes. 2d20: 20 × 20 = 400.

P(total) = ways to make the total ÷ N^k

3d6, total 10: 27 ways ÷ 216 = 12.5%.

Here is the full 3d6 distribution, which we calculated by counting every one of the 216 combinations:

3d6: chance of each total Exact, from all 216 combinations
3: 0.46% 34: 1.39% 45: 2.78% 56: 4.63% 67: 6.94% 78: 9.72% 89: 11.57% 910: 12.50% 1011: 12.50% 1112: 11.57% 1213: 9.72% 1314: 6.94% 1415: 4.63% 1516: 2.78% 1617: 1.39% 1718: 0.46% 18max 12.50%
Three six-sided dice: exact probability of every total
3d6 totalCombinationsChanceRoughly
31 of 2160.46%1 in 216.0
43 of 2161.39%1 in 72.0
56 of 2162.78%1 in 36.0
610 of 2164.63%1 in 21.6
715 of 2166.94%1 in 14.4
821 of 2169.72%1 in 10.3
925 of 21611.57%1 in 8.6
1027 of 21612.50%1 in 8.0
1127 of 21612.50%1 in 8.0
1225 of 21611.57%1 in 8.6
1321 of 2169.72%1 in 10.3
1415 of 2166.94%1 in 14.4
1510 of 2164.63%1 in 21.6
166 of 2162.78%1 in 36.0
173 of 2161.39%1 in 72.0
181 of 2160.46%1 in 216.0

Two six-sided dice work the same way with 36 combinations; 7 is the most likely total at 6 of 36. Our craps odds guide shows how that distribution drives every craps bet.

At least one success in several rolls

To find the chance of something happening at least once, work out the chance it never happens and subtract from 1:

P(at least one N on k rolls of a dN) = 1 − ((N − 1) ÷ N)^k

At least one 20 in 10 rolls of a d20: 1 − (19/20)^10 = 1 − 0.599 = 40.1%.

Chance of at least one top roll (exact)
RollsAt least one 6 on a d6At least one 20 on a d20
116.7%5.0%
559.8%22.6%
1083.8%40.1%
2097.4%64.2%
3099.6%78.5%
50100.0%92.3%

Even 20 rolls of a d20 give only about a 64% chance of seeing a 20. Our chance calculator works this out for any probability and number of tries.

Checking a random dice roller against the math

The best evidence that a dice generator is fair is a large sample that matches the exact figures. In probability terms, the share of each result settles towards its true chance as the number of rolls grows; OpenStax describes probability as this long-run relative frequency.

We did this for two six-sided dice. Our script rolled 1,000,000 simulated pairs and compared the totals with the exact counts:

A random generator vs exact two-dice odds
Two-dice totalExact chanceOur 1M-roll simulation
22.78%2.75%
35.56%5.56%
48.33%8.25%
511.11%11.14%
613.89%13.89%
716.67%16.62%
813.89%13.95%
911.11%11.13%
108.33%8.35%
115.56%5.58%
122.78%2.77%

No total was more than 0.09 percentage points from the exact figure. That's what a fair generator looks like at a million rolls.

You can run a smaller version on any online dice roller. Roll a d6 600 times and tally the faces: each should land near 100. Expect natural scatter of roughly 10 either way; a face sitting at 60 or 140 would be a red flag.

Gambling dice vs non-gambling dice

The same random number can feed very different products:

Free dice roller / virtual tabletop Crypto dice (roll under/over) Craps
What you roll Any polyhedral dice A number from 0 to 100 Two six-sided dice
Stake and payout None Stake × multiplier Fixed payouts per bet
Who sets the odds The die You choose the win chance The bet you pick
House edge None 1% in our model 1.41% on the pass line (our calculation)
Verification Usually none needed Provably fair seeds Physical or audited RNG

The key difference is the payout. A free roller just reports a number. A gambling game pays slightly less than fair odds. In crypto dice at a 1% edge, a 50% chance pays 1.98x instead of the fair 2x, so every 100 USDT bet returns 99 USDT on average. Our dice game guide simulates what that does to a bankroll, and the dice odds calculator shows the price of any target.

Common mistakes

  • Expecting a 20 within 20 rolls. "1 in 20" is an average rate; the chance of at least one 20 in 20 rolls is about 64%.
  • Thinking a cold die is due. Each roll is independent, online or physical.
  • Adding chances instead of multiplying. Two dice both rolling 6 is 1/6 × 1/6 = 1/36, not 2/6.
  • Treating a free roller like a casino game. Rolling for fun has no edge; once money and a payout are attached, the house edge applies to every roll.

More dice guides, from craps to crypto dice, are on our dice games hub.

Frequently asked questions

Are online dice rollers really random?

A well-built roller uses a random number generator and maps its output evenly onto the die's faces, so each face has the same chance. You can't check the code of most free rollers, but you can test one: roll a d6 600 times and each face should appear roughly 100 times, with natural variation of a dozen or so either way.

What are the odds of rolling a natural 20 on a d20?

1 in 20, or 5%, on every roll. A d20 has 20 equally likely faces and one of them is a 20. Previous rolls don't change it. Over 20 rolls the chance of at least one 20 is 1 − (19/20)^20, about 64%, not 100%.

Can I use dungeons and dragons dice online instead of physical dice?

Yes. A virtual roller that picks faces uniformly gives the same probabilities as a balanced physical die: 1 in N for each face of a dN. Many groups use online dice for remote play. The math in this guide applies equally to both.

What is the difference between a dice roller and a dice game for money?

A dice roller just produces numbers. A dice gambling game attaches a stake and a payout to the result, and the payout is set slightly below fair odds, which is the house edge. In crypto dice at a 1% edge, a 50% chance pays 1.98x instead of the fair 2x.

What is the most likely total with three six-sided dice?

10 and 11 are tied as most likely. Each can be made 27 ways out of 216 equally likely combinations, a 12.5% chance. The extremes, 3 and 18, can each be made only one way, about 0.46%.

Sources

  1. 9.5 Counting Principles — OpenStax (College Algebra). Multiplication Principle: m ways then n ways gives m x n; P(n,r) = n!/(n-r)!; C(n,r) = n!/(r!(n-r)!)
  2. Two Basic Rules of Probability — OpenStax, Rice University. Multiplication rule; independent events
  3. Terminology — OpenStax, Rice University. Probability as long-run relative frequency; law of large numbers
  4. Gambling: Chances, probabilities and odds — Encyclopaedia Britannica. Probability = favourable/total; odds = unfavourable to favourable
  5. Provably Fair: Implementation — Stake.com. Server seed hashed before play, client seed, nonce, cursor; HMAC_SHA256 output split into floats