Skip to content
TheCalcUniverse

Dice Roller — Free Online Calculator with Step-by-Step Guide

Roll virtual dice from D4 to D20 with modifiers. Uses cryptographically secure random values. Free, instant, and accurate.

✓ Tested formula & cited sources Formula verified 2026-01-15 Runs in your browser — inputs never sent anywhere

See it worked out

Example — Number of Dice 2, Modifier (+/-) 0:

Total

2

Individual Rolls

1, 1

Roll Data

[1,1]

Dice

D4 × 2

Modifier

+0

Average Roll

1.0

The formula

Total = Σ(roll₁, roll₂, …, rollₙ) + modifier

N, S
Dice Count & Sides
M
Modifier
AVG
Average Result

Worked example — Number of Dice 2, Modifier (+/-) 0

Total = 2

Full explanation ↓

How Dice Roller Works

Total = Σ(roll₁, roll₂, …, rollₙ) + modifier

Each die roll is a uniformly distributed random integer between 1 and the number of sides. The total is the sum of all individual rolls, plus any flat modifier (bonus or penalty). Dice notation is commonly written as NdS+M, where N = number of dice, S = sides per die, and M = modifier. For example, 2D6+3 means roll two six-sided dice, sum them, and add 3. The average result is N × (S+1)/2 + M.

N, S
Dice Count & SidesN dice, each with S sides (D4, D6, D8, D10, D12, D20). More dice produce a tighter bell curve around the average.
M
ModifierA flat bonus (positive) or penalty (negative) added to the total after summing all dice. In D&D, this often represents ability score modifiers or proficiency bonuses.
AVG
Average ResultThe expected value: N × (S + 1) / 2 + M. For a single D6, average is 3.5. For 2D6, average is 7. For 2D6+3, average is 10.
Rolling two six-sided dice creates a triangular distribution where 7 is the most likely outcome (1-in-6 chance).

How to Use

  1. Choose how many dice to roll (1 to 10 dice per roll).
  2. Select the die type from the dropdown: D4, D6, D8, D10, D12, or D20.
  3. Optionally add a modifier (e.g., +5 for a proficiency bonus, or -2 for a penalty).
  4. Click calculate to see individual die results, the total sum, and the average expected value.
  5. The dice are displayed visually — pip patterns for D6 and numeric faces for other dice types.

Quick Reference

Dice NotationNdS+M (e.g., 2D6+3)
Expected ValueN × (S+1)/2 + M
D20 Average10.5 per die
D6 Average3.5 per die
2D6 Most Likely7 (probability 1/6)
Advantage Avg~13.82 (vs 10.5 normal)
Disadvantage Avg~7.17 (vs 10.5 normal)
Critical Hit (nat 20)5% per roll (1/20)

Understanding the Result

Dice rolling is fundamental to tabletop role-playing games (TTRPGs) like Dungeons & Dragons, as well as board games, war games, and probability simulations. Each die produces a uniformly distributed random integer. For a fair S-sided die, every face has a 1/S probability of appearing. The sum of multiple dice approximates a normal distribution due to the Central Limit Theorem — the more dice you roll, the more the results cluster around the average in a bell curve shape. The average roll of a single die is (S + 1) / 2, so 2D6 averages 7, and 2D6+3 averages 10. All rolls use crypto.getRandomValues() for cryptographically secure randomness, which is superior to the default Math.random() for gaming applications where fair results matter.

Worked Examples

During a D&D campaign in Chicago, DM Kevin's player attacks with a +1 longsword. The attack roll is 1D20+5 (Strength +3, proficiency +2). The damage is 1D8+3 on a hit. What are the expected values for both rolls?

count = 1 · sides = 20 · modifier = 5

1D20+5 (average: 15.5)

Attack roll expected value: (20+1)/2 + 5 = 10.5 + 5 = 15.5 average. With this modifier, the player hits AC 15 roughly 55% of the time (needs a 10+ on the D20). Damage roll (1D8+3): average (8+1)/2 + 3 = 4.5 + 3 = 7.5 damage per hit. Over a 4-round combat at 55% hit rate, expected total damage is about 16.5 HP.

Yuki is playing a board game in Tokyo where she needs to roll 3D6 to determine her character's attribute scores. She wants to know the most likely outcome and the probability of rolling a 10 or higher.

count = 3 · sides = 6 · modifier = 0

3D6 (average: 10.5)

3D6 range: 3-18. Average: 3 × 3.5 = 10.5. The distribution is a bell curve centered at 10-11. Probability of 10+: approximately 62.5%. Probability of 18 (all sixes): (1/6)³ = 1/216 ≈ 0.46%. This is why many TTRPG character generation systems use 3D6 — it produces reliably average scores with rare extremes.

Carlos is game-mastering a sci-fi TTRPG in Madrid. An enemy sniper fires with disadvantage (roll 2D20, take lowest) and needs a 15 to hit the players' ship. What are the odds?

count = 2 · sides = 20 · modifier = 0

2D20 (average: 21)

With disadvantage, the sniper must roll 15+ on BOTH D20s. Probability of 15+ on one D20 = 30% (6/20). Probability on both = 0.30 × 0.30 = 9%. With advantage, the chance would be 1 − (0.70 × 0.70) = 51%. This illustrates why advantage/disadvantage is mathematically equivalent to roughly ±5 on the roll (the "5e advantage rule of thumb").

Frequently Asked Questions

