What is a D4 Dice Roller?
A D4 is a four-sided die — the classic tetrahedron used in tabletop role-playing games like Dungeons & Dragons. This calculator simulates rolling any number of D4 dice at once, sums the results, and applies an optional modifier so you can resolve attacks, damage, and skill checks without searching for physical dice.
How to use it
Enter how many D4 dice you want to roll (1 to 100) and an optional modifier that is added to the combined total. Modifiers can be negative — for example a penalty of -2. Submit the form and you will see the grand total, the sum of the dice alone, the individual roll values, and the average per die.
The formula explained
Each die is generated with floor(random() × 4) + 1, which maps a uniform random number in [0,1) onto the integers 1, 2, 3, and 4 with equal probability. The dice are added together and the modifier is added once to the running total:
Worked example
Suppose you roll 5d4+3 and the dice come up 2, 4, 1, 3, 2. The sum of the dice is \(2+4+1+3+2 = 12\). Adding the +3 modifier gives a total of \(15\). The average per die for this roll is \(12 \div 5 = 2.4\). (The long-run theoretical average of a single D4 is \(2.5\).)
D4 Roll Ranges and Averages by Number of Dice
Each four-sided die (D4) lands on 1, 2, 3 or 4 with equal probability, so one die averages \(\frac{1+2+3+4}{4} = 2.5\). For \(n\) dice, the minimum total is \(n\), the maximum is \(4n\), and the expected average is \(2.5n\). The number of distinct totals you can roll is \(3n+1\), and the number of equally likely ordered outcomes is \(4^n\).
| Dice | Minimum (n) | Maximum (4n) | Expected average (2.5n) | Distinct totals (3n+1) | Ordered outcomes (4n) |
|---|---|---|---|---|---|
| 1d4 | 1 | 4 | 2.5 | 4 | 4 |
| 2d4 | 2 | 8 | 5 | 7 | 16 |
| 3d4 | 3 | 12 | 7.5 | 10 | 64 |
| 4d4 | 4 | 16 | 10 | 13 | 256 |
| 5d4 | 5 | 20 | 12.5 | 16 | 1,024 |
| 6d4 | 6 | 24 | 15 | 19 | 4,096 |
| 8d4 | 8 | 32 | 20 | 25 | 65,536 |
| 10d4 | 10 | 40 | 25 | 31 | 1,048,576 |
Effect of a modifier: a modifier is added once to the total, so it shifts the minimum, maximum and average by the same amount. The spread stays the same. For example, 3d4 + 2 has a range of 5 to 14 and an average of 7.5 + 2 = 9.5. A negative modifier shifts everything down, so 3d4 − 2 ranges from 1 to 10 with an average of 5.5.
The average is a long-run value. Any single roll can land anywhere between the minimum and maximum. With two or more dice, totals near the average are more likely than totals at the extremes.
FAQ
Are the rolls truly random? They use the platform's pseudo-random generator, which is fair for games and casual use.
What is the average of a D4? The expected value of one fair D4 is \((1+2+3+4)/4 = 2.5\).
Can the modifier be negative? Yes — enter a negative number to apply a penalty, e.g. -2.