RPG Dice Roller — d20, Advantage, Modifiers
Quick Answer
A d20 (20-sided die) is the core die of Dungeons & Dragons and many tabletop RPGs, producing a uniform random integer from 1 to 20. Rolling with advantage means rolling two d20s and keeping the higher result, a core mechanic in D&D 5th Edition.
Also searched as: dnd dice roller, d20 online, 2d6 roller, tabletop rpg dice
Last Roll
—
History
How RPG Dice Rollers Work
An RPG dice roller simulates the polyhedral dice used in tabletop role-playing games, returning uniform random integers from 1 to the number of faces for each die rolled. The standard set covers d4, d6, d8, d10, d12, d20, and d100, with the d20 as the central die of most modern RPG systems. This roller uses crypto.getRandomValues with rejection sampling to eliminate modulo bias, so every face has exactly the theoretical probability. The rejection sampling step is important: a naive implementation like Math.floor(Math.random() * 20) + 1 is very close to uniform but can be slightly biased on some platforms, while our method guarantees exact fairness. The core dice rules used here follow the Open Game License SRD for Dungeons & Dragons 5th Edition, the most popular tabletop RPG. For more random tools see our flip a coin tool and random number generator.
The Dice Notation Syntax
Dice notation is a compact format that describes a random roll as NdS+M, where N is the number of dice to roll, S is the number of sides on each die, and M is the flat modifier added to the sum. Reading left to right, 3d6+2 means roll three six-sided dice, sum the results, and add 2; the range is a minimum of 5 (three 1s plus 2) and a maximum of 20 (three 6s plus 2), with an average of 12.5 because 3 times 3.5 plus 2 equals 12.5. The expected value of a single dS die is (S+1)/2, so a d20 averages 10.5 and a d100 averages 50.5. A worked example: the Fireball spell in D&D 5th Edition deals 8d6 damage, which has an expected value of 8 times 3.5 = 28 and a range of 8 to 48, and at 5th level it hits every creature in a 20-foot-radius sphere. This same notation appears in video games, random-generation scripts, and mathematical probability exercises worldwide.
Key Terms You Should Know
Polyhedral dice: the seven standard shapes (d4 tetrahedron, d6 cube, d8 octahedron, d10 pentagonal trapezohedron, d12 dodecahedron, d20 icosahedron, d100 percentile pair) used in tabletop RPGs. Natural roll: the raw result on the die before modifiers; a natural 20 on a d20 is the best possible pre-modifier result. Modifier: a flat number added to or subtracted from the roll, typically reflecting a character's ability score. Check / save / attack: three types of d20 rolls in D&D, each comparing (roll + modifier) against a target number. Advantage / disadvantage: roll two d20s and keep the higher (advantage) or lower (disadvantage). Critical hit: a natural 20 on an attack roll that doubles the damage dice. DC: Difficulty Class, the target number a check or save must meet or exceed to succeed. Exploding dice: an optional rule where rolling the maximum value allows another roll of the same die added to the total; used in systems like Savage Worlds.
D&D Dice Reference Data
The table below shows the expected value, range, and common uses for each polyhedral die in D&D 5th Edition. These numbers come directly from the Player's Handbook and are the foundation of damage balance across the game's hundreds of weapons and spells. Note that weapon damage dice scale with damage type, not size; a d12 greataxe averages the same damage as 2d6 (both 6.5), but the 2d6 distribution is more consistent and narrower, which is why many optimizers pick the greatsword over the greataxe.
| Die | Range | Average | Common use |
|---|---|---|---|
| d4 | 1-4 | 2.5 | Dagger, dart, sling |
| d6 | 1-6 | 3.5 | Shortsword, scimitar, d20 skill dice |
| d8 | 1-8 | 4.5 | Longsword, warhammer, 1st-level spells |
| d10 | 1-10 | 5.5 | Halberd, heavy crossbow, tens digit of d100 |
| d12 | 1-12 | 6.5 | Greataxe, Barbarian hit die |
| d20 | 1-20 | 10.5 | Attacks, saves, ability checks |
| d100 | 1-100 | 50.5 | Percentile rolls, wild magic surge |
Practical Examples
Example 1 — A D&D attack roll: Your 5th-level Fighter swings a longsword at a Goblin. The character has a +5 Strength modifier and +3 proficiency bonus, giving +8 to hit. Enter 1d20+8 in the notation field and click Roll; if the result meets or beats the Goblin's AC of 15, the attack hits. On a natural 20, the hit is a critical, and the damage roll is 2d8+5 instead of 1d8+5. Example 2 — Rolling Fireball damage: Enter 8d6 and roll. The result will be between 8 and 48, averaging 28. At level 5, this spell slot can be upgraded to 9d6, increasing the average to 31.5. Example 3 — Advantage on a stealth check: Your Rogue has Expertise in Stealth and a +10 total modifier. Select Advantage and enter 1d20+10. The tool rolls two d20s, keeps the higher, and adds 10, giving you an expected result near 23.8 (13.83 raw average plus 10), which clears nearly any skill challenge in the Dungeon Master's Guide.
Tips and Best Practices
Use dice notation for complex rolls: typing 2d6+3 is faster than clicking the d6 button twice and adding 3 mentally. Remember the natural result: critical hits depend on the raw d20 result, not the modified total. Apply advantage correctly: advantage and disadvantage cancel one-for-many; if you have two sources of advantage and one of disadvantage, you simply roll normally, per PHB page 173. Do not double flat modifiers on crits: in D&D 5e, a critical hit doubles the damage dice only, not the +STR or +DEX modifier. Track the longest streak: the dice do not remember prior rolls; a string of low results is never overdue to change, per the law of independent events. Use d100 for loot tables: the 100-percent granularity of a percentile roll is ideal for random-encounter and treasure tables in the Dungeon Master's Guide. Keep a roll log: this tool's history section records every roll so you can reference and verify results during a session.
Frequently Asked Questions
What is a d20?
A d20 is a twenty-sided die, a regular icosahedron with faces numbered 1 through 20. It is the core die of Dungeons & Dragons and most other tabletop role-playing games, including Pathfinder and Call of Cthulhu. When rolled, each face has a 1 in 20 (5 percent) chance of coming up, producing a uniform distribution from 1 to 20. Rolling a natural 20 on an attack roll is a critical hit in D&D 5th Edition, and rolling a natural 1 is a critical miss. The d20 was introduced in the original 1974 Dungeons & Dragons rulebook by Gary Gygax and Dave Arneson.
How does advantage work in D&D?
Advantage in Dungeons & Dragons 5th Edition means rolling two d20s and keeping the higher result. This shifts the expected roll from 10.5 to about 13.83, a roughly 3.3 point improvement, and nearly doubles the chance of rolling a 20 from 5 percent to 9.75 percent. Disadvantage is the opposite: roll two d20s and keep the lower. Advantage is granted by situational factors like attacking a prone target from melee or having the Help action used on you. Advantage and disadvantage cancel each other out, regardless of how many sources apply, per the Player's Handbook page 173.
What dice notation like 2d6+3 mean?
The string 2d6+3 is standard dice notation that reads as roll two six-sided dice, sum the results, and add 3. The first number is the quantity, the d is the separator, the second number is the die size, and the trailing modifier is added to the total. A greatsword in D&D 5th Edition deals 2d6+STR damage, which ranges from a minimum of 5 (both dice show 1, Strength +3) to a maximum of 15 (both dice show 6, Strength +3), with an average of 10. This notation was popularized by tabletop RPGs in the 1970s and is now the universal format for probabilistic game systems.
What is the probability of rolling a critical hit?
A critical hit on a standard d20 attack roll happens on a natural 20, which has a 1 in 20 or 5 percent probability per roll. Certain classes and items improve these odds: the Champion Fighter scores a crit on 19-20 starting at level 3 (10 percent), and on 18-20 starting at level 15 (15 percent), per the Player's Handbook. With advantage, the chance of rolling at least one natural 20 rises to 9.75 percent because 1 minus (19/20 squared) equals 0.0975. In D&D 5th Edition a critical hit doubles the damage dice rolled, while the 2024 revised rules apply it only to monster attacks and players retain the doubled-dice rule.
How do I roll percentile dice (d100)?
A d100 or percentile roll is produced by rolling two ten-sided dice where one represents the tens digit and the other the ones digit. Specialized percentile dice sets come with one die marked 00, 10, 20, through 90 and another marked 0 through 9; reading them together gives a number from 1 to 100, where 00 plus 0 is read as 100. This die is used for random encounters, loot tables, and skill checks in Call of Cthulhu and earlier D&D editions. Each outcome has exactly a 1 in 100 probability, making it ideal for fine-grained probability tables.
Are virtual dice really fair?
Yes, when implemented correctly. This roller uses crypto.getRandomValues, the cryptographically secure random source defined by the W3C Web Crypto API, which draws entropy from operating-system sources that pass NIST SP 800-22 statistical tests. To avoid modulo bias (a subtle flaw where rand() mod N favors small numbers), the code rejects values that would wrap around the target range and re-rolls, a technique called rejection sampling. Across thousands of rolls, each face of each die appears with its theoretical frequency to within normal statistical variation. Roll20 and other major virtual tabletop tools use the same approach.