Xerobit

D20 Roller: Roll a Twenty Sided Die

Use this d20 roller to roll a twenty sided die with advantage, disadvantage, modifiers and an optional difficulty class check. Pick how many dice to throw, set your bonus or penalty, and click Roll to see the result instantly. Everything runs in your browser so nothing is uploaded anywhere.

Advantage and disadvantage apply only when rolling 1 die.

Result

  • Rolls
    11
  • Total
    11
  1. Rolled: 11
  2. Total: 11

How to use the d20 roller

  1. Choose how many dice to roll using the Number of dice field (1 to 10).
  2. Select Normal, Advantage or Disadvantage. Advantage and disadvantage only apply when rolling a single die.
  3. Enter a Modifier if you have a bonus or penalty to add to the result.
  4. Optionally set a Difficulty Class to see whether the roll passes or fails.
  5. Click Roll to generate your result using a cryptographically secure random number generator.

How advantage and disadvantage work

When you select advantage, the d20 roller throws two twenty sided dice and keeps the higher value. Disadvantage does the opposite: it rolls two dice and keeps the lower one. These mechanics change the probability distribution significantly compared to a normal roll.

A normal d20 has a flat 5 percent chance for each face. With advantage, the chance of rolling at least a 15 jumps from 30 percent to 51 percent. With disadvantage, that same threshold drops to just 9 percent. The formula for the probability of rolling at least N with advantage is 1 - ((N - 1) / 20)^2, and for disadvantage it is ((21 - N) / 20)^2.

Probability of rolling at least N on a d20

This table shows the exact odds of meeting or exceeding a target number on a single d20, with advantage, and with disadvantage. Use it to quickly gauge your chances before you roll a d20 in play.

Target (N)NormalAdvantageDisadvantage
580.00%96.00%64.00%
1055.00%79.75%30.25%
1530.00%51.00%9.00%
1815.00%27.75%2.25%
205.00%9.75%0.25%

The advantage column is computed as 1 - ((N-1)/20)^2 and the disadvantage column as ((21-N)/20)^2. These formulas assume fair dice and independent rolls.

Critical hits and critical failures

In most tabletop roleplaying games, a natural 20 on an attack roll is a critical hit and a natural 1 is a critical failure. These outcomes are determined by the die face itself, before any modifier is applied. The d20 roller flags these automatically whenever the kept die shows exactly 20 or 1.

With advantage, the chance of rolling at least one natural 20 rises from 5 percent to 9.75 percent because you get two attempts. Conversely, the chance of a critical failure (both dice showing 1) drops to 0.25 percent. Disadvantage reverses these effects: critical hits become rare at 0.25 percent while critical failures rise to 9.75 percent.

Using modifiers and difficulty classes

A modifier represents your character's skill, strength or magical bonus. When you enter a modifier, the d20 dice roller adds it to the kept die value to produce the total. For example, rolling a 14 with a +5 modifier gives a total of 19.

The Difficulty Class (DC) is the target number you need to meet or exceed. If you set a DC of 16 and your total is 19, the result is a success. If the total is 15 or lower, it is a failure. Leave the DC field empty if you only need the raw number, such as when rolling damage dice rather than making a check.

When to use a dedicated d20 roller

Physical dice are great at the table, but a digital twenty sided dice roller is handy for online play, quick solo checks or when you do not have dice nearby. This tool uses crypto.getRandomValues to ensure each roll is statistically fair and unpredictable, avoiding the patterns that simple pseudo-random generators can produce.

If you need to roll other polyhedral dice like d4, d6, d8, d10 or d12 alongside your d20, the dnd dice roller handles full dice sets for tabletop sessions. For generating a single random integer outside the 1 to 20 range, the random number generator lets you set any minimum and maximum.

Worked examples

ExampleInputResult
Single d20, no modifierNumber of dice: 1; Roll mode: normal; Modifier: 0Rolls: 8; Total: 8
Attack roll with advantage and +5Number of dice: 1; Roll mode: advantage; Modifier: 5; Difficulty Class (DC): 16Rolls: 1, 7; Kept: 7; Dropped: 1; Modifier: +5; Total: 12; Check vs DC 16: Failure
Saving throw with disadvantageNumber of dice: 1; Roll mode: disadvantage; Modifier: 2; Difficulty Class (DC): 14Rolls: 4, 4; Kept: 4; Dropped: 4; Modifier: +2; Total: 6; Check vs DC 14: Failure
Roll 4d20 and add them upNumber of dice: 4; Roll mode: normal; Modifier: 0Rolls: 15, 5, 6, 15; Sum: 41; Total: 41

FAQ

What is a d20?

A d20 is a twenty sided die used primarily in tabletop roleplaying games. Each face is numbered 1 through 20, and it is the core mechanic for resolving attacks, saves and skill checks in systems like Dungeons and Dragons.

How does advantage change my odds?

Advantage means rolling two d20s and taking the higher result. It shifts the average roll from 10.5 to about 13.8 and significantly increases your chance of hitting high target numbers while reducing the risk of a natural 1.

Does the modifier affect critical hits?

No. A critical hit or failure is based solely on the natural die face before any modifier is added. A natural 20 is always a 20 on the die, regardless of whether your modifier is +0 or +10.

Can I roll more than one d20 at a time?

Yes. Set the Number of dice field up to 10. When rolling multiple dice, advantage and disadvantage are ignored and all dice are summed together after applying the modifier once to the total.

Is this d20 roller truly random?

It uses the Web Crypto API which provides cryptographically secure random numbers. This means the rolls are statistically uniform and cannot be predicted, matching the fairness of physical dice.

What happens if I leave the DC field empty?

The tool will still show your individual rolls, the kept value, the total with your modifier and any critical flags. It simply skips the success or failure comparison since there is no target number to check against.