Mathematical Foundations: Uniform Distributions & Discrete Convolutions
How individual discrete variables combine into bell curves under the Central Limit Theorem.
A single fair die with S sides represents a Discrete Uniform Distribution, where each integer face k \in {1, 2, \dots, S} has an identical probability:
When rolling multiple dice NdS, the sum of independent random variables Y = X₁ + X₂ + \dots + X_N is mathematically evaluated via the discrete convolution of their probability mass functions. As the number of dice N increases, the flat distribution transforms into a unimodal, symmetric binomial distribution that asymptotically converges to a continuous Gaussian (Normal) bell curve in accordance with the Central Limit Theorem.
Flat Uniform Distribution
Every outcome from 1 to 20 has an identical 5% probability. High variance with zero clustering around the mean.
Triangular Distribution
Sum ranges from 2 to 12. Central sum 7 has a 16.67% (6/36) chance, while extremes 2 and 12 occur with only 2.78% (1/36).
Gaussian Bell Curve
Over 68% of rolls fall within 1 standard deviation of the mean. Outliers become exceptionally rare and predictable.
Polyhedral Dice Reference Matrix & Geometric Properties
Platonic solid geometry, expected averages, variance, and standard tabletop gaming functions.
| Die Type | Geometric Polyhedron | Outcome Range | Expected Value E[X] | Variance Var(X) | Std Deviation σ | Core TTRPG Application |
|---|---|---|---|---|---|---|
| d4 | Regular Tetrahedron (4 triangular faces) | 1 – 4 | 2.50 | 1.25 | 1.12 | Daggers, Magic Missile, Healing Potion tier |
| d6 | Regular Hexahedron (Cube, 6 square faces) | 1 – 6 | 3.50 | 2.92 | 1.71 | Shortswords, Fireball (8d6), Sneak Attack, Board games |
| d8 | Regular Octahedron (8 triangular faces) | 1 – 8 | 4.50 | 5.25 | 2.29 | Longswords, Rapiers, Cleric/Rogue Hit Die (1d8) |
| d10 | Pentagonal Trapezohedron (10 kite faces) | 1 – 10 (or 0–9) | 5.50 | 8.25 | 2.87 | Halberds, Glaives, Fighter/Paladin Hit Die, Eldritch Blast |
| d12 | Regular Dodecahedron (12 pentagonal faces) | 1 – 12 | 6.50 | 11.92 | 3.45 | Greataxes, Barbarian Hit Die (1d12), Witch Bolt |
| d20 | Regular Icosahedron (20 triangular faces) | 1 – 20 | 10.50 | 33.25 | 5.77 | D&D 5e core d20 resolution: Attacks, Saves, Checks |
| d100 | Zocchihedron or Dual d10 Percentile (Tens+Ones) | 1 – 100 | 50.50 | 833.25 | 28.87 | Call of Cthulhu, Wild Magic Surges, Percentile Loot |
D&D 5e Advantage vs Disadvantage: Exact Probability Derivation
Order statistics, cumulative distribution shifts, and non-linear bonuses.
In modern fifth-edition rules, Advantage requires rolling two d20 dice and retaining the higher outcome (2d20kh1), whereas Disadvantage takes the lower outcome (2d20kl1). These mechanics fundamentally warp the cumulative distribution function (CDF) through order statistics:
Advantage (Max of 2d20)
2d20kh1The probability of meeting or exceeding a target roll k is:
- • Expected Value: Rises from 10.5 to 13.825 (+3.325 average).
- • Critical 20 Chance: Nearly doubles from 5.00% to 9.75% (39/400).
- • Critical Fumble (1): Drops from 5.00% to just 0.25% (1/400).
Disadvantage (Min of 2d20)
2d20kl1The probability of meeting or exceeding a target roll k is:
- • Expected Value: Plummets from 10.5 to 7.175 (-3.325 average).
- • Critical 20 Chance: Collapses from 5.00% to a negligible 0.25% (1/400).
- • Critical Fumble (1): Surges from 5.00% up to 9.75% (39/400).
TTRPG Dice Notation Standard Grammar
Formal algebraic syntax supported by roll compilers and virtual tabletops (VTTs).
Rolls N dice with S faces each and sums them (e.g. 3d6 rolls three six-sided dice).
Keeps the top K rolls or bottom K rolls (e.g. 4d6kh3 keeps the 3 highest dice).
Discards the top D or bottom D rolls (e.g. 4d6dl1 discards the single lowest roll).
Adds or subtracts flat values after summing kept dice (e.g. 1d20+7 or 2d6+4).
Cryptographic PRNG vs Standard Math.random()
Why browser crypto APIs eliminate modulo bias and guarantee genuine fairness.
Most simple web simulators use JavaScript's default Math.random(), which employs the xorshift128+ pseudo-random generator. While computationally lightweight, xorshift128+ is deterministic, non-cryptographic, and prone to modulo bias when scaling floating-point numbers to non-power-of-two integer dice faces (such as d6, d10, or d20).
Utilvo utilizes hardware-entropy cryptographic seeds provided by the browser host OS via crypto.getRandomValues(new Uint32Array(1)). By applying rejection sampling over the 32-bit integer boundary 2³² = 4,294,967,296, each dice side receives a strictly unbiased, uniform probability of selection down to zero parts per billion.
Worked Case Studies & Probabilistic Scenarios
Concrete tactical mathematical calculations across popular tabletop scenarios.
Scenario 1: Greatsword (2d6) vs Greataxe (1d12) Consistency & Criticals
Damage VarianceA player is choosing between a Greatsword dealing 2d6 damage and a Greataxe dealing 1d12 damage.
Conclusion: The Greatsword delivers 0.5 higher average damage per strike with an 83.3% chance to deal 5 or more damage (compared to 66.7% for the Greataxe). However, Barbarians with Brutal Critical add 1 additional die on a critical hit (+1d12 = +6.5 avg vs +1d6 = +3.5 avg), tilting the math toward the Greataxe as critical hit frequency increases.
Scenario 2: Ability Score Generation via 4d6 Drop Lowest (4d6kh3)
Character CreationRolling four 6-sided dice and discarding the lowest face has exactly 6⁴ = 1,296 possible permutations.
Scenario 3: DC 15 Skill Check — Flat +5 Modifier vs Advantage
Tactical ComparisonA rogue faces a Difficulty Class (DC) 15 lockpicking check with a base proficiency modifier of +2. Should they spend inspiration for Advantage or obtain a flat +3 Guidance/Bardic bonus?
Insight: For midrange target DCs (10 to 14 needed on the die), Advantage provides an effective bonus of up to +4.8 to +5.0, making it statistically superior to modest static numeric buffs.
How to Roll Dice and Analyze Probabilities Step-by-Step
Step-by-step instructions for rolling custom dice and evaluating probability distributions.
Select or Enter Dice Formula
Click on quick polyhedral dice presets (d4, d6, d8, d10, d12, d20, d100) or type complex custom notation such as 4d6kh3+2 into the input box.
Configure Keep, Drop, and Modifiers
Add keep-highest (kh), keep-lowest (kl), drop-lowest (dl), or arithmetic bonuses to tailor rolls for D&D 5e advantage, disadvantage, or weapon damage.
Execute Roll & Inspect Results
Click Roll to generate cryptographic random outcomes with visual dice animations, intermediate roll tokens, and dropped dice indications.
Analyze Probability & History
Review the interactive probability distribution histogram, expected mean, variance, and cumulative percentile stats stored in your private browser session.
Frequently Asked Questions
In-depth answers to common questions regarding dice probabilities and simulator mechanics.
What dice notation and modifiers does the Interactive Dice Roller support?
The simulator supports standard tabletop RPG notation including NdS (e.g., 2d6, 1d20), keep highest/lowest (4d6kh3, 2d20kh1), drop highest/lowest (4d6dl1), flat arithmetic modifiers (+5, -2), and multi-dice pools.
How does D&D 5e Advantage and Disadvantage mathematically alter roll probabilities?
Advantage (rolling 2d20kh1) increases the expected roll value from 10.5 to 13.825 and raises the probability of rolling a critical 20 from 5.0% to 9.75%. Disadvantage (rolling 2d20kl1) lowers the expected value to 7.175 and drops critical chance to 0.25%.
How are exact probability distributions calculated versus Monte Carlo simulations?
For standard dice pools without keep or drop modifiers, probabilities are computed analytically using polynomial expansion and discrete convolutions. For complex drop/keep combinations, the engine executes 10,000+ Monte Carlo iterations in client JavaScript to build an exact empirical distribution curve.
Does the simulator generate cryptographically secure random numbers?
Yes. Rolls use the browser Web Cryptography API (crypto.getRandomValues) whenever available, ensuring uniform entropy distribution free from the predictable periodicity and modulo bias of basic pseudo-random generators like Math.random().
What are the expected average rolls and standard deviations for standard polyhedral dice?
Standard fair dice have expected averages of (S+1)/2: d4 averages 2.5 (σ ≈ 1.12), d6 averages 3.5 (σ ≈ 1.71), d8 averages 4.5 (σ ≈ 2.29), d10 averages 5.5 (σ ≈ 2.87), d12 averages 6.5 (σ ≈ 3.45), d20 averages 10.5 (σ ≈ 5.77), and d100 averages 50.5 (σ ≈ 28.87).