Skip to content
Calculator Collection

Virtual Dice Roller

Roll N dice of any size (d4, d6, d20, etc.) and get the sum. Reproduces the standard tabletop-RPG 'NdX' notation used in D&D, Pathfinder, and probability homework.

Last updated: September 2026

Compare 3 scenarios
Fill in the required fields to see your result.

Compare with similar

About this calculator

In tabletop-RPG shorthand, 'NdX' means 'roll N dice, each with X sides, and add them up'. 1d6 is a single six-sided die (1–6). 2d6 is two of them (2–12, with 7 as the most likely total). 3d6 (3–18) is the classical Dungeons & Dragons stat roll, and 1d20 is the ubiquitous D&D check.

This calculator simulates the roll using the browser's pseudorandom generator: floor(random() × sides) + 1 gives an integer in [1, sides] for each die, and the results are summed. Each recompute yields a fresh roll — the number is not fixed by the inputs.

For serious probability analysis (expected value, variance, min/max), the closed-form results are: E[NdX] = N × (X + 1)/2, Var[NdX] = N × (X² − 1)/12. A 3d6 roll has expected value 10.5 and standard deviation ≈ 2.96, so a total below 5 or above 16 happens in roughly 5% of rolls each.

How to use

Example — a single d20. Set Number of dice = 1, Sides per die = 20. Each recompute returns an integer in [1, 20]; expected value is 10.5, and every value is equally likely with probability 1/20 = 5%. Example — classic 3d6 stat roll. Set Number of dice = 3, Sides per die = 6. Each recompute yields a total in [3, 18]. Expected value = 3 × 3.5 = 10.5; the bell-shape distribution centres there, with 10 or 11 being the most likely single total (each ≈ 12.5%). For the underlying probability tables, cross-check with the probability calculator at /en/calculators/gaming/loot-drop-probability/.

Frequently asked questions

Is this a fair die?

Statistically, yes — each face is equally likely, subject to the quality of JavaScript's Math.random(). That RNG is pseudorandom and not cryptographically secure, but for tabletop and homework use it is more than fair enough: the bias is far below the physical bias of a manufactured die.

Why do my rolls seem 'streaky'?

Independent random events do produce runs. In 100 rolls of 1d6, you should on average see one streak of 4+ identical faces in a row. That is not the RNG breaking; it is what real randomness looks like. Human intuition tends to expect too much regularity.

How do I roll something like 4d6 drop lowest?

That variant (used for D&D ability scores) is not built in. Roll 4d6 here, note the four dice mentally by re-running four separate 1d6 rolls, and drop the smallest. Alternatively, a dedicated D&D stat roller can automate the drop-lowest rule.

What is the expected value and variance for NdX?

Mean = N × (X + 1) / 2. Variance = N × (X² − 1) / 12. Standard deviation is the square root of variance. Example: 2d6 has mean 7, variance 5.83, sd ≈ 2.42, so most rolls land in [4.6, 9.4] — matching the well-known 7-is-most-likely bell.

Related calculators

Sources & references