D20 Dice Roller Calculator

D20 Dice Roller Calculator

Growing AI Skill PRO

Enter Calculation

Formula

Total=∑i=1Number of d20(⌊rand×20⌋+1)+Modifier\text{Total} = \sum_{i=1}^{\text{Number of d20}} \left(\lfloor \text{rand} \times 20 \rfloor + 1\right) + \text{Modifier}
Usage stats

Advertisement

Results

Total Roll Result
19
d20 dice total
Dice rolled 1 × d20
Dice subtotal 19
Modifier 0
Highest single roll 19
Lowest single roll 19

Report an error on this page

What is a D20 Dice Roller?

A d20 is a twenty-sided die, the iconic die of Dungeons & Dragons and countless other tabletop role-playing games. This calculator simulates rolling one or more virtual d20 dice and adds an optional modifier to the total — perfect for attack rolls, ability checks, and saving throws when you don't have physical dice on hand.

A 20-sided d20 die with the number 20 showing on top
A d20 is a 20-sided die (icosahedron) used in tabletop RPGs.

How to use it

Enter how many d20 dice you want to roll (1 to 100) and an optional modifier such as +5 or -2. Press calculate and you'll get the combined total, the raw dice subtotal, the modifier applied, plus the highest and lowest single roll in the batch. Refresh or re-submit to roll again.

The formula explained

Each die uses roll = floor(random() × 20) + 1. A random fraction between 0 and 1 is scaled to the range 0–19.999, floored to a whole number 0–19, then shifted by 1 to give an integer from 1 to 20 with equal probability. The grand total is the sum of every die plus your modifier.

$$\text{Total} = \sum_{i=1}^{\text{Number of d20}} \left(\lfloor \text{rand} \times 20 \rfloor + 1\right) + \text{Modifier}$$

Advertisement
Number line from 1 to 20 with equally likely points
Each face from 1 to 20 has an equal chance of appearing.

Worked example

Suppose you roll 2d20 and the dice land on 14 and 7 with a +3 modifier. The dice subtotal is \(14 + 7 = 21\), and the grand total is \(21 + 3 = 24\). The highest single roll is 14 and the lowest is 7.

D20 Probability Reference Table

A fair 20-sided die has 20 equally likely faces, so every single face has probability \(1/20 = 0.05\) (5%). The chance of rolling a given target number or higher on one raw d20 follows directly from counting the faces that qualify:

$$P(\text{roll} \ge N) = \frac{21 - N}{20}$$
Single fair d20: exact-face and at-or-above probabilities
Target N P(exactly N) P(N or higher) Faces that succeed
1 5% 100% 20
2 5% 95% 19
3 5% 90% 18
4 5% 85% 17
5 5% 80% 16
6 5% 75% 15
7 5% 70% 14
8 5% 65% 13
9 5% 60% 12
10 5% 55% 11
11 5% 50% 10
12 5% 45% 9
13 5% 40% 8
14 5% 35% 7
15 5% 30% 6
16 5% 25% 5
17 5% 20% 4
18 5% 15% 3
19 5% 10% 2
20 5% 5% 1

The following difficulty-class (DC) bands are the typical difficulty table published for Dungeons & Dragons 5th Edition (Wizards of the Coast, USA) and are a rule of that game system, not a universal probability standard — other RPGs use entirely different target scales. The percentages show how often an unmodified d20 meets each DC.

D&D 5e typical DC bands vs. raw d20 success chance
Difficulty DC Raw d20 needed Chance with no modifier
Very easy 5 5+ 80%
Easy 10 10+ 55%
Medium 15 15+ 30%
Hard 20 20 5%
Very hard 25 Impossible on the die alone 0% (needs +5 or better)
Nearly impossible 30 Impossible on the die alone 0% (needs +10 or better)

A modifier shifts the required die face down by exactly its value: the roll you need is \(N_{\text{needed}} = \text{DC} - \text{modifier}\). With a +7 bonus against DC 15 you need a raw 8 or better, which the table above puts at 65%. Equivalently, each +1 adds 5 percentage points of success — up to the point where the die can no longer fail (or no longer succeed), since the faces are capped at 1 and 20.

Advertisement

Interpreting Your Roll

The grand total is what you compare. The number to check against a target — a difficulty class (DC), an armour class (AC), or whatever threshold your game uses — is the die result plus your modifier:

$$\text{Total} = \text{raw d20} + \text{modifier}$$

So a raw 12 with a modifier of +4 gives a total of 16, which beats DC 15 by one point. A negative modifier works the same way: a raw 12 with −3 gives 9 and fails DC 15.

One check means one die. For a normal single d20 check, set the number of dice to 1 — only that one face matters. Rolling a larger batch (say 10d20) is a convenience for resolving many separate checks in one click: ten attacks, ten saving throws, a table of random results. Each die in the batch is its own independent check with its own success or failure; the batch sum is not a meaningful "one big check" in d20 systems, because the target numbers are calibrated against a single 1–20 die. Read the individual dice, not the sum, unless your game explicitly asks you to add them.

Natural 20 and natural 1 come off the raw die. A "natural" result is the face shown before any modifier is applied — a raw 20 is still a natural 20 even if your modifier is 0, and a total of 20 reached as 16 + 4 is not a natural 20. Under D&D 5th Edition rules (a rule of that specific game system), a natural 20 on an attack roll always hits and scores a critical hit, and a natural 1 on an attack roll always misses. That automatic hit/miss applies only to attack rolls: ability checks and saving throws in 5e have no inherent auto-success or auto-failure on 20 or 1, though many tables house-rule one. Other RPGs that use a d20 treat 20s and 1s differently, so check your own rulebook.

Advantage and disadvantage. To emulate advantage, roll 2d20 and use the higher raw die; for disadvantage, use the lower. Apply your modifier to the die you kept, not to both. This changes the odds substantially: with advantage, your chance of rolling at least 15 on the kept die rises from 30% to \(1 - 0.70^2 = 51\%\), while with disadvantage it drops to \(0.30^2 = 9\%\). Keep the modifier out of that comparison — advantage affects the die, not the bonus.

Averages over many rolls. A fair d20 has expected value

$$E[d20] = \frac{1 + 2 + \cdots + 20}{20} = \frac{210}{20} = 10.5$$

so a batch of \(n\) dice averages \(10.5n\) in total, and a single modified check averages \(10.5 + \text{modifier}\). For example, 8d20 with a +2 modifier has an expected grand total of \(10.5 \times 8 + 2 = 86\). Treat that as a long-run average only: with so few dice, real batches swing widely around it, and a streak of low or high faces is ordinary randomness rather than a sign of a loaded generator. Because the distribution of a single d20 is flat, every face is equally surprising — there is no "most likely" roll to anchor on, which is exactly why small modifiers matter so much in d20 games.

FAQ

Are the rolls truly random? They use a pseudo-random number generator that produces a uniform, fair distribution across 1–20 for typical gaming use.

Can I roll a natural 20? Yes — any single die can return 20 (a "crit") or 1 (a "fumble"), shown in the highest and lowest rows.

Why do I get a new result each time? Every submission re-rolls the dice, so totals change between rolls just like real dice.

Last updated:

Most popular in Math and Statistics

View all Math and Statistics calculators