Blog / Is Wheel of Names Really Random?

Is Wheel of Names Really Random? The Math Behind Spinner Wheels

You spin an online wheel. It lands on a name. But was the selection actually random, or did the code just make it look that way? This is a fair question — and the answer depends entirely on how the wheel was built.

5 min read · Updated March 2026

Two Types of Random: Pseudo vs. Cryptographic

Most programming languages come with a built-in random function. In JavaScript, it's Math.random(). This function is "pseudo-random" — it follows a deterministic algorithm seeded by an initial value. Given the same seed, it produces the same sequence every time.

For casual use, pseudo-random is fine. But for anything where fairness matters — giveaways, student selection, raffles — it has a problem: the sequence is technically predictable.

Cryptographic randomness is different. Functions like crypto.getRandomValues() pull entropy from your operating system's hardware: timing variations in your CPU, electrical noise in your circuits, mouse movements, and keystroke timing. This entropy pool is genuinely unpredictable — not even the developer who wrote the code can predict the next value.

At a glance:

  • Math.random() — fast, pseudo-random, technically predictable
  • crypto.getRandomValues() — slower, hardware-seeded, genuinely unpredictable

What Makes a Wheel "Fair"?

1

Uniform distribution

Each segment must have an exactly equal probability of being selected. If you have 10 names, each should have a 10% chance. This sounds obvious, but many implementations get it subtly wrong due to modulo bias.

2

Independence

Each spin must be independent of every previous spin. The result of spin #47 should have zero influence on spin #48.

3

Unpredictability

No observer — including the developer — should be able to predict the result before the wheel stops. This is where cryptographic randomness matters.

The Modulo Bias Problem

Here's a subtle bug that affects many random number implementations:

Say you want a random number between 0 and 9 (10 options). Your random function produces a number between 0 and 255 (a single random byte). The naive approach: randomByte % 10.

The problem: 256 doesn't divide evenly by 10. Numbers 0–5 each have a 26/256 chance, while numbers 6–9 each have a 25/256 chance. That's a 4% bias. Small, but real — and it compounds over thousands of spins.

The fix — rejection sampling: If the random byte falls in the biased range, throw it away and generate a new one. At Real Wheel Picker, we use rejection sampling on top of crypto.getRandomValues() to eliminate modulo bias entirely.

How to Test If a Wheel Is Fair

If you're skeptical about any spinner wheel (including ours), here's how to test it:

  1. 1 Set up a wheel with 4 equal segments (A, B, C, D).
  2. 2 Spin 1,000 times and record results.
  3. 3 Each segment should land on approximately 250 times.
  4. 4 Run a chi-squared test: if the p-value is above 0.05, the distribution is consistent with true randomness.

Which Spinner Wheels Are Actually Cryptographically Random?

Most online spinner tools don't publish their source code, so we can only assess them by reading their JavaScript in the browser. Here's what a quick inspection reveals about the most popular options:

Tool Random Method Modulo Bias Fix
Real Wheel Picker crypto.getRandomValues() Yes — rejection sampling
Wheel of Names Math.random() Not applicable
Generic spinner sites Math.random() (typical) Rarely

To verify any site yourself: open the browser Developer Tools (F12), go to Sources, and search for "Math.random" or "getRandomValues" in the site's JavaScript files.

What Happens When Your Device Has Low Entropy?

The crypto.getRandomValues() function pulls from your operating system's entropy pool — a reservoir filled by physical events like mouse movements, keyboard timings, and hardware interrupts. On a modern desktop or phone, this pool is effectively infinite and always full.

On a fresh virtual machine or headless server with no user interaction, the entropy pool can theoretically be low immediately after boot. In this edge case, some implementations will block and wait until enough entropy is available before returning a value. Modern browsers handle this transparently — crypto.getRandomValues() in a web browser has never been observed to block in practice because browsers maintain their own entropy management layer on top of the OS.

For practical purposes: if you're spinning a wheel on a phone or computer you've been using for more than a few seconds, entropy is a non-issue. The edge case matters for cryptographic key generation in data centers — not for picking a name from a list in a browser.

Why It Actually Matters for Giveaways

For most classroom or party uses, the difference between Math.random() and crypto.getRandomValues() is negligible. Both will feel random. But for public-facing giveaways with real prizes, the distinction becomes important for two reasons:

1. Legal defensibility

Some jurisdictions require demonstrably unbiased selection for prize draws. "We used crypto.getRandomValues()" is a verifiable, auditable statement. "We used Math.random()" is technically true but harder to defend in a dispute because it implies a predictable algorithm.

2. Trust from your audience

If a follower with technical knowledge checks how you picked your winner and sees that the wheel uses cryptographic randomness, they'll accept the result. If they see Math.random(), some will wonder whether the sequence was seeded to favor a specific outcome. Even if it wasn't, the perception of possible manipulation is the problem.

The Bottom Line

Not all spinner wheels are created equal. Look for two things: crypto.getRandomValues() (not Math.random()) and rejection sampling (not modulo). If a wheel uses both, it's as fair as mathematics allows.

Our wheel of names, giveaway picker, and every other tool on Real Wheel Picker uses this exact approach. The code runs in your browser, the randomness comes from your hardware, and we never see the results.

For scenarios where some participants should have better odds — like raffles with multiple tickets — our weighted random picker lets you assign custom probabilities while keeping the draw transparent.

Try Our Cryptographically Fair Wheel

Spin a wheel that uses crypto.getRandomValues() and rejection sampling — no Math.random() shortcuts.

Related Guides