What does dice notation like "2D6+3" mean?
2D6+3 means "roll two 6-sided dice, sum them together, then add 3 to the total." The number before the D is the count of dice, the number after is how many sides each die has, and anything after + or - is a flat modifier applied to the total. Common D&D examples: 1D20+5 for an attack roll, 2D6 for a greatsword damage, 8D6 for a Level 3 Fireball spell. This notation was popularized by Dungeons & Dragons in 1974 and is now the universal standard for TTRPGs.
Is this randomness truly random?
This calculator uses crypto.getRandomValues(), a cryptographically secure pseudo-random number generator (CSPRNG) available in all modern browsers. It is far better than Math.random() for gaming purposes and is suitable even for security-sensitive applications. While technically still pseudo-random (not quantum-random), it is practically indistinguishable from true randomness for all tabletop gaming and educational probability purposes.
What is a D20 used for?
The D20 (20-sided die) is the primary die used in Dungeons & Dragons 5th Edition for attack rolls, saving throws, and ability checks. A natural 20 (rolling a 20) is traditionally a critical success that automatically hits and often deals double damage. A natural 1 is a critical failure or fumble. Each face has exactly a 5% (1/20) chance of appearing on any given roll. The D20 system creates a flat probability curve where every outcome is equally likely, unlike multi-dice systems.
Why use multiple dice instead of one big die?
Multiple dice produce a bell-curve (normal) distribution where middle values are far more likely than extremes. Rolling 2D6 gives results from 2 to 12, but a 7 is six times more likely than a 2 or a 12 (1/6 vs 1/36). A single die produces a flat (uniform) distribution where every outcome is equally likely. Game designers use bell curves for skill checks where reliable, consistent results are desired, and flat distributions for random tables, loot generation, or critical confirmation where unpredictability adds excitement.
What is advantage and disadvantage in D&D 5e?
Advantage means rolling two D20s and taking the higher result — this significantly increases your chance of success. Disadvantage means rolling two D20s and taking the lower result. With advantage, the chance of rolling a natural 20 increases from 5% to 9.75%, and the average result rises from 10.5 to about 13.82. With disadvantage, the average drops to about 7.17. A common rule of thumb is that advantage/disadvantage is mathematically equivalent to roughly a ±5 modifier for middle-range target numbers, though the exact effect depends on the target DC.
How does the Central Limit Theorem apply to dice?
The Central Limit Theorem (CLT) states that the sum of many independent random variables tends toward a normal (bell curve) distribution, regardless of the individual distributions. For dice: roll 1 die and the distribution is flat (uniform). Roll 2 dice and it becomes triangular. Roll 3+ dice and it rapidly approaches a bell curve. By 10 dice, the result is very close to a normal distribution centered at N × (S+1)/2. This is why casino craps uses 2D6 (the triangular distribution at 7 peaks at 16.67%) and why 3D6 ability score generation produces predictable, balanced characters.

Pro Tips

  • For D&D 5e players: the "take 10" rule for passive checks means assuming a D20 roll of 10. Add your modifier to 10 for your passive score. This is mathematically the average result of a D20 roll (10.5 rounded down).
  • When designing a TTRPG system, use 2D6 or 3D6 for skill checks (bell curve rewards consistent skill) and D20 for combat (flat curve makes every bonus matter equally). The difference in feel is significant — players notice the reliability of bell-curve systems.
  • CSPRNG (crypto.getRandomValues) is mathematically provable to have no detectable patterns, unlike Math.random() which can show subtle biases over millions of rolls. For any human-scale game session, both are fine, but CSPRNG is the gold standard.
  • Expected value quick reference: 1D4=2.5, 1D6=3.5, 1D8=4.5, 1D10=5.5, 1D12=6.5, 1D20=10.5. To find the average of any NdS, multiply N by (S+1)/2 and add the modifier.
  • For D&D DMs balancing encounters: a creatures average damage per round = (average die roll + modifier) multiplied by (chance to hit). Use 1D20+modifier vs AC to calculate hit chance: (21 + modifier - AC) / 20, clamped to 0.05-0.95.

Limitations to Know

  • Supported dice types & unsupported mechanics: Supports 1-10 dice of types D4, D6, D8, D10, D12, and D20. Does not support dice pools with success counting (e.g., Vampire: The Masquerade or Shadowrun systems), exploding dice (where max rolls are re-rolled and added), Fudge/Fate dice (with +/blank/− faces), or keeping highest/lowest N dice (advantage/disadvantage can be simulated by rolling twice).
  • Custom/advanced dice limitations: Does not support custom-sided dice (D3, D100, D30), percentile dice (D%), or dice with faces beyond the standard polyhedral set. The modulo-based mapping from Uint32 values is uniform for all supported die sizes but not for custom prime-sided dice above 32 faces.
  • Randomness technical limitation: Uses crypto.getRandomValues() with modulo-based mapping, which is cryptographically qualified for randomness but not certified for all use cases. The modulo approach is uniformly distributed for supported die sizes (D4, D6, D8, D10, D12, D20) since Uint32 range (2³²) is divisible by all supported side counts.
  • When not to use: Do not use for cryptographic key generation (crypto.getRandomValues is qualified for randomness but key generation has additional requirements), for legal gambling (requires certified hardware RNG in most jurisdictions), or for game systems requiring specialized dice mechanics beyond simple NdS+M.
Was this calculator helpful?
Cite this calculator

TheCalcUniverse. "Dice Roller — Free Online Calculator with Step-by-Step Guide." TheCalcUniverse, 2026, https://thecalcuniverse.com/everyday/dice-roller/. Accessed July 24, 2026.

Embed this calculator on your site

Free to embed. Paste this into any HTML page — it stays up to date automatically.

Open embed ↗

You may also like