User Rating 0.0
Total Usage 0 times
Quick Presets:
Format: [count]d[sides][kh/dl/kl/dh][n][+/-mod]
or configure manually
Configure your dice and press Roll or use a preset
Is this tool helpful?

Your feedback helps us improve.

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.

dice roller RPG dice d20 random number generator dice calculator tabletop dice dice notation probability

Formulas

For n dice each with s faces (numbered 1 to s) plus a flat modifier m, the expected value of the total is:

E[X] = n × s + 12 + m

The variance of a single uniform die is:

σ21 = s2 112

For n independent dice, total standard deviation is:

σ = n × s2 112

The probability of rolling exactly total k on n dice with s sides uses the inclusion-exclusion formula:

P(k) = 1sn j (1)j n!j!(nj)! (ksj1)!(n1)!(ksjn)!

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 TypeNotationFacesE[X] per dieσ per dieCommon Use
Coind221.500.50Binary decisions
Tetrahedrond442.501.12Small weapon damage (D&D)
Cubed663.501.71Standard board games, Shadowrun
Octahedrond884.502.29Medium weapon damage
Pentagonal trapezohedrond10105.502.87Percentile (World of Darkness)
Dodecahedrond12126.503.45Greataxe damage, Barbarian HD
Icosahedrond202010.505.77Attack rolls, saving throws (D&D 5e)
Percentiled10010050.5028.87Call of Cthulhu, percentile checks
Zocchihedrond303015.508.66Special tables, DCC RPG
Custom smalld332.000.82Half-damage calculations
FUDGE/FATEdF (d3−2)3 (−1,0,+1)0.000.82FATE Core system
Custom larged10001000500.50288.68Ultra-granular simulations
2d6 (pool)2d6 - 7.002.42Monopoly, Catan, PbtA
3d6 (bell curve)3d6 - 10.502.96GURPS, ability score generation
4d6 drop lowest4d6dl1 - 12.242.85D&D 5e ability score generation

Frequently Asked Questions

Math.random() uses a PRNG (typically xorshift128+) seeded from a low-entropy source, which can exhibit detectable periodicity over millions of rolls. crypto.getRandomValues() draws from the OS entropy pool (e.g., /dev/urandom on Linux, BCryptGenRandom on Windows), producing cryptographically secure uniform integers. For tabletop gaming the practical difference is negligible, but for statistical simulations or high-stakes gambling verification, CSPRNG eliminates the risk of pattern exploitation. This tool uses rejection sampling on top of crypto.getRandomValues() to avoid modulo bias when the die face count is not a power of 2.
In notation like 4d6kh3, you roll 4 six-sided dice and keep only the 3 highest results, summing them. This is equivalent to 4d6dl1 (drop lowest 1). The expected value shifts upward from the naive 4 × 3.5 = 14.0 to approximately 12.24, and the distribution becomes left-skewed. D&D 5th Edition uses this method for ability score generation. The calculator highlights which individual dice were kept (green) and which were dropped (dimmed) in the result breakdown.
The Central Limit Theorem guarantees that the sum of n independent, identically distributed random variables converges to a normal distribution as n increases. With 1d20, the distribution is perfectly uniform (5% per face). With 2d20, you get a triangular distribution peaking at 21. By 5d6, the histogram closely approximates a Gaussian with mean n(s+1)/2 and standard deviation √(n(s²−1)/12). This is why systems like 3d6 (GURPS) produce more predictable outcomes than 1d20 (D&D).
The visual roller supports any die from d2 to d1000 via the custom sides input. For FUDGE/FATE dice (values −1, 0, +1), use the dF preset which internally rolls d3 and subtracts 2. Exploding dice (reroll and add on max result) are not currently implemented because they produce unbounded distributions - the probability computation would require truncation at an arbitrary depth. For exploding dice, use the notation field with repeated manual rolls.
For pools of 1-8 standard dice without keep/drop mechanics, the tool computes exact probabilities using the inclusion-exclusion combinatorial formula. For pools of 9+ dice or any keep/drop configuration, it falls back to Monte Carlo sampling with 100,000 iterations, yielding approximately ±0.3% accuracy at 95% confidence. The histogram labels indicate which method was used. Exact computation for 8d6 requires evaluating C(8,j) × C(k−6j−1, 7) across all valid j, which completes in under 50ms on modern hardware.
A flat modifier m shifts the entire distribution horizontally without changing its shape, variance, or standard deviation. The expected value becomes E[X] + m and the min/max bounds shift by m. This is because adding a constant to a random variable is a linear transformation. If you need multiplicative scaling (e.g., double damage on critical hit), roll the dice with double the count instead - 2d6 doubled is statistically different from 4d6.