Random Number Generator
One tool, three games of chance done properly: random numbers with unique/sorted/decimal control, a coin flipper with tallies, and a dice roller that shows every die — all using your browser's strong random source.
How it works
Numbers come from your browser's built-in cryptographic-quality random source (the same class of randomness password tools use), scaled evenly onto your range — every value in range is equally likely. Unique mode keeps drawing until it has the count you asked for with no repeats, which is exactly how a lottery draw or raffle behaves; it needs a range at least as big as the count. Coin and dice modes are separate fair draws with the tallies counted for you, so a 1,000-flip experiment takes one click instead of an afternoon.
Method & worked example
Method: Whole numbers are drawn as floor(random × (max − min + 1)) + min, so every value in the range is equally likely; decimal draws scale the same way and round to your chosen places. Each die rolls floor(random × sides) + 1, and each coin flip lands heads when its random value falls below 0.5.
Worked example: Roll two six-sided dice and there are 36 equally likely pairs: the most likely total, 7, comes up 6 of those ways — a 16.7% chance — and each die averages 3.5 over time.
When to use this
- A classroom draw, raffle or giveaway needs a set of picks where no name or number can come up twice.
- You are assigning random groups, seating or presentation order and need a fair order nobody can argue with.
- A probability lesson needs a thousand coin flips or a dice experiment run in one click so the tallies can be discussed, not counted by hand.
- A game night calls for dice you do not own — a d20 for a tabletop session or a percentile d100 roll.
How to use it, step by step
- Pick the mode at the top: Numbers, Coin flip or Dice roller.
- For numbers, set the minimum and maximum, how many to draw (up to 1000), and the decimal places — 0 means whole numbers.
- Tick No duplicates when every draw must be different, as in a lottery-style pick, and choose a sort order if you want the list ordered rather than as generated.
- For coins, set the number of flips up to 1000; for dice, set the count up to 20 and pick the die from d4 to d100.
- Press Generate and read the verdict line first — it restates your settings back to you, which is the quickest way to catch a wrong range before you use the result.
What the inputs mean
| Input | What it is | Typical values |
|---|---|---|
| Minimum / maximum | The inclusive ends of the number range | 1 to 100 by default; any range where the maximum is not below the minimum |
| How many numbers | How many values one Generate press draws | 1 to 1000; 10 by default |
| Decimal places | 0 for whole numbers, or 1 to 4 places for decimal draws | 0 for draws and lotteries; 2 for money-like samples |
| No duplicates / sort | Unique prevents repeats; sort orders the finished list low to high or high to low | Unique on for draws without replacement |
Another worked example
A lottery-style pick, set up rather than quoted: set the minimum to 1, the maximum to 50, the count to 6, decimal places to 0 and tick No duplicates, then press Generate. What those settings guarantee is precise — you get exactly 6 whole numbers, every one of them between 1 and 50 inclusive, and no value appears twice, because the tool keeps drawing until it holds six different numbers. Which six numbers appear is different on every press; that unpredictability is the point of the tool, so no honest example can tell you the numbers in advance.
Frequently asked questions
Is this random number generator really random?
It uses the Web Crypto-quality randomness your browser provides (via Math.random's modern implementations, seeded from the operating system). Every number in your range is equally likely, and draws do not influence each other unless you switch Unique on.
Why did Unique mode say the request is impossible?
Unique numbers need at least as many possible values as the count you asked for: you cannot draw 10 unique whole numbers from the range 1–5, because only five exist. Widen the range or lower the count.
How do coin-flip tallies help with probability homework?
Run 10 flips and heads might land 7 times; run 1,000 and it settles near 500. That is the law of large numbers in action — the proportions converge on 50/50 as the count grows, even though short runs look streaky.
What does d20 or d100 mean?
Tabletop-game shorthand for a die with that many sides: d6 is the ordinary cube, d20 is the twenty-sided staple of role-playing games, and d100 (percentile) rolls 1–100.
🔐 Need randomness nobody can guess?
The Password Generator builds strong passwords locally, with length and symbol controls.
Can it generate decimal numbers instead of whole ones?
Yes — set Decimal places to 1, 2, 3 or 4 and the draws come from anywhere in your range, rounded to that many places; a range of 0 to 1 with 2 places behaves like drawing percentages in hundredths. Duplicates are judged at that precision too, so a unique decimal draw needs enough distinct rounded values in the range to fill the count you asked for.
Can I sort the results instead of getting them in draw order?
Yes — the Sort control offers low to high or high to low alongside the default as-generated order. Sorting is presentational only: the same drawn values are rearranged, which is handy for checking raffle tickets against a list, while the as-generated order is the one to keep when the order itself is the result, as in a random running order.