Dice Roller
Roll d4, d6, d8, d10, d12, d20, d100 or a custom die, up to 100 at once, with a modifier. Type dice notation such as 3d6+2 or 2d20kh1.
01 · Definition
What is a dice roller?
A dice roller simulates throwing dice: for each die it picks a whole number from 1 to the number of sides, with every face equally likely, then adds the dice and any modifier. Dice notation writes a roll as NdS+M, so 3d6+2 means three six-sided dice plus 2.
02 · Overview
How the Dice Roller works
Pick a die from d4 to d100 or set any number of sides from 2 to 1,000, choose 1 to 100 dice and an optional modifier, and roll. Or type dice notation: NdS groups joined with + or -, whole-number modifiers, and kh or kl to keep the highest or lowest dice, as in 2d20kh1+5 or 4d6kh3. Each die is shown (six-sided dice as pips), with dropped dice marked, the sum of the dice, the modifier and the total. Notation that cannot be read gets a specific error. Rolls are unbiased draws from crypto.getRandomValues, and the last 50 rolls are listed in a history kept in the page's memory.
03 · Guide
Probability of each total on 2d6
Two six-sided dice can land in 6 × 6 = 36 equally likely ways. Seven is the most common total because six of those ways add up to it; 2 and 12 have one way each. The table counts the ways for each total by listing all 36 outcomes with a script.
| Total | Ways | Probability |
|---|---|---|
| 2 | 1 | 2.78% |
| 3 | 2 | 5.56% |
| 4 | 3 | 8.33% |
| 5 | 4 | 11.11% |
| 6 | 5 | 13.89% |
| 7 | 6 | 16.67% |
| 8 | 5 | 13.89% |
| 9 | 4 | 11.11% |
| 10 | 3 | 8.33% |
| 11 | 2 | 5.56% |
| 12 | 1 | 2.78% |
04 · Guide
Minimum, maximum and average of common rolls
The average of one die with S sides is (S + 1) / 2, and averages add, so 3d6 averages 3 × 3.5 = 10.5. Keeping the highest or lowest dice changes that. The averages for 4d6kh3, 2d20kh1 and 2d20kl1 below were computed by a script that lists every possible outcome (1,296 for four d6, 400 for two d20) and runs it through the tool's own keep rule.
Rolling two d20 and keeping the higher raises the chance of a 20 from 5% to 9.75% (39 of 400 outcomes) and the chance of 15 or more from 30% to 51% (204 of 400).
| Roll | Min | Max | Average |
|---|---|---|---|
| 1d4 | 1 | 4 | 2.5 |
| 1d6 | 1 | 6 | 3.5 |
| 1d8 | 1 | 8 | 4.5 |
| 1d10 | 1 | 10 | 5.5 |
| 1d12 | 1 | 12 | 6.5 |
| 1d20 | 1 | 20 | 10.5 |
| 1d100 | 1 | 100 | 50.5 |
| 2d6 | 2 | 12 | 7 |
| 3d6 | 3 | 18 | 10.5 |
| 4d6kh3 | 3 | 18 | 12.24 |
| 2d20kh1 | 1 | 20 | 13.825 |
| 2d20kl1 | 1 | 20 | 7.175 |
05 · Use cases
When to use the Dice Roller
- 01
Roll attack, damage and saving throws for a tabletop game
- 02
Replace missing dice for a board game
- 03
Roll 4d6 and keep the highest three for character ability scores
- 04
Pick a number from 1 to N by rolling one custom die with N sides
06 · Examples
Dice Roller examples
3d6+2
ex 013d6+2: [6, 5, 5] + 2 = 18
Three six-sided dice sum to 16, and the modifier brings the total to 18. Possible totals run from 5 to 20.
2d20kh1+5
ex 022d20kh1+5: [18, (4)] + 5 = 23
Two d20, keeping the higher. The 4 in brackets was dropped, so the total is 18 + 5.
4d6kh3
ex 034d6kh3: [6, (1), 3, 2] = 11
Four d6 with the lowest die dropped: 6 + 3 + 2. This is a common way to roll character ability scores.
2d6+1d8-1
ex 042d6+1d8-1: [2, 1] + [4] - 1 = 6
Two groups of different dice and a negative modifier in one roll.
07 · FAQ
Dice: frequently asked questions
Are the rolls really random?
What dice notation is supported?
How do I roll with advantage or disadvantage?
What are the limits?
How is d100 rolled?
Is my roll history saved?
08 · Reference
Specs and further reading
These are the primary sources this tool follows. Where a specification defines the behaviour, we link the specification, not a summary of it.
- Web Cryptography API: the getRandomValues method
W3C. The specification of the browser's source of cryptographically strong random values that every die is drawn from.
- Crypto.getRandomValues()
MDN Web Docs. Usage notes and browser support for the same method.
- Dice notation
Wikipedia. Overview of the NdS+M convention, percentile dice (d%) and the kh / kl keep suffixes. There is no formal standard; this tool implements the subset described on this page.
09 · More
Tools that pair with Dice
Random Number Generator
Generate random integers or decimals between any two numbers, up to 10,000 at a time. Allow or forbid repeats, and add a seed for a repeatable sequence.
Coin Flip
Flip a coin online for heads or tails, or flip up to 10,000 at once and see the counts, percentages, full sequence and longest streak.
Random Name Picker
Paste a list of names, then pick one or more winners at random, shuffle the whole list, or split it into teams. Every draw is unbiased.