Dice fairness test
Is Your d20 Loaded? Test It With Numbers
Roll your die, tap in each result, and this page runs the same chi-square test a statistician would. Below the test are the numbers most dice tests leave out: how many rolls it really takes, and how uneven a perfectly fair die looks.
Tap a face each time the die shows it.
No rolls yet. A d20 needs at least 100 before the test means anything.
How to run a test that means something
- Decide how many rolls before you start, and stop there. Checking the result as you go and stopping when it looks bad will convict an honest die, because every fair die has a bad-looking stretch somewhere.
- If you suspect a face, name it before rolling. Choose it as the suspect face above. A test aimed at one face needs far fewer rolls than a test of all of them, but it only counts if the face was chosen before the rolls, not after looking at them.
- Roll the same way every time. Same height, same surface, and let the die tumble freely. Decide in advance what happens to a roll that leaves the table, and keep to it.
- Get at least five rolls per face. Below that the test's arithmetic stops being reliable: 100 rolls for a d20, 30 for a d6.
Pasted rolls work the same way, so you can also test a dice bot or an app by copying out its history. For a d10, a 0 counts as 10.
How many rolls it takes to catch a loaded die
Each row is a die with one face running hot, and the number of rolls needed to catch it 80% of the time with a test aimed at that face. Exact binomial figures at the 5% level, rounded to the nearest ten.
| Die | The fault | Rate | Fair rate | Rolls to catch it |
|---|---|---|---|---|
| d20 | 20 comes up 10% too often | 5.50% | 5.00% | 12,550 |
| d20 | 20 comes up 25% too often | 6.25% | 5.00% | 2,160 |
| d20 | 20 comes up 50% too often | 7.50% | 5.00% | 600 |
| d20 | 20 comes up twice as often as it should | 10.0% | 5.00% | 180 |
| d6 | 6 comes up 10% too often | 18.3% | 16.7% | 3,290 |
| d6 | 6 comes up 25% too often | 20.8% | 16.7% | 560 |
| d6 | 6 comes up 50% too often | 25.0% | 16.7% | 160 |
The 100-roll test most people run on a d20 is weaker than it looks. Even aimed at the right face, it catches a d20 that rolls 20 twice as often as it should only 54.9% of the time, and one that rolls 20 half again as often only 21.7% of the time. A die that is off by a tenth takes 12,550 rolls, which nobody is doing at the kitchen table. A 100-roll test can clear a die of being badly off, and nothing finer.
Testing every face at once, which is what the test above does when no suspect is named, is less sensitive again. For the same fault it needs more than twice as many rolls as the aimed test, because it has to spread its attention across every face.
What a fair d20 looks like after 100 rolls
How many times the busiest face turns up when a perfectly fair d20 is rolled 100 times. Every face averages 5, and the busiest one almost never stops there.
The busiest face of a fair d20 shows up 10 or more times in 46.8% of 100-roll sessions. Exact, counted over every possible session.
| Busiest face shows up | Chance | Odds |
|---|---|---|
| 9 or more | 79.3% | 1 in 1 |
| 10 or more | 46.8% | 1 in 2 |
| 11 or more | 21.5% | 1 in 5 |
| 12 or more | 8.38% | 1 in 12 |
| 13 or more | 2.91% | 1 in 34 |
| 14 or more | 0.925% | 1 in 108 |
This is why so many honest dice get called cursed. Roll a fair d20 100 times and some face turning up ten times is close to a coin flip. One face never turning up at all happens 11.3% of the time, and some face turning up once or never happens 55.6% of the time, more often than not.
What would be unusual is a face you named in advance turning up 10 or more times: that happens 2.82% of the time. The gap between those two figures is the whole case for naming the suspect before you roll. After the fact, some face always looks hot, and it is usually the one that hurt.
Why fair dice fail one test in twenty
The test calls a die biased when a fair die would produce results this uneven less than 5% of the time. That threshold is a trade, and its cost is that one fair die in twenty fails. Test every d20 in a bag of twenty and the chance at least one honest die fails is 64.2%.
So a single failed test is a reason to roll that die again, not to throw it away. Run a fresh test with new rolls, decided in advance. A die that is badly off will usually fail again, while a fair one that was unlucky passes 95% of the time.
For anyone checking the working: the chi-square statistic for a d20 has 19 degrees of freedom, and the 5% line sits at 30.14. The test above shows the statistic for your rolls.
What the salt water test does and does not show
Floating a die in heavily salted water and spinning it tests one thing: whether its weight is centred. An air bubble or uneven resin makes one side lighter, so the same few faces keep surfacing.
It says nothing about faces cut to different sizes, or edges rounded unevenly in tumbling or polishing. Those change how a die rolls without changing how it floats. Rolling it is the only test that covers everything, which is why the numbers above matter: they say how much rolling it takes.
Questions
How many times do you need to roll a d20 to test it?
You need at least 100 rolls of a d20 for the chi-square test to be valid, but 100 rolls only catches a badly loaded die. Catching a d20 that rolls one named face half again as often as it should takes about 600 rolls, and a die off by a tenth takes about 12,550.
Is it normal for a fair d20 to roll the same number a lot?
Yes: in 100 rolls of a fair d20, the most common face turns up 10 or more times 46.8% of the time, twice its average. A particular face named beforehand doing that is much rarer, 2.82%.
What does the p-value in a dice test mean?
The p-value is the chance that a perfectly fair die would produce counts at least as uneven as yours. A p-value of 3% means a fair die does this about once in 33 tests. It is not the chance that your die is fair.
Can I test a dice bot or an online dice roller the same way?
Yes, a dice bot or app is tested exactly like a physical die: copy out a few hundred of its results and paste them into the box above. The rollers on this site use cryptographic randomness with rejection sampling, so every face is exactly equally likely, and they will still fail one test in twenty, like any fair die.