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\).)
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.