4-Sided Dice Roller Calculator
Roll 1-10 four-sided dice (d4) with cryptographic randomness, modifiers, 3D animation, full statistics, and roll history tracking.
About
The four-sided die (d4) is the only Platonic solid die that lacks a top-facing result. Its tetrahedron geometry means the rolled value is read from the vertex or base edge, depending on manufacturer convention. This ambiguity causes frequent misreads at the table. Errors in d4 rolls compound in systems where weapon damage (e.g., daggers deal 1d4) or healing dice stack across multiple rolls. This tool uses the Web Crypto API (crypto.getRandomValues) to produce uniformly distributed integers across [1, 4] with rejection sampling to eliminate modulo bias. Each outcome has an exact probability of 14 = 25%.
The built-in statistics engine tracks frequency distribution and computes a ฯ2 goodness-of-fit statistic so you can verify uniformity over your session. Roll history persists across browser reloads. Note: results approximate a uniform discrete distribution. With fewer than 100 rolls, deviations from 25% per face are expected and do not indicate bias.
Formulas
Each d4 produces a discrete uniform random variable X โ {1, 2, 3, 4} with probability mass function:
For n dice rolled, the total S is the sum:
The expected value and variance of a single d4:
For n dice with modifier m:
The chi-squared statistic for uniformity testing:
Where S = total result, n = number of dice, m = modifier, Xi = result of i-th die, Ok = observed frequency of face k, Ek = expected frequency (total single-die rolls รท 4), ฯ = standard deviation.
Reference Data
| Number of d4 | Min Total | Max Total | Expected Mean | Std. Deviation | Possible Outcomes | Common RPG Use |
|---|---|---|---|---|---|---|
| 1d4 | 1 | 4 | 2.50 | 1.118 | 4 | Dagger damage, Minor healing |
| 2d4 | 2 | 8 | 5.00 | 1.581 | 16 | Magic Missile (2 darts) |
| 3d4 | 3 | 12 | 7.50 | 1.936 | 64 | Magic Missile (3 darts) |
| 4d4 | 4 | 16 | 10.00 | 2.236 | 256 | 4d4 poison damage |
| 5d4 | 5 | 20 | 12.50 | 2.500 | 1024 | High-level spell components |
| 6d4 | 6 | 24 | 15.00 | 2.739 | 4096 | Ability score generation (variant) |
| 7d4 | 7 | 28 | 17.50 | 2.958 | 16384 | Homebrew heavy weapons |
| 8d4 | 8 | 32 | 20.00 | 3.162 | 65536 | Mass damage spells |
| 9d4 | 9 | 36 | 22.50 | 3.354 | 262144 | Epic-level effects |
| 10d4 | 10 | 40 | 25.00 | 3.536 | 1048576 | Maximum stacking scenario |
| Expected Mean = n ร 2.5 | ฯ = โn ร 1.25 | ||||||