Random Number Generator: Pick Random Numbers in Any Range

Set a minimum and a maximum and generate one number or hundreds. Choose whole numbers or decimals, prevent duplicates, and sort the list. Numbers come from your browser's cryptographically secure random generator, so they are suitable for games, draws and sampling.

Related Tools

Password Generator Hash Generator (MD5, SHA-256) Lorem Ipsum Generator Word Counter Unix Timestamp Converter All Utilities

What is a random number generator?

A random number generator, or RNG, produces numbers that cannot be predicted. People use one to pick a winner, draw lottery-style numbers for fun, assign groups, choose a sample for a survey, roll a die or settle an argument fairly. Humans are poor at randomness, since we tend to avoid repeats and favor certain numbers, so a tool is more neutral than picking a number yourself.

This generator lets you set the range, the number of results and whether duplicates are allowed. It can output whole numbers or decimals with up to eight decimal places and can sort the results from smallest to largest.

How to generate random numbers

  1. Enter the minimum and the maximum. Both numbers are included in the range.
  2. Enter how many numbers you want.
  3. Choose the number of decimal places. Leave it at 0 for whole numbers.
  4. Tick No duplicates if every number must be different, and Sort if you want an ordered list.
  5. Press Generate and copy the results.

How the numbers are generated

Browsers include a cryptographically secure random number generator that draws on the operating system's entropy, the same source used to create encryption keys. This tool uses it instead of the simpler Math.random function, which is fine for games but is not designed to be unpredictable. The random value is scaled into your range so every possible number has the same chance, apart from differences far too small to matter in practice.

With No duplicates on, the generator draws numbers one by one and skips any that it has already used, until it has enough. If you ask for more unique numbers than the range contains, it tells you.

Common uses

  • Giveaways and raffles: number the entries and draw a winner. Keep a record of the draw to show that it was fair.
  • Games and classrooms: roll dice by choosing 1 to 6, or pick a student by number.
  • Research and surveys: select a random sample of IDs.
  • Testing: create random test data between two limits.
  • Decisions: choose between options by assigning them numbers.

Good to know

Random does not mean evenly spread. A short run of numbers can contain repeats and clusters, which is normal. This tool is not a licensed lottery or gambling system, and for official draws you should follow the rules and any audit requirements that apply to you.

Running a fair giveaway or draw

Number the entries from 1 to the total, in the order they arrived, and keep a list of which number belongs to which person. Set the minimum to 1 and the maximum to the number of entries, generate one number, and announce the winner with the list and the result. For several prizes, ask for several numbers with No duplicates ticked. Screenshots or a recording of the draw make the process easy to verify.

Dice, coins and choosing from a list

To roll a six-sided die, use 1 to 6, and for a twenty-sided die use 1 to 20. To flip a coin, use 1 to 2 and decide in advance that 1 is heads. To choose among options, number them and generate one number. To shuffle a list into random order, assign each item a number with no duplicates and sort by it, or use the Shuffle option of the Alphabetical Order Sorter.

Example settings

Goal Settings
Roll a die Min 1, max 6, count 1
Lottery-style pick of 6 numbers from 49 Min 1, max 49, count 6, no duplicates
Pick a winner from 250 entries Min 1, max 250, count 1
Random percentage Min 0, max 100, 2 decimal places

Frequently Asked Questions

How do I generate a random number between 1 and 100?

Set the minimum to 1, the maximum to 100 and press Generate.

Can I get several numbers without repeats?

Yes. Tick No duplicates and set how many numbers you want.

Are the numbers truly random?

They come from your browser's cryptographically secure random generator, which is suitable for games, draws and sampling.

Can I generate decimals?

Yes. Set the decimal places to 1 or more.

Are the minimum and maximum included?

Yes. Both ends of the range can appear.

Can I use it for a giveaway?

Yes, for informal draws. Keep a record of the entries and the result, and follow local rules for prize draws.

Is anything stored?

No. Numbers are generated in your browser and are not saved.