← Back to Blog
🔬

Is a Random Wheel Spinner Truly Random? The Science Explained

May 2025·6 min read

When you spin a digital wheel, is the result genuinely random? The short answer is: it's very close to truly random, and for almost all practical purposes, it's indistinguishable from it. The longer answer is more interesting.

What Does "Random" Actually Mean?

True randomness means each outcome is completely independent of all previous outcomes, with no pattern whatsoever. The problem is that computers are fundamentally deterministic machines — given the same starting state, a conventional computer produces the same output every time. This makes generating genuine randomness surprisingly difficult.

Pseudo-Random Number Generators

Most software randomness uses a Pseudo-Random Number Generator (PRNG) — an algorithm that produces sequences that appear random but are produced by a deterministic formula. The sequence starts from a "seed" value. Modern browsers use algorithms like xorshift128+ that produce sequences with extremely long periods and excellent statistical properties.

Is Math.random() Good Enough?

For the vast majority of applications — picking a name, selecting a prize draw winner, choosing a category — the answer is unequivocally yes. The period of modern browser PRNGs is astronomically large (typically 2^128 or more). The sequences pass all standard statistical tests for randomness, including the NIST test suite used to evaluate cryptographic random number generators.

Cryptographic Randomness

For applications where security matters, browsers provide the Web Crypto API, which uses the operating system's cryptographically secure random number generator. This draws entropy from hardware sources — electrical noise, timing variations in hardware interrupts — that are genuinely unpredictable. WheelNamer's number generator uses crypto.getRandomValues() where available, providing the highest quality randomness available in a browser.

What About the Spin Animation?

The winner is determined first — by a random number calculation — and then the wheel is animated to stop at that position. The animation doesn't select the winner; the random number generator does. This means no matter how the wheel appears to be slowing down, the outcome was already decided before the animation began.

Equal Probability for All Entries

A fair wheel gives every entry an equal probability of being selected, regardless of its position. This is achieved by generating a random number and using it to select an index from the list of entries — each index has exactly 1/n probability of being selected. The digital version is actually superior to a physical draw from a hat, which can suffer from subtle physical biases.

The Bottom Line

For any practical use of a random wheel spinner, a well-implemented digital wheel is as fair as any random selection method available. It is statistically indistinguishable from true randomness, provides equal probability to every entry, and cannot be predicted or manipulated by any participant. Spin with confidence. The wheel is fair.