Rolling for real, then checking against theory
Roll k dice with f faces each and the sum runs from k up to k times f. This page rolls as many times as you ask, counts how often each sum appears, builds the matching theoretical distribution by repeated convolution and puts the two side by side in one table. The theoretical mean is k(f+1)/2 and the theoretical standard deviation is the square root of k(f squared minus 1)/12, both shown next to the observed values. The sum with the largest gap is called out separately.
Assumptions and what is not covered
Every face is assumed equally likely and the rolls independent. Cumulative probability of reaching a target sum or more, and mixed sets where the dice have different face counts, are not covered. No published threshold was found for how wide a gap between observed and theoretical shares would mark a die as loaded, so the page shows the gap without ruling on bias. The browser Math.random function is not a cryptographically secure random source, so do not use it for draws that carry legal weight or money. Rolls are capped at 100,000 and distinct sums at 100. Written as of October 2026.
Frequently asked questions
With a finite number of rolls the observed share always wobbles around the theoretical one. More rolls tend to shrink the gap, but a remaining gap on its own is not evidence of bias.
This page compares an observed distribution from repeated rolls against the theoretical distribution. Cumulative probability of hitting a given target sum or more is not covered here.
The browser Math.random function is not a cryptographically secure random source. Keep it for learning and reference rather than draws that carry legal weight or money.