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.
Sides per die (M)
Expected average: 10.5
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
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
TG we-Calculate Editorial Team. (2026). Dice Roller (NdM) [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/dice-roller
TG we-Calculate Editorial Team. "Dice Roller (NdM)." TG we-Calculate. 2026. https://we-calculate.com/calculator/dice-roller.
TG we-Calculate Editorial Team, "Dice Roller (NdM)," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/dice-roller
@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?
