
We Rolled Our Dice Roller 15,000 Times: A Fairness Test With Real Results
We rolled 15,000 virtual dice and ran chi-square tests. See the data, the odd batch we re-tested, and what a fairness test can and cannot prove.
By Said · November 2026 · 4-minute read
Anyone can write “our dice are fair” on a web page. We wanted evidence, so we ran the Spin Numbers Dice Roller 2,500 times, six dice at a time, recorded 15,000 dice in total, and tested the results with a chi-square test. This article shows the numbers, including one result that looked wrong at first, and explains what a test like this can and cannot prove.
Tested on 23 November 2026 in Chrome on Windows. The results describe this one tool in this one setup. They are not a certification.
The short version
- Six-sided die (D6): 6,000 dice, every face between 936 and 1,041 times against 1,000 expected. Chi-square 7.06, p = 0.216, so no sign of bias.
- Twenty-sided die (D20): three batches of 3,000 dice gave p-values of 0.045, 0.008 and 0.549. Two batches looked suspicious on their own, so we investigated. All 9,000 dice together give chi-square 21.90, p = 0.289.
- Repeats: on the D6, the next die matched the previous one 16.6% of the time, against 16.7% expected for a fair die.
- Verdict: we found no consistent evidence of bias, but we cannot claim perfection. The tool is a good fit for games, classrooms and everyday decisions. It is not meant for gambling or security.
What we tested and why
The Dice Roller lets you roll one to six dice at once, with 4, 6, 8, 10, 12 or 20 sides. People use it for board games, role-playing, classroom probability lessons and quick tie-breakers. In all of those cases the question is the same: does every face have the same chance? If you want a wider guide to choosing and using dice tools, see our dice generator guide.
How the Dice Roller picks a number
Each die is produced by the browser’s Math.random() function, scaled to the number of sides: Math.floor(Math.random() * sides) + 1. By design, every face has the same probability.
Math.random() is a pseudo-random number generator. In V8, the JavaScript engine used by Chrome, it has been based on the xorshift128+ algorithm since 2015. The V8 team reports that this algorithm passes the TestU01 test suite, and also states plainly that it is not cryptographically secure (V8 team, 2015). MDN gives the same warning: do not use it for anything related to security (MDN Web Docs). For games, classroom draws and everyday choices that is fine. For passwords, lotteries or anything involving money, it is the wrong tool. Our guide to pseudo-random versus true random explains the difference.
How we ran the test
- We opened the Dice Roller, set it to six dice and chose the D6.
- A script pressed “Roll Dice” 1,000 times and read each result from the on-screen “Individual results” list, so we measured what a visitor sees.
- We repeated this for the D20 in three separate batches of 500 rolls (3,000 dice each).
- We counted how often each face appeared and compared the counts with the equal-chance expectation using Pearson’s chi-square goodness-of-fit test (NIST/SEMATECH).
- We checked that no result had been counted twice: in the D6 run and in the first two D20 batches, no two consecutive rolls were identical.
One disclosure. The dice animation takes about four seconds per roll, which would have made the test very slow. During the test we made the page’s timers run faster, which only shortens the animation. The code that generates the numbers was not changed.
Why so many rolls? With a small sample, a fair die and a slightly biased die look the same. With 1,000 expected appearances per face, a bias of a few percent starts to become visible. More rolls would be better still, but with diminishing returns.
Results for the six-sided die
| Face | Observed | Expected | Difference |
|---|---|---|---|
| 1 | 1,029 | 1,000 | +2.9% |
| 2 | 989 | 1,000 | −1.1% |
| 3 | 990 | 1,000 | −1.0% |
| 4 | 936 | 1,000 | −6.4% |
| 5 | 1,041 | 1,000 | +4.1% |
| 6 | 1,015 | 1,000 | +1.5% |

Face 4 came up 6.4% less often than expected. That looks large, but it is within normal random variation at this sample size. The chi-square test looks at all six faces together, and the p-value of 0.216 means that a perfectly fair die would produce differences at least this large about one time in five.
Results for the twenty-sided die
| Batch | Dice | Chi-square (19 df) | p-value |
|---|---|---|---|
| A | 3,000 | 30.57 | 0.045 |
| B | 3,000 | 37.12 | 0.008 |
| C | 3,000 | 17.60 | 0.549 |
| All batches combined | 9,000 | 21.90 | 0.289 |

Why two batches looked off, and why we did not stop there
A p-value is the chance of seeing a deviation at least this large if the die really is fair. By convention, a value below 0.05 is flagged as suspicious. That means roughly one fair test in twenty gets flagged by chance alone.
Batch A (p = 0.045) was borderline. Batch B (p = 0.008) was harder to dismiss, so we did three things instead of publishing only the good-looking numbers:
- We ran the same expression the tool uses,
Math.floor(Math.random() * 20) + 1, 300 times in the same browser, 3,000 draws each. Ten of the 300 samples (3.3%) fell below p = 0.05, in line with the 5% we would expect. - We rolled a third batch, which came out unremarkable (p = 0.549).
- We combined all 9,000 dice, which passes the test (p = 0.289).
Our conclusion is careful. We found no consistent bias. But two low p-values out of three batches is a little more than chance usually delivers, so we would not be surprised if a longer test, or another browser, gave slightly different numbers. That is exactly why one test is never the last word.
Repeats and streaks
People often expect dice to “alternate” and treat a repeat as a sign of something wrong. On the D6, the next die matched the previous one 16.6% of the time, almost exactly the 16.7% expected. The longest run of identical values, in the order the dice were recorded, was six. Runs like that are normal in random data, and our article on why humans are bad at being random explains why they feel suspicious.
What a fairness test can and cannot prove
What it can show
- That no large bias exists in the numbers the tool displays.
- That every face is reachable and no value falls outside the range.
- That the results are not duplicated or stuck between rolls.
What it cannot show
- That the generator is perfectly random. Statistical tests can only fail to find a problem.
- That the numbers are unpredictable. Predictability is a separate question, and it is why this tool should not be used for gambling or security.
- That every browser behaves the same way. We tested one.
When the Dice Roller is a good choice
- Board games, role-playing sessions and quick tie-breakers.
- Classroom probability lessons, where you can run your own test (see below).
- Everyday choices where every option should have the same chance, as explained in our guide to equal-chance random selection.
If you are running a prize draw, read our guide on how to run a fair raffle or giveaway first. Rules and local laws matter more than the random number.
Run your own test in five steps
- Choose the D6 and six dice, and roll 100 times. Write down all 600 results.
- Count how often each face appeared. Expect about 100 each.
- For each face, compute (observed − expected)² ÷ expected, then add the six values. That sum is the chi-square statistic.
- Compare it with 11.07, the critical value for 5 degrees of freedom at the 5% level in a standard chi-square table. A lower value means no evidence of bias.
- Remember that 600 dice can only reveal large biases. For smaller ones you need thousands.
Frequently asked questions
Are online dice rolls really random?
They are pseudo-random: produced by an algorithm, not by a physical process. For games and classroom use the difference does not matter. For security or money it does.
Does the Dice Roller favour any number?
In our test of 15,000 dice we found no consistent favourite. Individual batches varied, as random data always does.
Can I use it for gambling?
No. It is built for games, learning and everyday decisions. Anything involving real money needs an audited, certified source of randomness.
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




