RandALL

Fair by design

How RandALL picks

The answer first, the show after. Here is the whole method.

The short answer

Every RandALL web tool draws its result with crypto.getRandomValues, the random number source built into your browser for security work. The result is decided before any animation starts, the animation only shows it, and nothing you do with your finger or mouse can change it. No result is sent anywhere.

The method

  1. A secure source, not a formula. Browsers offer two kinds of random numbers. Math.random() is a fast formula meant for games and effects. crypto.getRandomValues() is fed by your operating system’s own randomness and is what browsers use to make encryption keys. Every result here comes from the second one.
  2. No rounding edge. A raw random number has 4,294,967,296 possible values. Squeezing that into, say, 6 outcomes by taking the remainder would make some outcomes a hair more likely than others. The tools use rejection sampling instead: a raw number that falls in the uneven leftover is thrown away and drawn again, so every outcome has exactly the same chance.
  3. The result comes first. The winner is chosen before anything moves. The wheel’s spin, the coin’s toss and the dice’s tumble are then worked out backwards so that they end on it. A wheel that stopped wherever your flick sent it could be aimed. This one cannot.
  4. Weights are tickets. Where a tool has weights, an option with weight 3 holds three tickets out of the total, and its share of the picture (its wedge on the wheel) is the same share. What you see is the real chance.
  5. Nothing leaves your device. The draw happens in your browser. No result, list or tap is sent to a server. The site sets no cookies and keeps your lists only in your browser’s own storage.

What the tests check

Each tool’s drawing code is tested by running it many thousands of times and checking the counts with a chi-square test, the standard check for whether outcomes are as even as they should be. What each test covers:

Spin the Wheel

In 100,000 test spins with mixed weights, every option won in proportion to its weight (chi-square test), and on 5,000 random wheels the pointer always stopped inside the winner’s wedge.

Random Name Picker

In 100,000 test picks in each mode, every name came up evenly (chi-square test), every name was as likely to be first, second or third in a pick of three, and in Bag mode nobody came up twice before everyone had a turn.

List Randomizer

In 125,000 test shuffles of 5 items, every item landed in every place equally often (chi-square test), all 24 orders of 4 items came up equally often, and rows sitting out never got a place.

Bracket Generator

For every list from 2 to 64 names, everyone was placed exactly once, no match held two byes and the bracket took one match fewer than its names. In seeded test draws, every name landed in every place evenly (60,000 draws of 6), every pair met in the first round evenly (56,000 draws of 8) and every name drew a bye evenly (50,000 draws of 5). The coin sent the top name through half the time in 100,000 flips, and in 50,000 brackets of 5 played out by coins, every name became champion evenly (chi-square tests).

Team Generator

In 60,000 test deals of 6 people into 3 teams, everyone landed on every team evenly and every pair ended up together evenly, and in 70,000 deals of 7 people into pairs, everyone was the odd one out equally often (chi-square tests).

Coin Flip

In 100,000 test flips, heads and tails came up evenly (chi-square test), whichever side the coin started on. In 20,000 throws of 10 coins the number of heads matched the binomial odds (chi-square test), and in 20,000 simulated tosses the coin always came to rest showing the side that was drawn.

Dice Roller

In 100,000 test rolls each, every face of a d6, a d20 and a d100 came up evenly, 2d6 totals matched their exact odds (from 1 way in 36 for a 2 to 6 ways for a 7), and the kept die with advantage and disadvantage matched its exact odds (chi-square tests). In 3,000 random throws, every die came to rest on the number drawn for it.

Random Number Generator

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.

Random Card Generator

The deck holds exactly the right cards for every setting (1 to 5 decks, J Q K on or off, jokers on or off). Drawing whole decks in hands of 1 to 5 never gave a card twice. In 100,000 test shuffles every card was equally likely to come out on top, the ace of spades was equally likely to land in each of the 52 places, and all 24 orders of a four-card deck came up equally often (chi-square tests).

Lottery Number Generator

In 200,000 test draws of 6 from 49 and 100,000 of 2 from 12, every number came up equally often (chi-square test) and no draw repeated a number. In simulated runs of the machine on six formats, played out or skipped part way, it always delivered exactly the drawn numbers in the drawn order.

Rock Paper Scissors

In 90,000 test throws each hand came up a third of the time (chi-square test). In 90,000 test rounds against the computer, its hand was a third each whichever hand the player chose (chi-square test of independence), and scoring a round never drew a random number.

Spin the Bottle

In 132,000 test spins with 2 to 12 players, every player was picked equally often (chi-square test) and the bottle always came to rest pointing at the player who was drawn. In 60,000 more with Skip the spinner on, the spinner was never picked.

Tarot Card Reading

The data holds all 78 cards, 22 + 4 × 14, with every field filled. In 156,000 test draws every card came up equally often, a spread never held a card twice, and each card landed reversed half the time, or never with the switch off (chi-square tests). A shared link opens exactly the cards it was made from, and the card of the day stays the same all day and is drawn afresh the next.

Random Country Generator

In 195,000 test draws every country came up equally often (chi-square test), within each continent filter too. With No repeats, every country came up exactly once a round. And for all 195 countries, from random starting points, the spin always ended with the drawn country in the middle of the globe and all of its main body in view.

Random Color Generator

In 160,000 test draws in Any mode, every HEX digit and every channel value came up as often as chance allows (chi-square test), and Pastel, Vivid and Dark draws matched the exact makeup of their sets without ever breaking their rules. A scan of all 16,777,216 colors gives the counts above, the palette for #BEE76D matches the app’s, and contrast ratios match published values (black on white 21:1, #777777 on white 4.47:1).

Random Date Generator

In 140,000 test draws over a 14-day range, every day came up as often as chance allows (chi-square test), the first and last days included. Weekdays only never drew a weekend, No repeats never drew a date twice, every day from year 1 to 9999 converts and back without a slip, leap days appear only in leap years, and ranges across clock changes count the same days in any time zone.

Fortune Cookie

In tests, 110,200 cookies came out fair across all 551 fortunes (chi-square test), no fortune ever came back within 275 cookies of its last time, and 60,000 sets of lucky numbers were always six different numbers from 1 to 49, each number as likely as any other.

Random Timer

In 100,000 test draws from 5 to 30 seconds, every length came up equally often (chi-square test), both ends included and nothing outside. Simulated sessions ended on the first check after their drawn length whether the checks came every 16 ms, every 250 ms or at random gaps, a 10 second gap past the end ended at once on return, and rounds, rests and ticks came in order.

Random Animal Generator

In tests, 87,800 draws over all 878 animals came out fair (chi-square test), and so did draws inside every kind; with No repeats on, every animal in a pool came up once before any came twice; and every card has its name, scientific name, kind, diet, habitat and status, with nothing reading undefined, no repeated names and only known statuses.

Who makes it

RandALL is made by Dino Budimilić, who has been building the iPhone app since 2011. The web tools use the same rule the app does: decide first, then show. Questions about any of this are welcome at dino@fartingpixel.com.

Questions

Is an online random tool really random?

It depends on the tool. These draw from crypto.getRandomValues, which is seeded by your device’s operating system and is unpredictable in practice. That is as random as a browser can be, and far better than a physical coin, which is slightly biased towards the side that starts face up.

Can the site see or change my result?

No. The draw runs in your browser with code you can read in the page’s source. No result is sent to a server, and nothing you type leaves your device.

Why does the result come before the animation?

Because an animation driven by your input can be influenced by it. Deciding first and animating towards the answer means a hard flick, a soft tap or a second tap changes only the show.

What is rejection sampling?

A way of turning a random number from a big range into one from a small range without favouring any outcome. Numbers that fall in the part of the big range that does not divide evenly are discarded and drawn again.

Do streaks mean it is broken?

No. Real randomness has streaks. Five heads in a row happens about once in every 32 runs of five flips. A tool that never repeated would be the one that was not random.

RandALL app icon

RandALL for iPhone

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.