Custom Dice Roller Calculator
Roll custom dice with cryptographic randomness. Supports RPG notation (3d20+5), keep/drop mechanics, roll history, and probability statistics.
About
Dice notation errors in tabletop RPGs and Monte Carlo simulations produce skewed outcomes that compound over hundreds of rolls. A biased generator using Math.random exhibits measurable non-uniformity across 232 samples. This tool uses the browser's crypto.getRandomValues API to source entropy from the operating system's CSPRNG, producing uniform distributions across any die face count from d2 through d1000. It parses standard RPG dice notation including keep-highest and drop-lowest mechanics.
The calculator computes exact expected value E[X] and standard deviation σ for your configured roll. Roll history is persisted locally so you can audit distribution fairness across sessions. Note: the probability histogram assumes independent, identically distributed rolls and does not model loaded or non-Platonic solid dice. For physical dice validation, a minimum of 500 recorded rolls is recommended before drawing statistical conclusions.
Formulas
For n dice each with s faces (numbered 1 to s) plus a flat modifier m, the expected value of the total is:
The variance of a single uniform die is:
For n independent dice, total standard deviation is:
The probability of rolling exactly total k on n dice with s sides uses the inclusion-exclusion formula:
Where n = number of dice, s = number of sides per die, m = flat modifier added to total, k = target total (before modifier), σ = standard deviation, E[X] = expected value. Keep-highest and drop-lowest mechanics alter the distribution non-trivially and are computed via enumeration for small pools or Monte Carlo sampling for pools exceeding 8 dice.
Reference Data
| Die Type | Notation | Faces | E[X] per die | σ per die | Common Use |
|---|---|---|---|---|---|
| Coin | d2 | 2 | 1.50 | 0.50 | Binary decisions |
| Tetrahedron | d4 | 4 | 2.50 | 1.12 | Small weapon damage (D&D) |
| Cube | d6 | 6 | 3.50 | 1.71 | Standard board games, Shadowrun |
| Octahedron | d8 | 8 | 4.50 | 2.29 | Medium weapon damage |
| Pentagonal trapezohedron | d10 | 10 | 5.50 | 2.87 | Percentile (World of Darkness) |
| Dodecahedron | d12 | 12 | 6.50 | 3.45 | Greataxe damage, Barbarian HD |
| Icosahedron | d20 | 20 | 10.50 | 5.77 | Attack rolls, saving throws (D&D 5e) |
| Percentile | d100 | 100 | 50.50 | 28.87 | Call of Cthulhu, percentile checks |
| Zocchihedron | d30 | 30 | 15.50 | 8.66 | Special tables, DCC RPG |
| Custom small | d3 | 3 | 2.00 | 0.82 | Half-damage calculations |
| FUDGE/FATE | dF (d3−2) | 3 (−1,0,+1) | 0.00 | 0.82 | FATE Core system |
| Custom large | d1000 | 1000 | 500.50 | 288.68 | Ultra-granular simulations |
| 2d6 (pool) | 2d6 | - | 7.00 | 2.42 | Monopoly, Catan, PbtA |
| 3d6 (bell curve) | 3d6 | - | 10.50 | 2.96 | GURPS, ability score generation |
| 4d6 drop lowest | 4d6dl1 | - | 12.24 | 2.85 | D&D 5e ability score generation |