Understanding the D20 Dice Roller
A d20 is a twenty-sided die (an icosahedron) that produces a whole number from 1 through 20. It is the signature die of tabletop role-playing games like Dungeons & Dragons, where nearly every attack, saving throw, skill check, and initiative roll starts by rolling a d20 and adding a modifier. This roller simulates a fair d20: each face is equally likely, so the roll is a uniform random integer in the range 1–20.
The formula
For a single die, the result is a uniform draw:
- One die: roll = random integer from 1 to 20, each with probability 1/20 = 5%.
- N dice with a modifier: total = (die₁ + die₂ + … + die_N) + modifier.
- Possible range: the total runs from N + modifier (all 1s) up to 20N + modifier (all 20s).
- Expected value: the average of one d20 is (1 + 20) ÷ 2 = 10.5, so the average total for N dice is N × 10.5 + modifier.
Why the average is 10.5
Because every face from 1 to 20 is equally likely, the mean is the midpoint of the range. The sum 1 + 2 + … + 20 equals 210, and 210 ÷ 20 = 10.5. There is no single face that shows 10.5 — it is the long-run average you would approach over many rolls, not the result of any one roll.
Key probabilities on a single d20
- Any exact number (for example, exactly 15): 1 in 20 = 5%.
- Natural 20 (a "crit"): 5%. Natural 1 (a "fumble"): 5%.
- Rolling at or above a target T (a check "DC"): there are (21 − T) winning faces, so the chance is (21 − T) ÷ 20. To hit a DC of 15, faces 15–20 succeed = 6 ÷ 20 = 30%.
- Advantage (roll two, keep the higher): the chance of hitting a target improves because you fail only when both dice miss; probability of success = 1 − (miss chance)². Disadvantage (keep the lower) does the reverse: success = (hit chance)².
Common intuition traps
- Gambler's fallacy: a d20 has no memory. Rolling three 1s in a row does not make a high number "due" — the next roll is still an even 5% per face.
- Confusing average with typical: the mean of 3d20 is 31.5, but any total from 3 to 60 is possible, and results near the extremes are simply rarer, not impossible.