Random numbers — the quick answer
A random number generator picks each number in your range with equal probability — no patterns, no favorites. Set a minimum and maximum, choose how many numbers you want, and optionally forbid repeats. The result appears instantly.
This generator uses your browser's cryptographic random source (crypto.getRandomValues()) — the same kind of randomness operating systems use for security keys — with a standard fallback if it is unavailable. Everything runs locally: your numbers are never sent anywhere.
A short history of randomness
Humans have randomized decisions for millennia — the oldest known dice, found in the Middle East, are about 5,000 years old, and casting lots appears in ancient texts from many cultures. For most of history, "random" meant bones, coins or shuffled cards: physical processes nobody could fully predict.
Computers changed that. Early machines used pseudo-random formulas — deterministic math that merely looks random. Computing pioneer John von Neumann warned in 1951 that "anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin." Modern browsers solve this with hardware-backed entropy: the operating system gathers unpredictability from timing jitter and thermal noise, and crypto.getRandomValues() hands it to web pages.
The result: the numbers on this page are as random as your device can make them — good enough for games, raffles and sampling, though high-stakes lotteries still use audited physical machines.
How it works: the formula
The "+1" matters: for 1–100 there are 100 possible outcomes, and each gets an equal slice of the random range. With no repeats enabled, each drawn number is removed from the pool before the next draw — like pulling names from a hat.
One draw — each of the 100 numbers has a 1% chance.
The first draw removes a number from the pool, the second picks from the remaining 9, and so on — the 5 results are always different.
Dice equivalents — common gaming ranges
Match a physical die to a generator range — handy when the dice bag is missing:
| Die | Range | Commonly used for |
|---|---|---|
| d4 | 1–4 | RPG damage, small random picks |
| d6 | 1–6 | Board games, backgammon |
| d8 | 1–8 | RPG weapons |
| d10 | 1–10 | Percentile pairs, RPGs |
| d12 | 1–12 | RPG weapons, hours |
| d20 | 1–20 | D&D checks, critical hits |
| d100 | 1–100 | Percentile rolls, raffles |
Everyday uses for random numbers
Where a quick random draw settles things fairly:
Number the tickets 1–500 and generate one — every ticket has an equal chance.
Lost a die? Generate 1–6 as a stand-in d6.
Generate unique numbers to shuffle presentation or speaking order.
Four digits 0–9 as inspiration — but never use a web tool for real security codes.
Everyone draws; the highest number starts. Simple and dispute-free.
Pick 10 unique numbers from 1–200 for an unbiased survey sample.
Visual guide: a roll of the dice
Dice are humanity's original random number generators — each face gets exactly the same treatment, just like each number in your range:
Figure: two dice mid-roll. Each face has a 1-in-6 chance — the generator above gives every number in your range that same equal treatment.
Common mistakes to avoid
Randomness is widely misunderstood. These four traps catch almost everyone:
- Using random numbers for real security. This page is for games and decisions — generate actual passwords and keys with a dedicated password manager, never a web toy.
- Modulo bias in DIY code. Naively doing
random() % rangefavors low numbers. This generator avoids that with rejection sampling, so every outcome stays exactly equally likely. - Expecting an "even spread". True randomness clusters — 7, 7, 7 is exactly as likely as 1, 2, 3. If your results "look" uneven, that is randomness working correctly.
- Re-rolling until you like the answer. Regenerating to get a preferred outcome is no longer random — it is just choosing with extra steps.
Pro tips & mental math
Get more out of every draw:
- Use no-repeats for draws, raffles and shuffling. It guarantees distinct results — the honest equivalent of drawing names from a hat.
- Need a coin flip? Set the range to 1–2: 1 = heads, 2 = tails. (We also have a dedicated coin-flip tool.)
- Bookmark your settings. The page URL remembers your min, max, count and no-repeats choice — save it to reuse a favorite setup.
- Simulate dice pools. Rolling 3d6? Generate 3 numbers from 1–6 and add them — totals near 10–11 come up most, just like real dice.
Printable cheat sheet
Print the dice-equivalents table for game night — a clean, ink-friendly sheet with the widget and navigation hidden automatically:
Fun facts
- Von Neumann's warning (1951): "Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin" — the reason modern generators lean on hardware entropy.
- RANDOM.org generates its numbers from atmospheric noise picked up by radios — literal static from the sky.
- The oldest dice (c. 3000 BC) were carved from knucklebones called astragali — sheep ankle bones with four distinct resting faces.
- Humans are terrible at faking randomness. Asked to invent a "random" sequence, we avoid repeats and clusters — exactly the patterns real randomness produces.
Frequently asked questions
Is this random number generator truly random?
Yes — as random as your device can produce. It uses crypto.getRandomValues(), which draws from entropy your operating system collects (timing jitter, hardware noise and similar unpredictable sources). It does not rely on the weaker Math.random() except as a last-resort fallback on very old browsers.
How do I pick a fair raffle winner?
Number the tickets (say 1–500), set the minimum to 1 and the maximum to 500, and generate one number. For multiple prizes, turn on no repeats and generate one number per prize — every ticket keeps an equal chance each draw.
Can I get the same number twice?
Yes, unless no-repeats mode is on. Each draw is independent: getting 42 twice in a row from 1–100 has exactly the same probability (1 in 10,000) as getting 42 then 17. Randomness has no memory.
What does the no-repeats option do?
It draws without replacement, like pulling names from a hat — each drawn number is removed from the pool before the next draw. If you ask for more unique numbers than the range contains, the generator shows an error instead of guessing.
Why did I get the same number three times in a row?
Streaks are a normal feature of true randomness, not a bug. Any specific sequence — 7, 7, 7 or 4, 19, 83 — is equally likely. Humans expect randomness to look 'evenly spread', but real random data clusters.
Does the generator work offline?
Yes. Everything runs locally in your browser — no numbers are sent to any server, stored, or logged. It is fully private by design.
Related tools
More calculators and converters you may find useful:
