
Random Number Picker Test: 530,000 Draws Checked for Fairness
By Said · November 2026 · 5-minute read
The Spin Numbers picker draws numbers from a range you choose, without repeating a number in the same draw. I wanted to know whether every number really has the same chance, so I tested the exact selection code the tool uses on 530,000 draws.
The short version
- From 1 to 10, each number came up between 9,943 and 10,124 times in 100,000 draws (10,000 expected). Chi-square: 3.63, well below the 16.92 threshold.
- From 1 to 100, each number came up between 935 and 1,081 times in 100,000 draws (1,000 expected). Chi-square: 83.3, below the 123.2 threshold.
- With the default settings (12 numbers drawn from 24), no draw out of 20,000 contained a repeated number, and every number was drawn between 9,837 and 10,184 times (10,000 expected).
- The picker uses the browser’s standard random function. It is fine for classrooms, games and giveaways among friends, not for security or official lotteries.
How the picker chooses a number
When the wheel stops, the tool builds the list of numbers in your range that have not been drawn yet. It then picks one position in that list with Math.floor(Math.random() × length) and removes that number for the rest of the draw. Each remaining number therefore has the same chance at each step.
How I ran the test
- I loaded the live page and read the tool’s own script (spin-numbers.js, version 1.5.4).
- I copied the six lines that choose the number, without changing them, and ran them in the same Chromium-based browser.
- I did not run 530,000 animated spins on the page: the animation only decides when the number is chosen, not which one. Testing the selection code directly also avoids adding fake spins to the public spin counter.
- I counted how often each number appeared and ran chi-square goodness-of-fit tests at the usual 5% level.
Results
| Scenario | Draws | Lowest and highest count | Expected per number | Chi-square | 5% threshold |
|---|---|---|---|---|---|
| 1 number from 1–10 | 100,000 | 9,943 to 10,124 | 10,000 | 3.63 | 16.92 |
| 1 number from 1–100 | 100,000 | 935 to 1,081 | 1,000 | 83.3 | 123.2 |
| 3 numbers from 1–10 | 30,000 draws (90,000 numbers) | 8,886 to 9,179 | 9,000 | 9.09 | 16.92 |
| 12 numbers from 1–24 (default) | 20,000 draws (240,000 numbers) | 9,837 to 10,184 | 10,000 | 15.18 | 35.17 |
For the 1 to 10 range, the ten counts were 9,943, 9,999, 9,944, 10,002, 10,001, 10,124, 9,950, 10,099, 9,981 and 9,957.
No repeats within a draw
In the 50,000 multi-number draws (3 from 10 and 12 from 24), no number appeared twice in the same draw. When I asked for 11 numbers from a range of 10, the draw stopped after 10 numbers, each from 1 to 10 exactly once.
What this test can and cannot show
What it can show
It shows that the selection code gives every number in the range the same chance, within normal chance variation, and that a draw never repeats a number.
What it cannot show
- It tests the selection code, not the animation. The animation decides when the number is picked, so it does not change which number is picked.
- The result comes from your browser’s random function. Browsers can differ, and
Math.random()is not cryptographically secure. - The 3-from-10 chi-square is an approximation, because numbers in the same draw are not independent. The 1-from-10 and 1-from-100 tests do not have this limitation.
- A fair draw does not make a giveaway fair on its own: the list of entries and the rules matter too.
Run your own test
- Set the range to 1–10 and the number of draws to 1.
- Spin 100 times, clicking Setup between spins, and note each result.
- For each number, compute (count − 10)² / 10, then add the ten values.
- Below 16.92 your sample is consistent with a fair picker. With only 100 spins, results will look uneven: that is normal.
Frequently asked questions
Can the same number come up twice?
Not within one draw. In a new draw, every number is available again.
Is it fair enough for a classroom or a giveaway?
For classrooms, games and informal giveaways, yes. For an official lottery or anything with legal or financial stakes, use a certified process.
Related: We Flipped Our Coin 10,000 Times · We Rolled Our Dice Roller 15,000 Times
References
NIST/SEMATECH. (n.d.). 1.3.5.15. Chi-square goodness-of-fit test. e-Handbook of Statistical Methods. https://www.itl.nist.gov/div898/handbook/eda/section3/eda35f.htm
V8 team. (2015, December 17). There’s Math.random(), and then there’s Math.random(). V8 blog. https://v8.dev/blog/math-random
MDN Web Docs. (n.d.). Math.random(). Mozilla. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random




