Unbiased bounded integer sampling

Roll a Virtual Die

Choose D4, D6, D8, D10, D12, or D20. Each result is selected before animation and announced as text.

Choose die

D6 statistics

0Rolls
0Total
Highest
Lowest
Average

Recent rolls

No rolls yet.

Method web-crypto-getRandomValues-v1 (version 1) · How results are selected

Supported dice

  • D4, D6, and D8 for common small ranges
  • D10 and D12 for decimal or tabletop mechanics
  • D20 for games that use a twenty-sided die

Why rejection sampling matters

A 32-bit value range does not divide evenly by every die size. The shared random-integer function rejects the incomplete upper bucket before applying modulo, so every face has the same number of accepted source values.