How it works
Integers are inclusive on both ends. A roll from 1 to 6 can land on 1 and on 6. The draw uses crypto.getRandomValues and rejects values that would bias the remainder, so each face of a die is as likely as the others. Decimals use a 32-bit fraction of the distance between the two ends and never quite reach the upper end.
Dice are that same integer draw with a low of 1. A coin is a draw of 0 or 1. Nothing is stored. Refreshing the page forgets the last result. A password built from a character set, rather than a number, is the password generator.
Formula
- Inclusive integer
result = min + random integer below (max − min + 1) - Die
a fair draw from 1 through the number of faces - Coin
Heads or Tails, each about half the time
Worked examples
A d6
One six-sided die returns 1, 2, 3, 4, 5, or 6. Two dice are two separate draws. The page adds them and also lists each face, so a 7 can be 3 and 4 rather than a hidden total.
A lottery-style range
Integers from 1 to 100 include both 1 and 100. Asking for five numbers draws five times. The draws are independent, so repeats are allowed. This is not a shuffle of a deck.
| Die | Faces | Typical use |
|---|---|---|
| d4 | 1–4 | A small table |
| d6 | 1–6 | The cube most people mean |
| d8 | 1–8 | Games |
| d10 | 1–10 | Percentiles, two at a time |
| d12 | 1–12 | Games |
| d20 | 1–20 | Tabletop games |
Common questions
Is this truly random?
It uses crypto.getRandomValues, the same browser API as the password generator. That is the right source for a draw you do not want a script to predict. It is still software on your machine, not a physical die.
Can the same number appear twice?
Yes. Each draw is independent. Five numbers from 1 to 10 can repeat. If you need a shuffle with no repeats, that is a different tool.
Does the decimal include the maximum?
No. The minimum is included and the maximum is not, which is the usual rule for a continuous range. Integers and dice include both ends.
Are the results saved?
Only on the page, until you leave or refresh. They are not uploaded.