🎲 Dice Roller
Roll any dice online — d4, d6, d8, d10, d12, d20, d100 or custom. Animated rolls, history & stats.
What Is a Dice Roller?
A dice roller is a virtual random number generator that simulates physical dice. Unlike a simple random number tool, a dice roller mirrors the actual probability distribution of real dice — each face of a fair d6 has exactly a 1-in-6 (16.67%) chance, a d20 gives each face a 1-in-20 (5%) chance, and so on. This makes it suitable for board games, tabletop RPGs, probability education, and any situation where physical dice aren't available.
This roller supports seven standard dice types (d4, d6, d8, d10, d12, d20, d100) plus any custom number of sides from 2 to 1,000. You can roll 1 to 20 dice simultaneously, apply a modifier (positive or negative), and track your session history and running statistics — all with animated 3D-style rolls.
How to Use This Dice Roller
- Select a die type — click d4, d6, d8, d10, d12, d20, d% (d100), or Custom for non-standard sides
- Set number of dice — use the − / + buttons to roll 1–20 dice at once
- Add a modifier — enter a positive or negative number that gets added to the total (common in D&D: e.g., +3 Strength modifier)
- Press ROLL! — dice animate, then show individual values and a running total
- Track stats — session roll count, average, and highest roll update automatically; history shows the last 20 rolls
Dice Types — d4 to d100
Standard tabletop dice map to the five Platonic solids plus two additional shapes. Each die's average (expected value) is simply (min + max) / 2, and every face has equal probability:
| Die | Shape | Range | Average | P(any face) | Common Use |
|---|---|---|---|---|---|
| d4 | Tetrahedron | 1–4 | 2.5 | 25.00% | D&D low damage, daggers |
| d6 | Cube | 1–6 | 3.5 | 16.67% | Board games, most common die |
| d8 | Octahedron | 1–8 | 4.5 | 12.50% | D&D weapon damage (longsword) |
| d10 | Pentagonal trapezohedron | 1–10 | 5.5 | 10.00% | Percentile dice (d%), hit points |
| d12 | Dodecahedron | 1–12 | 6.5 | 8.33% | D&D barbarian rage, greataxe |
| d20 | Icosahedron | 1–20 | 10.5 | 5.00% | D&D attack rolls, skill checks |
| d100 | Zocchihedron | 1–100 | 50.5 | 1.00% | Percentile rolls, wild magic |
Source: Platonic Solid Dice — Mathematical Reference | D&D Beyond — Dice and Ability Scores
Dice Probability Explained
Every face of a fair die has equal probability — that's what makes it fair. The probability of rolling any specific face is 1 ÷ number of sides. Rolling a 6 on a d6: 1/6 = 16.67%. Rolling a 20 on a d20: 1/20 = 5.00%. The general formula:
2d6 Sum Probability — Why 7 Comes Up Most Often
Rolling two d6 doesn't produce a uniform distribution — there's only one way to roll a 2 (1+1) but six ways to roll a 7 (1+6, 2+5, 3+4, 4+3, 5+2, 6+1). The total number of combinations is 6×6 = 36, and each has equal probability (1/36 = 2.78%). Here's the full breakdown:
| Sum | Ways to Roll | Combinations | Probability |
|---|---|---|---|
| 2 | 1 | 1+1 | 2.78% |
| 3 | 2 | 1+2, 2+1 | 5.56% |
| 4 | 3 | 1+3, 2+2, 3+1 | 8.33% |
| 5 | 4 | 1+4, 2+3, 3+2, 4+1 | 11.11% |
| 6 | 5 | 1+5, 2+4, 3+3, 4+2, 5+1 | 13.89% |
| 7 | 6 | 1+6, 2+5, 3+4, 4+3, 5+2, 6+1 | 16.67% |
| 8 | 5 | 2+6, 3+5, 4+4, 5+3, 6+2 | 13.89% |
| 9 | 4 | 3+6, 4+5, 5+4, 6+3 | 11.11% |
| 10 | 3 | 4+6, 5+5, 6+4 | 8.33% |
| 11 | 2 | 5+6, 6+5 | 5.56% |
| 12 | 1 | 6+6 | 2.78% |
This bell-curve shape is why board games like Monopoly, Settlers of Catan, and Backgammon use 2d6 — it makes middle numbers far more likely than extremes, creating more predictable and strategically interesting gameplay than a single d12 would. A 1d12 gives every sum from 1–12 an equal 8.33% chance; 2d6 gives 7 a 16.67% chance and 2 or 12 only 2.78% each, even though both average out to 7.
Dice in D&D and Tabletop RPGs
Dungeons & Dragons uses the full polyhedral set — d4, d6, d8, d10, d12, and d20 — with the d20 being the resolution mechanic for nearly everything. An attack roll: roll 1d20, add your attack bonus, compare to the target's AC (Armor Class). A roll of 20 is always a critical hit (natural 20); a roll of 1 is always a miss (natural 1), regardless of modifiers. Reference: D&D Beyond Official Rules
1d20+5 — attack roll with +5 bonus
2d6+3 — longsword damage with +3 Strength modifier
4d6 drop lowest — standard ability score generation
1d8+4 — healing spell or weapon damage
2d10 — heavy crossbow or some spell damage
The Math Behind "Random" Dice Rolls
Physical dice generate randomness through physics — tiny variations in throw angle, spin, bounce, and air resistance make the outcome effectively unpredictable. This roller uses JavaScript's Math.random() function, which generates a pseudo-random number between 0 and 1 using an algorithm (typically xorshift128+ in modern browsers). The conversion to a die face: Math.floor(Math.random() × sides) + 1 gives equal probability to each face.
Pseudo-random doesn't mean predictable in practice — the algorithm's state has enough complexity that patterns don't emerge over hundreds or thousands of rolls. For cryptographically secure randomness (gambling, security applications), dedicated hardware random number generators or window.crypto.getRandomValues() are used instead. For games and probability learning, Math.random() is entirely appropriate.
5 Tips for Using Dice in Games
- Roll multiple dice to smooth out randomness. Rolling 3d6 for a stat gives values between 3 and 18, but they cluster heavily around 9–12 because of the bell curve. A single d20 gives every number equal weight. More dice = more predictable average outcomes. The average of 4d6 = 14.0, but the individual rolls range from 4 to 24.
- Know your natural 20 odds before house-ruling crits. On a d20, a natural 20 comes up 5.00% of the time — once every 20 rolls on average. In a session with 40 attack rolls, you'd expect about 2 crits. House rules that expand the crit range (e.g., "crit on 19–20") double that to 10.00%, which changes combat balance. Know the math before changing the rules.
- Use 2d6 instead of 1d12 when you want middle-weighted results. Both have the same min/max range (2–12 for 2d6, 1–12 for 1d12) and similar averages (7.0 vs 6.5), but 2d6 gives a 16.67% chance of rolling 7 versus 1d12's flat 8.33% per face. For encounter tables or random events where you want middle outcomes to be more common, 2d6 is the better design choice.
- Track your session rolls to verify fairness over time. This roller's session stats show your count, average, and high score. After 50+ rolls, your average should approach the theoretical expected value — 3.5 for d6, 10.5 for d20. If your 50-roll average is 4.8 on a d6, that's within normal variance (±1.7 standard deviation); if it's 6.0 after 100 rolls, something is off.
- Modifiers shift the distribution, not the range of random outcomes. A d20+5 roll still has a 5% chance of each raw face (1–20), but the effective result range becomes 6–25. The modifier doesn't change which face the die lands on — it adds a fixed offset to every outcome. A +5 modifier makes an "average" d20 roll produce 15.5 (10.5 + 5) instead of 10.5, but the randomness and spread stay exactly the same.