StatGardenREF. DESK
Calculators/Statistics/Roll a D20
Statistics

Roll a D20 calculator

Rolls one or more dice of a chosen size and gives the probability of the result you asked for.

Published 21 August 2026

What this calculator does

Rolling a d20 is the standard way tabletop role-playing games decide whether an action succeeds, and it comes up constantly in probability questions too: what are the odds of beating a certain number on a twenty-sided die. Both questions have the same two parts, an actual roll and the chance behind it, which this calculator handles together.

Enter a die size, from a d4 up to a d100, choose how many dice to roll at once, and this generates a genuine random result for each one using the same kind of randomness a physical die relies on. Alongside the roll, it works out the probability of hitting a target value or higher, or lower, or that exact value, both for a single die and for at least one die out of however many were rolled.

The formula

FormulaEach roll is a random integer from 1 to the number of sides; P(single roll) = favourable outcomes ÷ sides; P(at least one of n dice) = 1 − (1 − p)ⁿ

Each individual roll is drawn uniformly at random from 1 to the number of sides on the die, so every face is equally likely. The probability of a single roll meeting a target follows directly from counting outcomes: for "that value or higher", it is (sides − target + 1) ÷ sides; for "that value or lower", it is target ÷ sides; for an exact value, it is 1 ÷ sides. For several dice rolled together, the probability that at least one of them meets the target is 1 − (1 − p)ⁿ, where p is the single-die probability and n is the number of dice, since (1 − p)ⁿ is the chance every single one misses.

TermMeaning
SidesThe number of faces on the die, such as 20 for a standard d20.
Target valueThe result you are asking about, from 1 up to the number of sides.
pThe probability that a single die meets the target on one roll.

The inputs explained

FieldWhat to enter
Die sizeChoose from d4, d6, d8, d10, d12, d20, d100 (percentile).
Number of dice to rollHow many dice of the chosen size to roll at once, from 1 up to 100.
Target valueMust be between 1 and the number of sides on the chosen die.
Probability of rollingChoose from That value or higher, That value or lower, Exactly that value.

When to use it

Checking the odds before a key roll in a game

Before rolling to hit a difficulty class or armour class in a tabletop game, working out the probability of clearing that number on a d20 gives a sense of how risky the action actually is, beyond just gut feel.

Rolling several dice at once for damage or stats

Character creation and damage rolls often call for multiple dice at once, and simulating that batch of rolls together, with the total shown, saves reaching for physical dice or a separate app mid-session.

A probability question framed around dice

Dice are a common way probability is taught precisely because a fair die gives a clean, equally-likely set of outcomes: this calculator answers the "what are the odds of rolling X or better" version of that question directly.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How the probability of beating a target changes on a single d20

A single d20, across a range of target values, using "that value or higher".

Probability of rolling that value or higher on one d20
Target value or higherProbability on a single dieExpected value of one die
1100.0%10.50
580.0%10.50
1055.0%10.50
1530.0%10.50
1815.0%10.50
205.00%10.50
The probability falls steadily as the target climbs, since fewer of the twenty faces satisfy "this value or higher": needing a 20 exactly leaves only one face out of twenty in your favour.

How rolling more dice raises the chance at least one succeeds

The same target, 15 or higher on a d20, rolled with an increasing number of dice at once.

Target of 15 or higher on a d20, across a growing number of dice
Number of dice rolledProbability at least one die meets itTotal of all rolls
130.0%1
251.0%12
365.7%24
583.2%48
894.2%92
1097.2%93
Each extra die gives another independent chance to succeed, so the probability that at least one meets the target climbs quickly even though each individual die still only has a 30% chance on its own.

Questions

What is the probability of rolling a specific number on a d20?

Exactly 1 in 20, or 5%, for any single chosen number, since a fair d20 gives each of its twenty faces an equal chance of landing face up.

What are the odds of rolling 15 or higher on a d20?

There are six values from 15 to 20 inclusive that satisfy this, out of twenty possible results, giving a probability of 6/20, or 30%.

How do you work out the chance across multiple dice?

For "at least one die meets the target" across n dice, first find the chance a single die misses, 1 minus the single-die probability, raise that to the power of n, then subtract the result from 1. That gives the chance every single die failing to meet the target does not happen.

Is a d20 roll here truly random?

Each roll is generated independently using a uniform random draw across the die’s faces, so every face has an equal chance on every roll, matching the behaviour of a fair physical die as closely as software randomness allows.

For the probability of a given number of heads across several coin flips, see the coin flip probability calculator. For the probability of exactly k successes across n independent trials more generally, see the binomial probability calculator.