What is the D6 Dice Roller?
The 6-Sided Dice (D6) Roller is a virtual dice generator for board games, tabletop RPGs, and probability lessons. It rolls any number of dice, supports custom sides (so you can also roll a D4, D8, D12, D20 and more), and adds an optional modifier to the total — just like the "2d6+3" notation used in many games.
How to use it
Enter how many dice you want to roll, how many sides each die has (6 for a classic D6), and an optional modifier that is added to the final total. Submit to see each individual roll, the sum of the dice, the grand total including the modifier, the minimum and maximum possible outcomes, and the statistically expected average.
The formula explained
Each die is rolled with \( \text{roll} = \lfloor \operatorname{random}() \times \text{sides} \rfloor + 1 \). Because random() returns a number in the range [0, 1), multiplying by the number of sides and flooring gives a uniform integer from 0 to sides−1; adding 1 shifts it to the familiar 1-to-sides range. The grand total is the sum of every die plus the modifier:
$$\text{Total} = \sum_{i=1}^{\text{Dice}} \operatorname{rand}\left(1,\ \text{Sides}\right) + \text{Modifier}$$
The expected average of a fair roll is:
$$\text{Average} = \text{Dice} \cdot \frac{\text{Sides} + 1}{2} + \text{Modifier}$$
Worked example
Rolling 2d6+0: each die ranges from 1 to 6. The minimum possible total is 2 (both show 1), the maximum is 12 (both show 6), and the expected average is:
$$2 \times \frac{6 + 1}{2} = 7$$
A single trial might show rolls of 4 and 3 for a total of 7.
FAQ
Are the rolls truly random? They use a pseudo-random number generator, which is statistically fair and more than adequate for games and demonstrations.
Can I roll dice other than D6? Yes — change the "Sides per die" field to roll a D4, D8, D10, D20, or any die from 2 to 100 sides.
What does the modifier do? It is a fixed number added to (or subtracted from) the total of all dice, matching tabletop notation like "3d6+2".