What it does
Type any dice expression in NdM notation — like 2d6, 4d20 or 3d6+2 — and the tool rolls that combination in your browser. Each die is shown separately so you can see the individual results, along with the sum and the total after any modifier. Press Reroll for a fresh set.
How it works
NdM+K means "roll N dice with M sides each, then add K." The expression is parsed with the pattern NdM optionally followed by +K or −K. The tool accepts 1–100 dice with 2–1000 sides and a modifier between −1000 and +1000 — enough for D&D, most tabletop systems and quick classroom probability demos.
Each die is rolled independently by drawing a uniform whole number in the range 1–M. The randomness comes from crypto.getRandomValues, the browser's cryptographically secure generator, not Math.random. To keep every face equally likely, the code uses rejection sampling: it discards the rare random values that would otherwise bias the result (the "modulo bias") and draws again. The sum is the total of the raw rolls; the total is the sum plus the modifier.
Worked example
Roll 2d6 — 2 six-sided dice with no modifier. Parsing gives count = 2, sides = 6, modifier = 0. Each die lands somewhere between 1 and 6, so the total falls between 2 and 12, with an expected average of 7.
A possible outcome: the first die shows a 4, the second shows a 3 — sum 7, total 7. Your own roll will vary; that's the point. Reload the widget and you will see a different pair almost every time.
Common uses
- D&D and tabletop RPGs. Attack rolls (
1d20+5), damage (2d6+3), fireball damage (8d6) — the notation is standard across every fifth-edition-style game. - Board games with missing dice. When the physical die from the box has gone missing under the sofa, roll
1d6here instead. Also handy for percentile checks in games that use1d100. - Teaching probability. Roll
2d6a few dozen times and watch the sums cluster around 7 — a quick, tangible demonstration of why rolling two dice is nothing like rolling one. - Deciding between options. Two choices?
1d2. Four?1d4. Fair, fast, no coins needed.
Frequently asked
Is this cryptographically random?
Yes. Each roll is drawn from crypto.getRandomValues using rejection sampling to prevent the modulo bias that a naïve random % sides would introduce. The outcomes are unbiased and unpredictable — good enough for a security context, and comfortably better than needed for a game.
How many dice can I roll at once?
Up to 100 dice in a single expression. That covers every practical tabletop combination (8d6 for fireball, 10d10 for a Shadowrun test, and so on) without letting the page grind on runaway inputs.
What's the highest-sided die you support?
Up to d1000. Everything from a coin flip (1d2) through the standard tabletop polyhedra (d4, d6, d8, d10, d12, d20) and the percentile die (1d100) is well within range.
Does the modifier apply once, or to every die?
Once — added to the sum at the end, matching the tabletop convention. 3d6+2 rolls three six-sided dice and adds two to the total, not two to each die.
Can I keep the highest die or drop the lowest?
Not in this first version. NdM+K is deliberately simple so the tool stays predictable. Advantage-style mechanics (4d6 drop the lowest, 2d20 keep the highest) are on the roadmap.
Do you record what I roll?
No. Every roll happens in your browser in JavaScript; nothing is sent to ToolHare or stored between visits.
See how we build and verify our tools.