Beginner

Dice Roller (NdM)

Roll N dice of M sides (the classic NdM notation), add an optional modifier, and see every die plus the grand total.
How many dice to roll

Sides per die (M)

Pick the die type
Added to the final total
Total roll
11

Expected average: 10.5

Dice sum
11
Modifier
+0
Mean per die
3.5
Notation
3d6
34.96.88.610.512.414.316.118Your roll vs the full possible range (min to max)
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

A dice roller simulates rolling N dice of M sides each (NdM notation) plus an optional modifier. Each die is a uniform random integer from 1 to M; the total is their sum plus the modifier. The expected average total equals N times (M + 1) divided by 2, plus the modifier.

Formula
Total = sum(1..N of randint(1, M)) + modifier; Expected total = N × (M + 1) / 2 + modifier
How this is calculated

Enter the number of dice N, choose the die type M (the number of sides), and optionally add a modifier that is applied once to the final total. This matches the common tabletop notation NdM+K, such as 3d6+2 for three six-sided dice plus two.

Each die is rolled independently and uniformly: its value is 1 + floor(random × M), giving a whole number between 1 and M with equal probability. The dice sum is the total of all individual rolls, and the final total adds the modifier. The expected (theoretical mean) total is N × (M + 1) / 2 + modifier, because a fair M-sided die averages (M + 1) / 2.

Results regenerate whenever you change an input, so adjusting N, M, or the modifier produces a fresh set of rolls. All values are whole numbers; N must be at least 1 and M at least 2. The expected average is a long-run mean, so a single roll will usually differ from it.

Frequently asked questions

N is the number of dice and M is the number of sides on each die. For example, 2d20 means rolling two twenty-sided dice. A trailing +K or -K is a modifier added to the total.

They use the browser pseudo-random generator, which is uniform and fine for games and casual use, but it is not cryptographically secure.

A fair M-sided die averages (M + 1) / 2. Multiply by N dice and add the modifier: expected total = N × (M + 1) / 2 + modifier.

Also known as

dice roller
roll dice
ndm dice
d20 roller
virtual dice
random dice
online dice
dice simulator

APA

TG we-Calculate Editorial Team. (2026). Dice Roller (NdM) [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/dice-roller

Chicago

TG we-Calculate Editorial Team. "Dice Roller (NdM)." TG we-Calculate. 2026. https://we-calculate.com/calculator/dice-roller.

IEEE

TG we-Calculate Editorial Team, "Dice Roller (NdM)," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/dice-roller

BibTeX

@misc{wecalculate_dice_roller, title = {Dice Roller (NdM)}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/dice-roller}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?