The 1–20 range
Twenty is the granularity of a d20: every number is worth exactly 5 percent, which is why the die became the backbone of tabletop resolution. Percentages you can do in your head are worth a lot at a table.
It is also a comfortable size for a small draw. Twenty entries in a giveaway, twenty desks in a room, twenty questions in a bank.
A natural 20 carries no bonus here, in either direction. It is one outcome out of twenty, exactly like a 1.
- 1 to 20, both included
- 20 whole numbers
- 5%, exactly 1 in 20
- 1 to 10 numbers per draw
- None inside a multi-number draw
- Every draw gets a link that replays it
What a 1–20 draw is for
- Rolling a d20 for attacks, saving throws and checks
- Picking a winner from twenty entries
- Choosing a question from a twenty-item bank
- Assigning twenty seats, lockers or shifts
- Sampling a 5 percent slice of anything
How the randomness works
Every tap calls crypto.getRandomValues, the browser's cryptographic generator, and asks it for one unsigned 32-bit value. That lands somewhere between 0 and 4,294,967,295, and it then has to be folded down to the 20 numbers in this range.
Folding it down with a plain remainder is where most generators go wrong, an error known as modulo bias. 20 does not divide 4,294,967,296 evenly: 16 values are left over at the top, and wrapping them around would make the first 16 numbers in the range fractionally likelier than the rest. This tool throws away any raw value at or above the last exact multiple of 20 and draws a fresh one instead. That is rejection sampling. It fires about 1 in 268,435,456 draws, and it is the difference between 5% exactly and 5% approximately.
Ask for more than one number and the tool keeps drawing until it holds that many distinct values, then sorts them ascending. Nothing is seeded, nothing is sent anywhere, and each draw is independent of the one before it. The roll history under the tool lives in your browser's local storage, where the clear button empties it. The daily lucky numbers elsewhere on this site work the opposite way on purpose: they use a seeded generator so the same date always returns the same set. How random is random sets the two side by side.
Five percent per number keeps the arithmetic honest without a calculator: two 20s back to back is 1 in 400, three is 1 in 8,000. Twenty leaves sixteen values over when it divides the draw space, and those get thrown away rather than wrapped around, which is why the 5 percent is exact rather than approximate. Table lore about a die going cold has nothing to work with here. Every draw starts from nothing.
- crypto.getRandomValues, the browser's cryptographic generator
- One unsigned 32-bit value, sometimes more
- Rejection sampling onto 20 slots
- 16 of 4,294,967,296 raw values, redrawn
- No. These tools are never seeded
- Your browser. No server ever sees a draw
1–20 — frequently asked
One in twenty, or 5 percent. Two in a row is 1 in 400, and a 1 followed by a 20 is just as likely as two 20s, which is the part that never feels right.
Fairer, usually. Injection-moulded polyhedrals carry a sprue mark, uneven paint fill and slightly convex faces, and tests on cheap sets have found faces drifting a percentage point or two from their share. The draw here is exact by construction.
Raising the count draws distinct numbers, which is wrong for advantage or disadvantage, where the two rolls are independent and can match. Use the d20 roller for that: it rolls each die on its own.