← All posts

How to Pick Random Numbers (Lottery Numbers, Draws, and Sampling)

2026-06-12

Short answer: set a min and max, choose how many numbers you want, and toggle "no repeats" if they must be unique. ToolKoala's Random Number Generator gives you genuinely random numbers in any range, instantly, in your browser — nothing uploaded.

"Pick a random number" is trickier than it looks

People reach for random numbers for very different jobs, and the right settings differ:

  • Lottery / lucky numbers — e.g. 6 unique numbers from 1–49. You need no repeats.
  • A single 1-to-N — pick a winner's seat, a page, a question. One number, repeats irrelevant.
  • A draw by ticket number — everyone has a number; draw one (or a few unique) winners.
  • Sampling — grab N random row numbers from a spreadsheet to spot-check.

The two settings that cover all of these are the range and whether repeats are allowed.

How to use it

  1. Open the Random Number Generator.
  2. Enter the min and max (any integers — negatives and large ranges work too).
  3. Set how many numbers you want.
  4. Turn on No repeats for unique numbers (lottery-style); leave it off if duplicates are fine.
  5. Generate, then copy the result with one click.

It uses crypto.getRandomValues with rejection sampling, so every number in the range is equally likely — no modulo bias that cheaper "Math.random % range" tricks introduce.

When another tool fits

FAQ

How do I generate random lottery numbers? Set the range (e.g. 1 to 49), set how many you need, and turn on No repeats so no number appears twice. Generate, and copy your line.

Are the numbers truly random? Yes — they use crypto.getRandomValues with rejection sampling, so every number in your range is equally likely and free of the bias a naive % range can cause.

Can I get unique numbers with no duplicates? Yes — turn on No repeats. It draws as many unique numbers as the range allows.

Does it work for negative numbers or big ranges? Yes — set any min and max, including negatives and large spans.

— Milo 🐨