Random Number Generator
Pick a random number in any range.
Built and maintained by Paul Clark, Redmoon Software · Last checked
Draw a random whole number between any minimum and maximum — negatives included — or grab a batch of up to 50 at once. Use it to pull raffle ticket winners, pick lottery-style number sets, or call on a random page or line in class. Every draw comes from your browser's Web Crypto API with rejection sampling, so no part of the range is favored.
Set. Enter a minimum and maximum, and how many numbers to draw.
Options
Click Generate a number to see a result.
Recent results
- No history yet.
How it works
- Set. Enter a minimum and maximum, and how many numbers to draw.
- Pick. Click "Generate a number" to draw your result.
- Repeat. Turn on no-repeats to keep every number in a multi-number draw unique.
- Export. Copy the result, download it as CSV, or review past draws in history.
About the Random Number Generator
Bounds are inclusive, and corrected if reversed
The minimum and maximum are both inclusive: a range of one to one hundred can return one and can return a hundred. Enter them the wrong way round and the tool swaps them rather than returning nothing, which is a small kindness that prevents a confusing empty result.
Numbers are drawn using rejection sampling rather than a modulo of a random value, so every number in the range is equally likely. The modulo shortcut skews very slightly towards the low end of the range, and while the effect is small it is exactly the kind of thing a lottery or a giveaway does not want.
No repeats caps the count for you
With No repeats on, you cannot get more distinct numbers than the range contains. Ask for twenty numbers between one and ten and the tool caps the count at ten and tells you it did, rather than silently returning ten or looping forever.
That notice is the useful part. Without it you would have to notice the count yourself, and a short result is exactly the kind of thing that goes unnoticed until someone asks why only ten raffle numbers were drawn.
The count is limited to fifty per run.
Common uses
- Raffle and giveaway numbers — with no repeats on, so no ticket is drawn twice.
- Picking a page, a row, or an item by position from a numbered list.
- Games needing a die with an unusual number of faces.
- Sampling: draw a set of row numbers to spot-check from a spreadsheet.
Frequently asked questions
What happens if I ask for more unique numbers than the range contains?
The draw is capped at the range size and a note explains why. Asking for 10 no-repeat numbers between 1 and 5 returns all five numbers, shuffled.
Can the range include negative numbers?
Yes. Both minimum and maximum accept negative values, and if you enter them backwards the tool swaps them automatically, so a range like -50 to 50 works fine.
How many numbers can I draw in one go?
Up to 50 per draw. With no-repeats on, every number in that batch is unique; with it off, duplicates can occur, like lottery balls drawn with replacement.
Is the generator biased toward any part of the range?
No. It uses crypto.getRandomValues with rejection sampling, which discards out-of-range raw values instead of wrapping them, so every integer from min to max is exactly equally likely.
When should I use this instead of the dice roller?
Use the dice roller when you want per-die results, totals, and modifiers. Use this when you need an arbitrary range, negative numbers, or a batch of unique picks.
Related randomizers
Further reading
- Saving for one thing: how to run a savings challenge that isn't 52 weeks long
The 52-week savings challenge is famous, but a whole year is the wrong length for most real goals. Here's how to scale the same shuffled-deposit idea to a specific purchase, a shorter sprint, or a biweekly paycheck rhythm.
- Why a long streak in 100 coin flips doesn't mean it's rigged
Flip a batch of 100 coins and you'll almost always see a streak of five or more somewhere in the run. That's not a broken randomizer — it's exactly what real randomness looks like. Here's the math behind streak length, and why 'it's due' is the wrong instinct.
- Why the standard 52-week savings challenge secretly punishes December
The classic ascending 52-week chart backs its biggest, hardest deposits into the final weeks of the year — right when holiday spending peaks. Shuffling the same amounts into a random order keeps the total and the deposit count identical while spreading the hard weeks evenly across the year.
- The dice math a digital roller gets right (and a physical set hides)
A lost d6 or a remote D&D session is the obvious reason to roll dice online. The less obvious reason: seeing the actual math of 2d6 vs. 1d20, and how a flat modifier changes your odds more than most players expect.
- Assigning fair raffle ticket numbers with a random number generator
Naming a winner by name feels arbitrary; drawing a number out of a known range feels provable. Here's when to reach for a numeric random draw instead of a name-list picker, with worked examples for raffles, lotteries, and sampling.