Random Number Generator
Pick a minimum and maximum, choose how many numbers you need, and generate instantly. Useful for raffles, sampling, games, and everyday decisions where you need an unbiased number.
What this generator does
Produces random whole numbers or decimals inside a range you set, one at a time or many at once. It is the general-purpose tool the rest of the number generators specialise from: pick a lottery-style spread, choose a winner by ticket number, sample rows from a spreadsheet, or settle something with a number between 1 and 100.
How to use this tool
- Enter a minimum and maximum value.
- Choose how many numbers to generate at once.
- Toggle whether duplicates are allowed.
- Choose whole numbers or decimals, and a sort order.
- Press generate to get your numbers instantly.
Understanding the controls
- Minimum and Maximum
- The range the result is drawn from, and both ends are included — a range of 1 to 10 can return 1 and can return 10. Setting the minimum above the maximum is reported as an error rather than silently swapped, because guessing which one you meant would be worse than asking.
- How many numbers
- Draws this many numbers in a single press. Each is drawn independently unless you turn duplicates off.
- Allow duplicates
- On by default, so drawing five numbers from 1 to 10 can return the same number twice — that is what independent draws do. Turned off, the tool draws without replacement, so every number in the set is different, and you cannot ask for more numbers than the range contains.
- Whole numbers only
- On by default. Turning it off returns decimals inside the same range, which is the setting to use for sampling a measurement rather than picking a ticket.
- Sort
- Only changes the order the results are displayed in, never which numbers were drawn. Sorting a lottery-style line into ascending order makes it easier to read; it does not make the draw any less random.
Worked examples
- Draw one winner from 120 raffle tickets
- Minimum 1, maximum 120, generate 1 number. Ticket 87 wins. Every ticket has exactly a 1-in-120 chance.
- Pick a sample of 5 rows from a 500-row spreadsheet
- Minimum 1, maximum 500, generate 5 numbers, duplicates off — so you never get the same row twice.
- Random percentage for a discount or a game
- Minimum 0, maximum 100, decimals on for values like 42.7, or off for whole percentages.
Common use cases
- Picking a raffle or prize-draw number
- Choosing a random sample for statistics or research
- Settling a numeric decision fairly
- Generating test data or IDs for classroom exercises
How this generator works
Numbers come from your browser's Web Crypto random generator rather than a predictable software formula. Converting raw random bytes into a range fairly is the part that is easy to get wrong: taking a remainder alone makes the lowest numbers in a range slightly more likely. This generator discards and redraws any value that would fall in that uneven tail, so every number in your range is equally likely no matter what bounds you choose. With duplicates turned off, numbers are drawn from a shrinking pool so each result appears at most once.
Randomness and fairness
Numbers come from your browser's cryptographic random number generator, converted into the requested range by rejection sampling: draws that would fall into the uneven remainder of the range are discarded and taken again. This matters because the obvious shortcut — taking a random number modulo the range — quietly favours the lower end of the range, and the difference is large enough to see in a few thousand draws. Every value between your minimum and maximum is equally likely.
For how randomness is produced across the whole site, see how Generate Random works.
Assumptions this tool makes
- Every number in the range is treated as equally likely; the tool has no concept of a number being 'due' because it has not appeared recently.
Limitations and good to know
- Each generation is independent — the tool keeps no memory of previous results, so a number can repeat across separate generations even with duplicates turned off within a batch.
- There is no seed or reproducible mode. You cannot re-create an earlier set of numbers, which also means results cannot be audited after the fact.
- For a regulated prize draw or anything with a legal audit requirement, use a process your regulator accepts — this is a general-purpose tool, not a certified draw system.
Common mistakes
- Expecting no repeats when duplicates are allowed
- Five draws from 1 to 10 will repeat a number surprisingly often — the chance is over 60%. That is correct behaviour for independent draws, not a fault. Turn off duplicates if you need a set of distinct numbers.
- Assuming the range excludes its endpoints
- Both ends are included. A range of 0 to 1 with whole numbers on returns 0 or 1, not always 0.
Frequently asked questions
- How random is this number generator?
- Numbers are produced using your browser's cryptographically secure random number generator, the same class of randomness used for security-sensitive tasks, so results are unbiased across the chosen range.
- Can I generate numbers without duplicates?
- Yes. Turn off 'allow duplicates' and each number in a batch will be unique, as long as your range is large enough to fit the amount you requested.
Related generators
- Random Date GeneratorGenerate one or more random calendar dates within a chosen range, with weekday or weekend filters.
- Dice RollerRoll one or more standard six-sided dice online, with a clear accessible result.
- Lottery Number GeneratorGenerate your own random lottery numbers for any configurable range, bonus ball and line count.
- Unique Random Number GeneratorGenerate a batch of random numbers with no repeats — every number in the set is different.
- Random Percentage GeneratorGenerate one or more random percentages between 0% and 100%, or any custom range.