Dice Roller (d4 to d100, with modifier and history)
Pick the count, sides (4, 6, 8, 10, 12, 20, 100, or custom up to 1000), and modifier. Each roll uses crypto.getRandomValues for unbiased uniform distribution.
How it works
How the rolls are generated
Each die uses crypto.getRandomValues — the browser's cryptographically secure random API, the same primitive that backs HTTPS sessions. We also apply rejection sampling to ensure every face has exactly equal probability, regardless of die size. Naive `random % sides` introduces bias when sides doesn't divide cleanly into 2³².
This means a d100 isn't slightly biased toward 1-36 (which would happen with a poorly-implemented modulo), and a d3 doesn't favor 1 over 2 or 3. The math is identical to physical dice with infinite precision.
TTRPG (Tabletop RPG) notation
Common notation: 'NdS+M' where N is number of dice, S is sides, M is modifier. '2d6+3' means roll 2 six-sided dice and add 3. '1d20+5' is a typical D&D attack roll with +5 modifier from your character's bonus.
Standard die sets: d4 (pyramid), d6 (cube), d8 (octahedron), d10 (pentagonal trapezohedron), d12 (dodecahedron), d20 (icosahedron). d100 is usually rolled as 2d10 (one for tens, one for ones). Use the d100 preset to skip the manual conversion.
Common use cases
D&D / Pathfinder / TTRPGs: d20+5 for attacks, 1d8+3 for damage, 4d6 drop lowest for character generation.
Random selection: pick a winner from N people by rolling a dN. For 7 people, set sides=7. The cryptographic randomness ensures fairness.
Probability lessons: roll many dice and observe the distribution. Sum of multiple dice approaches a normal distribution (central limit theorem).
Decision making: 'should I do X' with a 50/50? Roll d2 (2 sides). Want a weighted decision? Use a d10 and decide thresholds (1-7 = yes, 8-10 = no for 70/30).
Frequently asked questions
›Are the rolls really fair?
Yes. We use crypto.getRandomValues (the secure RNG) plus rejection sampling so every face has exactly equal probability — no edge bias from the modulo operation.
›What's the maximum number of dice?
50 per roll. For more, simply roll multiple times — each is independent.
›What's the maximum sides?
1000. Beyond that the math still works but the use case becomes contrived.
›Can I save my favorite die combinations?
Not yet. We may add saved presets later for your common combat rolls.
›Why is d20 famous?
Dungeons & Dragons popularized it for skill checks and attack rolls. Each face has 5% probability — fine granularity for skill differences without the bookkeeping of a percentile (d100).
›Why does the history only show 10 rolls?
To keep the page tidy. For longer logs, paste each result into a notes file or RPG character sheet.
›Will this replace my physical dice?
Functionally yes, especially for online games. Physical dice are loved for tactility and ritual — but mathematically a digital roll with crypto RNG is at least as fair as a physical d20.
›Does the data leave my browser?
No. Every roll happens locally.
Related tools
Last updated: