Skip to content
EveryFix

Dice Roller

The Dice Roller rolls any number of virtual dice (d4, d6, d8, d10, d12, d20, or d100) with a cryptographically-fair result and a running total. Perfect for board games, tabletop RPGs like D&D, and the classroom when you don’t have physical dice handy. Each roll draws a 32-bit value from the Web Crypto API's crypto.getRandomValues and applies rejection sampling — discarding any value that falls above the largest multiple of the die's side count, then reducing the rest modulo the number of sides — which removes the small bias a naive "value % sides" approach would introduce. If Web Crypto isn't available in the browser, the tool quietly falls back to Math.random() instead. The tumble animation shown while rolling (up to 20 dice, roughly eight refreshes every 70ms) draws genuine additional random rolls purely for visual effect before settling on the one true result that gets reported and totaled.

Beginner10 secondsUpdated 2026-07-09

Roll up to 20 dice (d4, d6, d8, d10, d12, d20, or d100) at once. Every roll is cryptographically fair — a true, unbiased result — perfect for board games, tabletop RPGs, and classroom use. Runs entirely in your browser.

How This Tool Works

Pick your die type (d4 through d100) and how many to roll, then press Roll. Each die shows its value and, when you roll more than one, the total is added up for you.

Formula & Method

Each die uses your browser’s cryptographically-secure random generator with rejection sampling, giving every face an exactly equal probability — a true, unbiased roll.

Example Calculation

Rolling 3d6 might produce 4, 1, 6 for a total of 11, while a single d20 saving throw might land on 17 — each face drawn independently and with exactly equal probability via rejection-sampled crypto.getRandomValues, not a plain modulo of Math.random().

Please note: This calculator provides estimates for general informational purposes only. Results may not be accurate for every situation — use your judgment and consult a relevant professional when it matters.

Frequently Asked Questions

Which dice can I roll?+

The standard polyhedral set — d4, d6, d8, d10, d12, d20 — plus d100, and up to 20 dice at once.

Are the rolls truly random?+

Yes — they use your browser’s secure random generator with rejection sampling, so every face is exactly equally likely with no bias.

Does it total multiple dice?+

Yes — roll several dice and the sum is calculated automatically, which is handy for tabletop games.

Why use crypto.getRandomValues with rejection sampling instead of just Math.random()?+

Taking a random 32-bit integer modulo the number of sides on its own introduces a tiny bias toward lower face values, because 2³² isn't evenly divisible by most side counts. Rejection sampling discards the small leftover slice of values that would cause that bias before taking the modulo, so every face comes out exactly equally likely.

Does the rolling animation affect my actual result?+

No — the animation cycles through several genuine random rolls purely for visual tumble effect, then stops on the roll that's actually recorded as your result and added to the total. What you see settle on screen is the true, final value.

Found this useful? Share it

Help someone else out — or link to it from your own site.

Link to this tool

Writing about dice roller? Paste this on your site to link here.

<a href="https://everyfix.net/tools/dice-roller/">Dice Roller</a> by <a href="https://everyfix.net">EveryFix</a>