RandALL

Random number from 1 to 20

Twenty numbers at 5% each: a d20 roll, a class of 20, a quiz.

Between 1 and 20

No number drawn yet.

Tap Draw, or press Space

Range

How many 1

Last draws

None yet. Your draws line up here, newest first.

What it does

Tap Draw for a whole number from 1 to 20, each with exactly a 5% chance, the same as a fair twenty-sided die. Use it as a d20 in tabletop games, to call on one of twenty students, or to pick a question from a list of twenty. The number is drawn before the reels turn.

How to use it

  1. Tap Draw to roll from 1 to 20.
  2. Rolling twice? Set How many to 2 and keep the higher, or the lower.
  3. Calling on students? Turn on No repeats so nobody is picked twice in one go.
Put this number on your own site

Paste this where you want it to appear: a class page, a blog post, a stream overlay. It is free to use, with the link under it left in place.

What people use it for

A d20 roll

Role-playing games that call for a d20 work just the same with a draw from 1 to 20. A 20 is 5%, and so is a 1.

Twenty students

Number the register and draw who reads next. Set How many to 20 with No repeats for the whole class in a random order.

Quiz night

Twenty questions on cards? Draw the one that comes next.

Odds from 1 to 20

From 1 to 20Odds
Any one number1 in 20 (5%)
An even number10 in 20 (50%)
The top ten percent (19 to 20)2 in 20 (10%)
15 or higher6 in 20 (30%)
At least one 20 in two rolls9.75%
A repeat within the first 6 draws56.4%
The average of many draws10.5

Rolling twice and keeping the higher roll nearly doubles your chance of a 20, from 5% to 9.75%. The average roll is 10.5, halfway between 1 and 20.

How it picks

The way the RandALL app does it: the number first, the reels after.

  1. Your range is read. Whole numbers up to 15 digits, negative or positive. A range typed backwards is turned round, so 100 to 1 means 1 to 100. Both ends can come up.
  2. The number is drawn first. For a range of n numbers, a whole number from 0 to n minus 1 is drawn with crypto.getRandomValues and added to your minimum. Rejection sampling throws away the few raw 32-bit values that would give some numbers an extra share, so each one has exactly a 1 in n chance.
  3. Wide ranges get more bits. One 32-bit draw covers 4,294,967,296 numbers. For a wider range, two draws are joined into a number with just enough bits for it, and anything past the end is drawn again. No remainders, no rounding.
  4. No repeats is a fair set, then a shuffle. Floyd’s algorithm picks numbers that all differ, with every possible set equally likely, and a shuffle makes every order equally likely too.
  5. Then the reels turn. Each reel steps through the digits before its own, slowing as it goes, and they stop left to right, as in the app. They only show a number that is already decided.

Tested. In 100,000 test draws each from 1 to 10, 1 to 6 and minus 3 to 3, every number came up evenly (chi-square test). A range three times wider than 32 bits and the full 15-digit range split evenly into slices, odds and evens, and last digits. With No repeats no draw ever repeated, and all 20 ordered pairs from 1 to 5 and all 20 sets of three from 1 to 6 came up evenly.

How every RandALL tool picks

All 19 web tools

Questions

Is this a fair d20?

Yes. Each number from 1 to 20 has exactly a 1 in 20 chance, drawn with crypto.getRandomValues. A plastic d20 can roll unevenly if it is badly made; this cannot.

What are the odds of rolling a 20?

1 in 20, or 5%, on every roll. Roll twice and keep the higher, and the chance of at least one 20 goes up to 9.75%.

Can I roll several d20s at once?

Set How many, up to 50. Each number is its own roll. The dice roller also adds them up and takes modifiers like +5.

RandALL app icon

Take it with you

RandALL for iPhone has 25 tools in one app: wheels and teams, real 3D dice, random alarms, Finger Picker and more. It works offline.

Your first 24 hours are free, with every tool. After that, subscribe or buy the lifetime unlock once. Family Sharing included.

Get it on the App Store

iPhone only for now. These web tools are yours to keep using.

QR code that opens RandALL on the App Store
Scan with your iPhone
All tools

Lists

Spin the WheelYour list on a wheel Random Name PickerDraw a few names List RandomizerWho goes first? Bracket GeneratorLast one standing Team GeneratorSplit a list into groups

Games

Coin FlipHeads or tails? Dice RollerAny dice, any sides Random Number GeneratorPick a number, any range Random Card GeneratorDraw a card Lottery Number GeneratorPick X of Y Rock Paper ScissorsRock, paper or scissors Spin the BottleRandom direction Tarot Card ReadingOne card, or three

Generators

Random Country GeneratorSpin the globe Random Color GeneratorA color and its palette Random Date GeneratorRandom date and time Fortune CookieOpen a cookie Random TimerNobody knows when it ends Random Animal GeneratorRandom species
RandALL for iPhone25 tools in one app. Works offline.