N
NJHTools

Random Number Generator 1 to 20

Generate cryptographically random numbers or pick random items from a list. Uses crypto.getRandomValues() — cryptographically secure, not Math.random().

Optional. Commas between values, dashes for ranges.

Tip: press Space or Enter to generate again.

About random numbers from 1 to 20

A random number from 1 to 20 is exactly what a twenty-sided die produces, which makes this page a quick, fair d20 roller for Dungeons & Dragons and other tabletop games. Each value has a 1 in 20 (5%) chance, so a natural 20 — or a critical-fail 1 — turns up on average once every twenty rolls. Unlike a worn plastic die, the results here come from crypto.getRandomValues(), so there is no physical bias.

Outside of gaming, 1–20 fits classroom-sized groups well. Teachers use it to call on a random student from a numbered class list, pick which of 20 quiz questions to review, or choose a winner among 20 raffle entries. The average result over many rolls is 10.5, and if you need a modifier, just add it to the number shown.

Because there are only twenty outcomes, repeats come quickly: after 6 rolls there is roughly a 56% chance that some number has already appeared twice. For calling on students without picking the same person twice, use Draw mode — it removes each number once it is drawn and shows how many are left, so everyone gets a turn before anyone is chosen again.

Frequently Asked Questions

Is this the same as rolling a d20?↓

Yes. A fair d20 gives each number from 1 to 20 a 5% chance, exactly like this generator. Add your modifier to the result if your game uses one.

How often will I roll a natural 20?↓

On average once every 20 rolls (5%). The chance of at least one 20 in ten rolls is about 40%.

How can I pick each student only once?↓

Turn on Draw mode. Each number is removed after it is drawn, and the remaining count tells you how many students have not been picked yet. Press Reset to start a new round.

Last updated: