Skip to main content

How the draw works

Not “trust us, it’s random”. Here is the method.

The winner is chosen before the wheel moves

Every spin picks the winner first and then aims the animation at it. That ordering is why how hard you flick cannot change the result, and why turning on reduced motion gives you the same draw with no animation rather than a different code path. It also means the spin you watch is a re-enactment of a decision already made — which is the only way the two promises above can both be true.

Where the randomness comes from

The source is your browser's cryptographic generator, crypto.getRandomValues, not Math.random. Math.random is allowed to be predictable, and on some engines it is; for a raffle that matters.

Why we throw some numbers away

Turning a 32-bit random number into “a number from 0 to 11” by taking the remainder is subtly unfair. 2³² does not divide evenly by 12, so the first few options each get one extra chance. On a twelve-slice wheel the bias is tiny, but it is real, it always favours the same slices, and it never averages out. So instead of taking the remainder, we discard any draw that falls in the uneven tail and ask for another one. It costs an occasional extra draw and buys an exactly uniform result.

const limit = Math.floor(2 ** 32 / max) * max;

let draw = crypto.getRandomValues(new Uint32Array(1))[0];
while (draw >= limit) {
  draw = crypto.getRandomValues(new Uint32Array(1))[0];
}

return draw % max;

Weights, and why the slice sizes match them

A weighted draw adds up the weights, picks a uniform number below that total by the same rejection method, and finds which entry that number lands in. The wheel then draws each slice at exactly its share of the circle. A wheel whose slices look equal while the odds are not would be the deceptive thing we are arguing against, so area and odds are the same number by construction rather than by policy.

Your list never leaves your browser

There is no account and no server-side storage. Your list lives in this browser, and a share link carries the wheel inside the URL itself. Nothing about a draw is recorded anywhere we can see.

Check it yourself

The draw is a few dozen lines and every claim above is covered by a test that would fail if it stopped being true — including one that feeds the generator numbers designed to trigger modulo bias and asserts the result stays uniform.

A wheel holds up to 1000 entries, and the method above is the same for one entry or all 1000.