Skip to main content

Online Calculator Lab

🎲 Dice Roller

Roll any dice online — d4, d6, d8, d10, d12, d20, d100 or custom. Animated rolls, history & stats.

Number of Dice
1
Modifier (+/−)
Press Roll to throw the dice

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

  1. Select a die type — click d4, d6, d8, d10, d12, d20, d% (d100), or Custom for non-standard sides
  2. Set number of dice — use the − / + buttons to roll 1–20 dice at once
  3. Add a modifier — enter a positive or negative number that gets added to the total (common in D&D: e.g., +3 Strength modifier)
  4. Press ROLL! — dice animate, then show individual values and a running total
  5. Track stats — session roll count, average, and highest roll update automatically; history shows the last 20 rolls
🎲 D&D quick rolls: For a standard ability score roll, select d20, set count to 1, and enter your modifier. For damage rolls like "2d6+3", select d6, set count to 2, enter +3 as modifier, and roll.

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:

DieShapeRangeAverageP(any face)Common Use
d4Tetrahedron1–42.525.00%D&D low damage, daggers
d6Cube1–63.516.67%Board games, most common die
d8Octahedron1–84.512.50%D&D weapon damage (longsword)
d10Pentagonal trapezohedron1–105.510.00%Percentile dice (d%), hit points
d12Dodecahedron1–126.58.33%D&D barbarian rage, greataxe
d20Icosahedron1–2010.55.00%D&D attack rolls, skill checks
d100Zocchihedron1–10050.51.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:

P(specific face) = 1 ÷ n where n = number of sides Expected value E(X) = (1 + n) ÷ 2 Standard deviation σ = √((n² − 1) ÷ 12) Examples: d6: E(X) = (1+6)/2 = 3.5 σ = √(35/12) = 1.7078 d20: E(X) = (1+20)/2 = 10.5 σ = √(399/12) = 5.7663 Probability of rolling AT LEAST X on a d20: ≥ 10: 11/20 = 55.0% ≥ 15: 6/20 = 30.0% ≥ 18: 3/20 = 15.0% ≥ 20: 1/20 = 5.0% (natural 20 — critical hit!)

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:

SumWays to RollCombinationsProbability
211+12.78%
321+2, 2+15.56%
431+3, 2+2, 3+18.33%
541+4, 2+3, 3+2, 4+111.11%
651+5, 2+4, 3+3, 4+2, 5+113.89%
761+6, 2+5, 3+4, 4+3, 5+2, 6+116.67%
852+6, 3+5, 4+4, 5+3, 6+213.89%
943+6, 4+5, 5+4, 6+311.11%
1034+6, 5+5, 6+48.33%
1125+6, 6+55.56%
1216+62.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

🐉 Common D&D dice expressions:
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.

Frequently Asked Questions — Dice Roller

It uses JavaScript's Math.random(), which is a pseudo-random number generator. In practice, the results are statistically indistinguishable from true randomness for games and probability learning — you won't see repeating patterns over hundreds of rolls. The distribution is uniform across all faces, meaning each face of a d6 appears roughly 1 in 6 times over a large sample. For cryptographic or gambling applications, a hardware random number generator would be used instead, but for tabletop games and fun, this is entirely appropriate.
A natural 20 (often called a "nat 20") is when the d20 shows 20 before any modifiers are added. In D&D 5th Edition, it's an automatic critical hit on attack rolls — you deal double dice damage. It also always succeeds on death saving throws. The odds are exactly 1/20 = 5%, so on average you'll get one critical hit every 20 attack rolls. This roller highlights nat 20s in gold and nat 1s (automatic fumbles) in red so they're immediately obvious.
Because there are 6 different ways to make 7 with two dice (1+6, 2+5, 3+4, 4+3, 5+2, 6+1) out of 36 total combinations — a 6/36 = 16.67% probability. By comparison, 2 and 12 each have only one combination (1+1 and 6+6), giving them just 1/36 = 2.78% each. This bell-curve distribution is intentional in games — Monopoly, Catan, and Backgammon all use 2d6 precisely because 7 is most likely, creating strategic depth that a flat random number wouldn't provide.
Yes — click the "Custom" button and enter any number from 2 to 1,000. A d3 is handy for certain RPG damage rolls; a d2 is essentially a coin flip (heads/tails). Physical dice with odd numbers of sides do exist (d3, d5, d7), but they're uncommon — virtual rollers handle them just as easily as standard dice. The probability math is identical: 1/n for each face, expected value = (1+n)/2.
For multiple dice, expected value scales linearly: E(Nd) = N × (1+d)/2. Rolling 3d6: E = 3 × 3.5 = 10.5. Standard deviation of 2d6 = √(2×35/12) = 2.4152. Rolling 2d20: E = 2 × 10.5 = 21. The standard deviation also scales, but not linearly — it goes as √N × single-die σ. So 4d6 has σ = 2 × 1.7078 = 3.4157, meaning most rolls fall within about 3.4 of the average of 14.0. The more dice you add, the tighter the distribution clusters around the expected value.
A d100 (d%) generates a number from 1 to 100, each with 1% probability. Physically, it's rolled using two d10s — one represents the tens digit (00, 10, 20…90) and one the units digit (0–9), where 00+0 = 100. Used in RPGs for random tables, wild magic surges, and any situation where a percentage chance is needed. This roller handles it as a single digital roll for convenience. Average = 50.5.