Random Number Between 1 and 20

Generate a random whole number from 1 to 20, for a twenty-sided die (d20), the main die in Dungeons & Dragons.

Press Generate for a random number between 1 and 20, ends included.

Odds for numbers between 1 and 20

Possible numbers20
Chance of any one number1 in 20 (5.0%)
Average result over many picks10.5
Even / odd numbers10 even, 10 odd

The d20 at the table and beyond

The d20 decides most things in Dungeons & Dragons: attack rolls, ability checks and saving throws all add a modifier to a d20 roll and compare the total with a target number. A natural 20 on an attack roll is a critical hit. Rolling with advantage means rolling twice and keeping the higher number; disadvantage keeps the lower one.

A natural 1 on an attack roll always misses, whatever the modifiers, just as a natural 20 always hits. Each happens 5% of the time, so over a session of 40 attack rolls you'd expect about two of each.

Matching faces on several d20

Dice rolledChance of a repeat (repeats allowed)Different sets (no repeats)
25.0%190
314.5%1,140
541.9%15,504
1093.5%184,756

Roll 6 d20 and two of them probably match (56.4%). Collecting every face from 1 to 20 is slower: it takes 72 rolls on average.

Rolling several d20

To roll more than one d20, set How many numbers to the number of dice, untick No repeats and add the results. The average total is the number of dice times 10.5, which helps when you want a quick estimate instead of a roll.

DiceLowest totalHighest totalAverage total
1d2012010.5
2d2024021
3d2036031.5
4d2048042
6d20612063
8d20816084

d20 odds: chance of rolling at least each number

Each step on a d20 is worth exactly 5%. Advantage helps most in the middle of the range: needing 11 or higher, it lifts your chance from 50% to 75%, while disadvantage drops it to 25%.

Roll neededNormalAdvantageDisadvantage
1+100%100.00%100.00%
2+95%99.75%90.25%
3+90%99.00%81.00%
4+85%97.75%72.25%
5+80%96.00%64.00%
6+75%93.75%56.25%
7+70%91.00%49.00%
8+65%87.75%42.25%
9+60%84.00%36.00%
10+55%79.75%30.25%
11+50%75.00%25.00%
12+45%69.75%20.25%
13+40%64.00%16.00%
14+35%57.75%12.25%
15+30%51.00%9.00%
16+25%43.75%6.25%
17+20%36.00%4.00%
18+15%27.75%2.25%
19+10%19.00%1.00%
20+5%9.75%0.25%

Read across a row to compare. Need a 15? That's 30% on a normal roll. Advantage makes it 51%. Disadvantage cuts it to 9%. That's a big swing, worth knowing before you choose a risky action.

Waiting for a natural 20

Chance of having seen itRolls needed
50%14
90%45
99%90

A natural 20 turns up once every 20 rolls on average, yet a few unlucky rollers go 90 rolls without one (under 1% of them). A dry spell doesn't make it due: after 20 misses, the average wait is still 20 more.

Does the d20 look fair? Tally a batch

Ask for 1,000 rolls with repeats allowed and count each face. Every face should land about 50 times. Anything from 37 to 64 is inside the normal spread for one face. A fair die still won't give you a flat line. If you're testing a physical die the same way, a face far outside that range is worth a second look.

Keeping the best (or worst) of several d20

Some rules roll several dice and keep only the highest or lowest. The averages:

DiceAverage highestAverage lowest
2d2013.837.18
3d2015.495.51
5d2017.153.85
10d2018.642.36

Critical hits over a fight

A natural 20 is a 5% chance per attack. With advantage, either die can show it, which nearly doubles the rate to 9.75%. Over several attacks:

AttacksAt least one natural 20With advantage on every attack
15.0%9.8%
314.3%26.5%
522.6%40.1%
1040.1%64.2%
2064.2%87.1%

Death saving throws

At 0 hit points, a character rolls a d20 each turn: 10 or higher is a success, 9 or lower a failure, a natural 1 counts as two failures and a natural 20 brings them back with 1 hit point. Three successes stabilize them; three failures and they die. Left alone with no help, a character survives 59.5% of the time, and 18.1% of all outcomes are a natural 20 getting them straight back up.

How the number is picked

Your browser's Web Crypto API supplies a 32-bit random value (4,294,967,296 possibilities). Dividing by 20 leaves 16 spare values that would tilt the odds toward the lowest 16 numbers, so the generator discards them and draws again (1 time in 268,435,456).

Frequently asked questions

What are the odds of rolling a natural 20?

5% per roll. With advantage it's 9.75%, since either of the two dice can show it: 1 − 0.95 × 0.95.

What is the average d20 roll?

10.5. Rolling with advantage raises the average to about 13.8, and disadvantage lowers it to about 7.2.