Polyhedral RPG Dice Roller
Roll D4, D6, D8, D10, D12, D20, and D100 dice with D&D 5e Advantage, arithmetic modifiers, drop-lowest rules, and cryptographically fair CSPRNG.
Common RPG Presets
Roll History
No rolls recorded yet.
The Mathematics of Polyhedral Dice: Platonic Solids, Convolutions & Advantage
Polyhedral dice are the sacred geometry of tabletop roleplaying games (TTRPGs) such as Dungeons & Dragons, Pathfinder, Call of Cthulhu, and Warhammer. While ordinary board games rely exclusively on standard six-sided cubic dice ($D6$), fantasy game design pioneered the use of five classical Platonic solids and Catalan solids to simulate complex probability distributions, critical strikes, and variable weapon damage.
Understanding the mathematics behind polyhedral dice allows dungeon masters, game developers, and players to optimize strategies, evaluate combat odds, and grasp how dice pools naturally transform uniform probability into bell-curved Gaussian distributions.
1. Platonic Solids and Polyhedral Geometry
In Euclidean geometry, a Platonic solid is a regular, convex polyhedron whose faces are congruent regular polygons with identical numbers of faces meeting at each vertex. In three-dimensional space, exactly five Platonic solids exist, as proven by Euclid in Book XIII of the Elements:
| Die Notation | Geometric Solid | Face Polygon | Vertices ($V$) | Edges ($E$) | Faces ($F$) | Euler Characteristic ($V - E + F$) |
|---|---|---|---|---|---|---|
| D4 | Regular Tetrahedron | Equilateral Triangle | 4 | 6 | 4 | 2 |
| D6 | Cube (Hexahedron) | Square | 8 | 12 | 6 | 2 |
| D8 | Regular Octahedron | Equilateral Triangle | 6 | 12 | 8 | 2 |
| D10 | Pentagonal Trapezohedron | Kite (Catalan solid) | 12 | 20 | 10 | 2 |
| D12 | Regular Dodecahedron | Regular Pentagon | 20 | 30 | 12 | 2 |
| D20 | Regular Icosahedron | Equilateral Triangle | 12 | 30 | 20 | 2 |
Notice that the D10 is not a Platonic solid because its faces are asymmetrical kites rather than regular polygons; however, it is an isohedral (face-transitive) Catalan solid, ensuring that every face has an identical geometric relationship to the center of mass.
2. Single Die Uniform Distribution vs. Multi-Dice Convolution
A single die roll represents a discrete uniform distribution. Every possible integer outcome has an equal probability:
Uniform Discrete Probability & Expected Value
P(X = k) = 1 / S, ∀ k ∈ [1, S]
E[X] = (S + 1) / 2, Var(X) = (S^2 - 1) / 12
For a standard D20, $E[X] = (20 + 1) / 2 = 10.5$. Every individual outcome (from 1 to 20) occurs with exactly $1 / 20 = 5.0\%$ probability.
The Sum of Multiple Dice: Discrete Convolution and the Central Limit Theorem
When a player rolls multiple independent dice (such as $3d6$ for character ability scores or $8d6$ for Fireball), the resulting probability distribution is no longer flat. The probability mass function (PMF) of the sum of two independent random variables $X$ and $Y$ is the discrete convolution of their individual PMFs:
Discrete Convolution Formula
P(X + Y = z) = ∑_(k) P(X = k) × P(Y = z - k)
By the Central Limit Theorem, as the number of dice in a pool increases, the distribution of their sum converges rapidly toward a continuous Normal (Gaussian) distribution:
- 1d20: Uniform distribution (flat line). Equal odds of rolling 1, 10, or 20.
- 2d6: Triangular distribution centered at 7 ($P(7) = 6/36 \approx 16.67\%$, while $P(2) = P(12) = 1/36 \approx 2.78\%$).
- 3d6: Bell-shaped binomial distribution centered at 10.5 ($P(10) = P(11) = 27/216 = 12.5\%$, while $P(3) = P(18) = 1/216 \approx 0.46\%$).
- 8d6 (Fireball): Highly peaked Gaussian curve with mean $\mu = 8 \times 3.5 = 28$ and standard deviation $\sigma = \sqrt{8 \times 2.916} \approx 4.83$. Over 68% of rolls land between 23 and 33!
3. D&D 5th Edition: Advantage & Disadvantage Mathematics
In Dungeons & Dragons 5th Edition, the classic numerical modifier stacking of earlier editions was replaced by the elegant Advantage and Disadvantage mechanic. Instead of adding floating $+2$ or $+4$ bonuses, a player rolls two D20s and takes the highest (Advantage) or lowest (Disadvantage).
Let $X_1, X_2 \sim \text{Uniform}(1, 20)$ be independent random variables. Let $Y = \max(X_1, X_2)$ represent Advantage, and $Z = \min(X_1, X_2)$ represent Disadvantage.
Cumulative Distribution Function (CDF) for Advantage
P(max(X_1, X_2) ≤ k) = P(X_1 ≤ k) × P(X_2 ≤ k) = (k / 20)^2
P(max(X_1, X_2) ≥ k) = 1 - ((k - 1) / 20)^2
The table below demonstrates the dramatic shift in success probabilities across common Target Armor Classes / Difficulty Classes (DC):
| Target Roll ($k$) | Normal D20 Chance | Advantage (Keep Highest) | Disadvantage (Keep Lowest) | Effective Advantage Bonus |
|---|---|---|---|---|
| ≥ 2 | 95.0% | 99.75% | 90.25% | +0.95 |
| ≥ 5 | 80.0% | 96.00% | 64.00% | +3.20 |
| ≥ 10 | 55.0% | 79.75% | 30.25% | +4.95 |
| ≥ 11 (Median) | 50.0% | 75.00% | 25.00% | +5.00 (Maximum impact) |
| ≥ 15 | 30.0% | 51.00% | 9.00% | +4.20 |
| ≥ 19 | 10.0% | 19.00% | 1.00% | +1.80 |
| = 20 (Critical Hit) | 5.0% | 9.75% | 0.25% | Almost double crit chance! |
Notice that Advantage is most potent around median target numbers ($\text{DC } 10-12$), providing an effective bonus equivalent to a massive $+5$ modifier. Moreover, Advantage slashes the chance of a critical failure (natural 1) from $1 / 20$ (5%) down to $1 / 400$ (0.25%).
4. Eliminating Modulo Bias with Cryptographic CSPRNG
A subtle bug present in thousands of online dice roller scripts is modulo bias. Consider naive random die roll code:
Flawed Modulo Implementation
const roll = (Math.floor(Math.random() * 0xFFFFFFFF) % 6) + 1; // BIASED
Because $2^{32} = 4,294,967,296$ is not evenly divisible by 6 ($4,294,967,296 = 715,827,882 \times 6 + 4$), the remainder 4 means that outcomes 1, 2, 3, and 4 have slightly higher probability than 5 and 6! Over millions of rolls, this skews combat and game results.
2ClickKit eliminates modulo bias completely using Rejection Sampling:
Unbiased Polyhedral Die Roll Algorithm
// Client-side in-browser execution 5. Standard RPG Notation Parser in TypeScript
Dice notation (such as 3d6+4 or 1d20-1) is the lingua franca of tabletop gaming. Below is a clean, robust TypeScript parser implementing standard tabletop dice notation:
// Client-side in-browser execution 100% In-Browser Privacy Protection
Your rolls, campaigns, and dice outcomes remain entirely private. 2ClickKit generates all random numbers and renders audio effects locally in browser memory. No roll statistics or telemetry ever leave your device.
How to Use Polyhedral Dice Roller
-
Select Your Polyhedral Dice Pool
Click on D4, D6, D8, D10, D12, D20, or D100 dice to assemble your custom combat or skill check pool.
-
Configure Modifiers and Advantage
Apply static +/- arithmetic modifiers or toggle D&D 5e Advantage, Disadvantage, or Drop-Lowest modes.
-
Roll with Physics and Sound Effects
Click the Roll button or tap any die for an instant quick-roll accompanied by synthetic audio clatter.
-
Review Breakdown & Critical Highlights
Inspect individual dice results, critical hit/miss indicators (natural 20/natural 1), and rolling history.
D&D 5e Combat Attack Roll Example
1d20 (Advantage) + 6 attack bonus Rolled [18, 7(dropped)] + 6 = 24 (Hit! Critical range avoided) Evaluated instantaneously with natural roll and dropped die indicators.
Technical Specifications
- Supported Inputs: Polyhedral Dice (D4, D6, D8, D10, D12, D20, D100), Dice Pools (Up to 20 dice per die type), Arithmetic Modifiers (+/- 999)
- Input Limit: Unlimited client-side dice combinations
- Processing Engine: 100% In-Browser (Web Crypto API CSPRNG & Web Audio Clatter Synth)
- Content Uploads: None (Your files and text are processed locally on your device with zero uploads)
Privacy & Security Guarantee
Your Discrete polyhedral dice roll outcomes are processed entirely in your web browser's memory using native client-side web technologies. Unlike traditional cloud tools, your content is never uploaded to remote servers, stored on external disks, or analyzed by third parties.
2ClickKit In-Browser vs Traditional Cloud Tools
| Feature | 2ClickKit (In-Browser) | Traditional Cloud Services |
|---|---|---|
| Data Privacy | Files never leave your local device | Uploaded to remote servers and third-party clouds |
| Processing Speed | Instant local execution (0ms upload time) | Constrained by internet upload & server processing queues |
| Account & Costs | 100% Free with zero registration or paywalls | Tiered subscriptions, limits, or forced sign-ups |
Best Practices & Tips
- Click directly on any die icon in the top header row to instantly fire a single quick-roll without configuring pool counts.
- When rolling Fireball or high-level spells, use the 8d6 preset or dial custom counts up to 20 dice simultaneously.
- Check the Roll History log to verify previous rolls, critical successes, or contested ability checks with your Dungeon Master.
- Observe the theoretical Average (Expected Value) metric before choosing risky high-modifier DC checks.
Frequently Asked Questions
How does the dice roller eliminate modulo bias?
Many basic software dice rollers compute 'Math.random() % sides', which introduces modulo bias because 2^32 is not evenly divisible by 6, 8, 10, 12, or 20. Our dice roller uses rejection sampling on 32-bit unsigned integers from window.crypto.getRandomValues, guaranteeing perfectly uniform probability for every face.
How does Advantage and Disadvantage work in D&D 5e?
When rolling with Advantage, you roll two d20s and take the higher value. With Disadvantage, you roll two d20s and take the lower value. In our tool, both dice are rolled and displayed, with the discarded die clearly shown in strikethrough.
What is the mathematical benefit of Advantage on a d20 roll?
Advantage raises your average d20 roll from 10.5 to 13.825 (an effective bonus of roughly +3.32). It also increases your chance of rolling a Critical Hit (natural 20) from 5.0% to 9.75%, while slashing your chance of a Critical Failure (natural 1) from 5.0% down to 0.25%.
Why does rolling 3d6 produce different results than rolling 1d18?
Rolling 1d18 produces a flat uniform distribution where every number from 1 to 18 has an identical 5.56% chance. In contrast, rolling 3d6 produces a bell-curve (binomial/normal distribution) centered around 10.5. Values near the middle (10 and 11) occur 12.5% of the time, while extreme totals (3 and 18) occur only 0.46% of the time.
Can I roll character ability scores using '4d6 Drop Lowest'?
Yes! Use the '4d6 Drop Lowest' preset or toggle 'Drop Lowest' mode with 4 D6 dice. The tool automatically isolates the single lowest die, discards it from the total sum, and tallies the remaining 3 dice.
Does this dice roller require an internet connection?
No. Once loaded, the dice roller executes 100% inside your browser using local Web Crypto APIs and Web Audio sound synthesis. You can disconnect your network and continue rolling without interruption.
What polyhedral shapes correspond to standard tabletop RPG dice?
D4 is a tetrahedron (4 faces), D6 is a cube (6 faces), D8 is an octahedron (8 faces), D10 is a pentagonal trapezohedron (10 faces), D12 is a regular dodecahedron (12 faces), and D20 is a regular icosahedron (20 faces). Except for D10, all are classic Platonic solids.