Skip to content
List & number tools Free · Private

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

  1. Set. Enter a minimum and maximum, and how many numbers to draw.
  2. Pick. Click "Generate a number" to draw your result.
  3. Repeat. Turn on no-repeats to keep every number in a multi-number draw unique.
  4. 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

Send feedback

Found a bug, want a feature, or just say hi? Send it our way.