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
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.
| Term | Meaning |
|---|---|
| Sides | The number of faces on the die, such as 20 for a standard d20. |
| Target value | The result you are asking about, from 1 up to the number of sides. |
| p | The probability that a single die meets the target on one roll. |
The inputs explained
| Field | What to enter |
|---|---|
| Die size | Choose from d4, d6, d8, d10, d12, d20, d100 (percentile). |
| Number of dice to roll | How many dice of the chosen size to roll at once, from 1 up to 100. |
| Target value | Must be between 1 and the number of sides on the chosen die. |
| Probability of rolling | Choose 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".
| Target value or higher | Probability on a single die | Expected value of one die |
|---|---|---|
| 1 | 100.0% | 10.50 |
| 5 | 80.0% | 10.50 |
| 10 | 55.0% | 10.50 |
| 15 | 30.0% | 10.50 |
| 18 | 15.0% | 10.50 |
| 20 | 5.00% | 10.50 |
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.
| Number of dice rolled | Probability at least one die meets it | Total of all rolls |
|---|---|---|
| 1 | 30.0% | 1 |
| 2 | 51.0% | 12 |
| 3 | 65.7% | 24 |
| 5 | 83.2% | 48 |
| 8 | 94.2% | 92 |
| 10 | 97.2% | 93 |
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.