Skip to content
CalcTide logo
Education & Math

D20 Dice Roller

A single d20 returns a whole number from 1 to 20, and each face is equally likely at a 5 percent chance per roll. This d20 dice roller gives you an instant result with one click, so you can resolve an attack, a saving throw, or a skill check without hunting for a physical die. You can also roll several dice at once and add a flat modifier, which matches the way most tabletop rules describe a roll such as 2d6+3. Every roll shows the individual dice, the raw sum, and the total after the modifier, so nothing about the result is hidden.

Education & MathBy

Quick answer

Dice notation is written as NdX+M, where N is the number of dice, X is the number of sides on each die, and M is a modifier added at the end.

Click Roll to generate a d20 result.

What this tells you

  • Dice notation is written as NdX+M, where N is the number of dice, X is the number of sides on each die, and M is a modifier added at the end.
  • For a plain d20, N is 1, X is 20, and M is 0, so the notation is simply 1d20 or d20.
  • A roll written as 3d6 means roll three six-sided dice and add the three results together for a value from 3 to 18.
  • A modifier shifts the whole result up or down after the dice are added, so 1d20+4 produces a value from 5 to 24.
  • The number of dice controls the shape of the outcome. One die is flat and even, while several dice cluster their totals toward the middle.
  • This roller reports the sum before the modifier and the total after it, which keeps the math clear when you compare a raw roll against a target number.
  • Results come from pseudo-random browser logic, which is fine for games and lessons but not for security or wagering.

How to Use

  1. 1Set the number of dice you want to roll. Leave it at 1 for a standard single d20 check.
  2. 2Enter a modifier if your rule or bonus calls for one. Use 0 when no bonus or penalty applies, and use a negative number for a penalty.
  3. 3Note that each die is fixed at 20 sides, so every roll on this page is a true d20 labeled clearly for you.
  4. 4Click the Roll button to generate a fresh result. The tool lists each individual die, the sum of the dice, and the total after the modifier.
  5. 5Roll again as many times as you need. Every click starts a new independent draw, so past results do not affect the next one.

How It Works

Formula

roll = Math.floor(random() * sides) + 1, total = sum(rolls) + modifier

Each die uses the same core step. The function random() returns a decimal from 0 up to but not including 1. Multiplying by the number of sides spreads that decimal across the full face range, Math.floor drops the fractional part to leave a whole number from 0 to sides minus 1, and adding 1 shifts the range so the lowest face is 1 and the highest face equals the number of sides. For a d20 this yields a whole number from 1 to 20. When you roll more than one die, the tool repeats that step for each die and adds the results into a sum, then adds your modifier to produce the total. The expected value of one fair d20 is 10.5, found by adding 1 through 20 to get 210 and dividing by 20. That average is why a long series of d20 rolls tends toward 10.5 per die even though any single roll can land anywhere from 1 to 20.

Calculation note: values are processed in the order shown above, using the current input units.

Worked Examples

Roll one d20 for an attack

Count1
Sides20
Modifier0
Result1 to 20

A single d20 with no modifier returns any whole number from 1 to 20. Each of the 20 faces has the same 5 percent chance, and the sum equals the total because the modifier is 0.

Roll a d20 with a plus 5 skill bonus

Count1
Sides20
Modifier5
Result6 to 25

The die still lands from 1 to 20, then the plus 5 modifier is added to the total. That shifts the possible outcome to a value from 6 to 25 while the raw sum stays between 1 and 20.

Roll two d20 for advantage style comparison

Count2
Sides20
Modifier0
Result2 to 40 sum

Rolling two d20 gives two separate faces, each from 1 to 20. The sum ranges from 2 to 40, and the roller also shows the highest single die so you can pick it if your rule keeps the better roll.

Roll a d20 with a minus 2 penalty

Count1
Sides20
Modifier-2
Result-1 to 18

The die returns 1 to 20, then the minus 2 penalty lowers the total. The result can be as low as -1 when the die shows 1 and as high as 18 when the die shows 20.

Roll four d20 for a quick average check

Count4
Sides20
Modifier0
Result4 to 80 sum

Four d20 produce four faces from 1 to 20 each. The sum ranges from 4 to 80, and the average per die shown by the tool should sit near 10.5 over many repeated rolls.

Average and range for common dice

Expected value and possible range for a single roll of each standard die.

DieRangeAverage per roll
d41 to 42.5
d61 to 63.5
d81 to 84.5
d101 to 105.5
d121 to 126.5
d201 to 2010.5
d1001 to 10050.5

The average of a fair die equals (sides plus 1) divided by 2. For a d20 that is (20 plus 1) divided by 2, which is 10.5.

Why the d20 average is 10.5

A fair d20 has 20 faces numbered 1 through 20, and each face is equally likely. To find the expected value you add every face and divide by the count of faces. The sum of 1 through 20 is 210, and 210 divided by 20 is 10.5. Half the faces are 10 or below and half are 11 or above, so the balance point sits between 10 and 11.

A single roll never actually lands on 10.5 because the die only shows whole numbers. The 10.5 figure is the long run average, meaning that if you roll a d20 many times the mean of your results should drift close to 10.5. Short runs can look lopsided with clusters of high or low rolls, which is normal for random data.

This is why a modifier matters so much in games. Adding a plus 3 bonus shifts the expected total to 13.5, which noticeably raises your odds of beating a fixed target number without changing the shape of the single die.

Common mistakes

  • Thinking a d20 excludes 1 or 20. Both endpoints are valid, so a natural 1 and a natural 20 are each real 5 percent outcomes.
  • Confusing the sum with the total. The sum is the dice added together, while the total includes your modifier on top.
  • Expecting the average of a few rolls to equal 10.5 exactly. That average only appears over many rolls, not a handful.
  • Adding the modifier to every die instead of once. A roll of 2d20+3 adds 3 a single time to the combined sum, not 3 to each die.
  • Using this roller for anything that needs secure randomness. It suits games and lessons, not passwords, tokens, or wagering systems.

Embed this calculator on your site

Drop this single line where you want the calculator to appear. It is responsive, mobile-friendly, resizes automatically, and is free to use with attribution.

<script src="https://calctide.com/embed.js" data-tool="d20-dice-roller" async></script>

Preview the embed at /embed/d20-dice-roller/.

Frequently Asked Questions

Set the number of dice to 1, leave the modifier at 0, and click Roll. The tool returns a whole number from 1 to 20, with each face equally likely, and shows that value as both the sum and the total.
The average d20 roll is 10.5. You get that by adding the faces 1 through 20 to reach 210 and dividing by 20 faces, which gives 10.5 as the long run expected value.
Yes, every face from 1 to 20 has the same 5 percent chance on each roll. The roller picks a whole number using an even spread, so no single face is favored over another.
Yes, set the number of dice above 1 and click Roll. The tool shows each individual die, the combined sum, and the highest and lowest single roll so you can apply advantage or disadvantage rules.
Enter your bonus or penalty in the modifier field. A positive number is added to the total after the dice are summed, and a negative number is subtracted, which matches notation like 1d20+4.
The odds of a natural 20 on one d20 are 1 in 20, which is 5 percent. A natural 1 has the same 5 percent chance because both are single faces on a 20 sided die.
Streaks are normal in random data over short runs. Each roll is independent, so a low roll does not make the next roll higher, and clusters even out only across many rolls.
Yes, for tabletop games and classroom use the pseudo-random logic is more than fair enough. It is not built for security or gambling, but for resolving checks and teaching probability it works well.
It estimates d20 dice roller outputs using the visible inputs and formula assumptions on this page.

Explore More in Education & Math