Skip to main content

D20 Dice Roller

Exact d20 probabilities for a straight roll, advantage, or disadvantage against a target after a modifier, plus sums of up to 100 d20 by convolution. Advantage keeps the higher of two dice, so a kept value of k has probability (2k - 1)/400 and the average rises from 10.5 to 13.825; both modes apply to a single d20 only.

Runs entirely in your browser

This tool sends nothing over the network. Everything you enter is processed on your device and never reaches our servers.

Probability
Tabletop Gaming
Random Number Generation
Loading the tool
Reference

Documentation

A d20 dice roller with probability gives both the roll and the exact chance of reaching a target on a twenty-sided die, the die that resolves attacks, ability checks, and saving throws in d20-based roleplaying games. A single d20 is flat: every face from 1 to 20 has a 5% chance, so each point of modifier or target moves the chance of success by exactly 5 percentage points.

The modifier is the flat bonus or penalty added after the roll, such as an attack bonus of +5 or a penalty of -2, and the target plays the role of an armor class or a difficulty class. Roll mode covers advantage and disadvantage: two d20s are rolled and the higher or the lower one is kept before the modifier is added. Those modes apply to a single d20 only. With two or more dice every die is rolled and summed, and a note beside the inputs, the roll, and the probability says the mode was not applied. Multiple dice and repeated rolls cover d20 sums and batches such as initiative for a group of creatures, up to 100 of each.

For a straight roll, the chance of meeting a target T with a modifier M is (21 - (T - M)) / 20, held between 0 and 1. With advantage the kept die equals k with probability (2k - 1) / 400, because 2k - 1 of the 400 ordered pairs have k as their higher value, and the chance of keeping at least k is 1 - ((k - 1) / 20)^2. Disadvantage mirrors it at (41 - 2k) / 400, with an at-least chance of ((21 - k) / 20)^2. Advantage raises the average kept roll from 10.5 to 13.825, and disadvantage lowers it to 7.175. Sums of several d20 come from an exact convolution of the single-die distribution, with no bell-curve approximation even at 100 dice.

The percentage and the 1 in N odds describe one roll. Advantage is worth the most in the middle of the die: against a target that needs 11 or more on the die it turns 50% into 75%, the same gain as a +5 bonus, while against a target that needs 18 or more it lifts 15% only to 27.75%. A modifier that already makes the target automatic or impossible leaves the result at 100% or 0% in every mode. Rules that treat a natural 1 or a natural 20 as automatic failure or success are not part of the percentages.

An attack with a +5 bonus against armor class 15 hits on a die result of 10 or more, which is 11 of 20 faces, a 55% chance (1 in 1.82). With advantage both dice must show 9 or less to miss, (9/20)^2 = 20.25%, so the hit chance rises to 79.75%. With disadvantage the hit chance falls to (11/20)^2 = 30.25%.

Twenty-sided dice sit at the center of d20-based roleplaying games and also appear in probability education, game design testing, and randomized decision-making.

  • Attack Rolls: An attack hits when 1d20 plus the attack bonus meets the target's armor class. With the exact hit chance for each armor class, the trade between a reckless attack and a careful one becomes a number rather than a guess during a combat encounter.
  • Ability Checks and Saving Throws: Skill checks, contested rolls, and saving throws all add an ability modifier to 1d20. When a spell or feature grants advantage, the shift from a straight roll is visible at once, such as 50% rising to 75% on a check that needs 11.
  • Damage with Multiple Dice: Homebrew mechanics and some game systems sum several d20s. The probability of any sum target comes from an exact convolution for pools of up to 100 dice; 3d20 reaches 30 or more 57.48% of the time.
  • Probability Education: Advantage and disadvantage are a compact lesson in order statistics. A straight d20 gives a uniform 5% per face, while keeping the higher of two dice shifts the expected value from 10.5 to 13.825.
  • Game Design: Custom d20 mechanics can be tested by running hundreds of rolls and reviewing the history, then comparing the observed hit rate with the exact probability for each difficulty class and modifier scale.
  • Session Preparation: Initiative for a group of creatures comes out of one batch, with one roll per creature recorded in the history together with its modifier.
  • Statistical Comparison: Advantage and a flat bonus are often treated as equivalent, and the exact figures show where they part. On a DC 15 check with no bonus, advantage succeeds 51% of the time, while a flat +5 bonus without advantage succeeds 55% of the time.
Inputs, outputs, and what the D20 Dice Roller computes

What the D20 Dice Roller asks for and what it returns, as a plain list. Defaults, units, and ranges are the ones the form loads with.

Inputs

  • Number of d20 Dice (numeric input) · default: 1 · range: 1 to 100
  • Modifier (numeric input) · default: 0 · range: -999 to 999
  • Roll Mode · default: Normal
  • Rolls per Click (numeric input) · default: 1 · range: 1 to 100
  • Condition · default: At least
  • Target Number (numeric input) · default: 10
  • Upper Bound (for Between) (numeric input) · default: 15
  • Show probability breakdown · default: on
  • Show roll history · default: on
  • Animate dice roll · default: on

Controls

Reset · Clear History

Example

An attack with a +5 bonus against armor class 15 hits on a die result of 10 or more, which is 11 of 20 faces, a 55% chance (1 in 1.82).