User Rating 0.0 โ˜…โ˜…โ˜…โ˜…โ˜…
Total Usage 0 times
Press Roll or R to begin
Session Statistics
Total Rolls 0
Mean
Std Dev
Min / Max
Mode
χ² (uniformity)
Roll History
Press R to roll
Is this tool helpful?

Your feedback helps us improve.

โ˜… โ˜… โ˜… โ˜… โ˜…

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.

d4 dice roller 4-sided dice dice calculator d4 simulator tabletop dice RPG dice roller random number generator tetrahedron dice

Formulas

Each d4 produces a discrete uniform random variable X โˆˆ {1, 2, 3, 4} with probability mass function:

P(X = k) = 14 for k โˆˆ {1, 2, 3, 4}

For n dice rolled, the total S is the sum:

S = nโˆ‘i=1 Xi + m

The expected value and variance of a single d4:

E[X] = 1 + 42 = 2.5
Var(X) = 42 โˆ’ 112 = 1.25

For n dice with modifier m:

E[S] = 2.5n + m
ฯƒ = โˆš1.25n

The chi-squared statistic for uniformity testing:

ฯ‡2 = 4โˆ‘k=1 (Ok โˆ’ Ek)2Ek

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 d4Min TotalMax TotalExpected MeanStd. DeviationPossible OutcomesCommon RPG Use
1d4142.501.1184Dagger damage, Minor healing
2d4285.001.58116Magic Missile (2 darts)
3d43127.501.93664Magic Missile (3 darts)
4d441610.002.2362564d4 poison damage
5d452012.502.5001024High-level spell components
6d462415.002.7394096Ability score generation (variant)
7d472817.502.95816384Homebrew heavy weapons
8d483220.003.16265536Mass damage spells
9d493622.503.354262144Epic-level effects
10d4104025.003.5361048576Maximum stacking scenario
Expected Mean = n ร— 2.5 | ฯƒ = โˆšn ร— 1.25

Frequently Asked Questions

The roller uses crypto.getRandomValues() which provides a 32-bit unsigned integer (0 to 4,294,967,295). Since 4 divides evenly into 4,294,967,296, mapping via modulo 4 produces zero bias for d4 specifically. For safety, the implementation still uses rejection sampling: values above the largest multiple of 4 below 2^32 are discarded and re-sampled. This guarantees each face has exactly 25% probability regardless of the underlying integer range.
The expected standard error for a proportion after n single-die observations is โˆš(p(1โˆ’p)/n). At n = 20, this equals โˆš(0.25 ร— 0.75 / 20) โ‰ˆ 0.0968, meaning ยฑ9.7 percentage points of deviation is within one standard deviation. You need approximately 400+ single-die observations for the 95% confidence interval to narrow below ยฑ2 percentage points per face. The chi-squared statistic displayed in the statistics panel quantifies this: values below 7.815 (critical value at ฮฑ = 0.05, df = 3) indicate no evidence of non-uniformity.
The modifier m is added once to the total sum, not per die. Rolling 3d4+2 means rolling three d4 dice, summing the individual results, then adding 2. This matches the D&D 5e and Pathfinder 2e convention. The minimum result becomes n + m (e.g., 3 + 2 = 5) and maximum becomes 4n + m (e.g., 12 + 2 = 14). Negative modifiers are supported; if the total drops below 1, the tool displays the raw negative total rather than clamping, as some systems (e.g., damage reduction) permit zero or negative totals.
A single d4 has a flat (uniform) distribution. Summing 2d4 produces a triangular distribution peaking at 5. As the number of dice increases, the Central Limit Theorem applies: the distribution of the sum approaches a normal (Gaussian) curve centered at 2.5n with standard deviation โˆš(1.25n). By 4d4, the distribution is visibly bell-shaped. The histogram in the statistics panel visualizes this convergence in real-time from your roll data.
The chi-squared goodness-of-fit test compares observed face frequencies against the expected uniform frequencies. With 3 degrees of freedom (4 faces minus 1), the critical value at the 5% significance level is 7.815. If the displayed ฯ‡ยฒ exceeds this, there is statistically significant evidence of non-uniformity at p < 0.05. However, this tool uses cryptographic randomness, so persistent high ฯ‡ยฒ values would indicate a browser crypto implementation defect rather than a loaded die. At minimum, collect 100+ individual die observations before interpreting the statistic.
The d4 (tetrahedron) is the only standard polyhedral die that always lands on a face rather than showing a face upward. Two numbering conventions exist: vertex-read (the number at the apex visible from above) and base-read (the number printed along the base edges of the landing face). Most modern d4 dice use the vertex-read system. This tool abstracts away the physical reading ambiguity by generating the integer directly. The 3D animation uses the vertex-read convention for visual consistency.