Random Number Generator
Generate random numbers within a specified range
Last updated
How to Use This Tool
Set a minimum and maximum, choose how many numbers you want, then generate and copy the results.
When Should You Use This Tool?
Use this for games, quick random choices, picking winners, or generating simple test values.
Steps
- Set the range.
- Choose how many numbers to generate.
- Enable unique numbers if needed.
- Click βGenerateβ and copy the result.
See also: Random Name Generator, Random Prompt .
How do I generate a random number between two numbers?
Type the lowest number you want in Minimum, the highest in Maximum, and click Generate. Both ends are included, so a range of 1 to 100 can return 1, 100, or anything in between, and every whole number in the range has the same chance of coming up. The defaults are already set to 1 and 100, so for a quick "pick a number from 1 to 100" you only need to press the button.
To get several numbers at once, change How many numbers. Results appear as a comma separated list you can copy straight into a spreadsheet, chat, or document.
What does "unique numbers only" do?
It stops the same number from appearing twice in one batch. With the box ticked, the tool builds a pool of every number in your range and draws from it without putting numbers back, the same way you would pull tickets out of a hat. With the box unticked, each number is drawn independently, so repeats are possible and often more common than people expect.
For example, if you draw 10 numbers from 1 to 100 without the unique option, the chance that at least two of them match is about 37%. Draw 20 and it rises to about 87%. That is the same maths behind the well known birthday problem. If duplicates would be a problem, such as picking prize winners or assigning seats, turn on unique mode.
If you ask for more unique numbers than the range holds (for example 12 unique numbers between 1 and 10), the tool shows a message instead of a result. Widen the range or lower the count.
How do I pick a raffle or giveaway winner with random numbers?
Number every entry, then draw from that range. A simple method that anyone can check afterwards:
- Give each ticket or entrant a number, starting at 1. Keep the list, for example in a spreadsheet.
- Set Minimum to 1 and Maximum to the number of the last entry.
- Set How many numbers to the number of prizes and tick Unique numbers only, so one person cannot win twice.
- Click Generate once, ideally while sharing your screen or recording it, and match the numbers back to your list.
If you need backup winners in case someone does not respond, draw a few extra numbers in the same batch. The order they appear in is also random, so you can treat the first numbers as the main winners and the rest as alternates.
Common ways to use a random number generator
| Task | Settings | Unique? |
|---|---|---|
| Pick a number from 1 to 10 | Min 1, Max 10, count 1 | Not needed |
| Pick 3 raffle winners from 250 tickets | Min 1, Max 250, count 3 | Yes |
| Roll a six sided die | Min 1, Max 6, count 1 | Not needed |
| Lottery style draw (6 numbers from 1 to 49) | Min 1, Max 49, count 6 | Yes |
| Shuffle a running order for 8 presenters | Min 1, Max 8, count 8 | Yes |
| Choose a random page of a 300 page book | Min 1, Max 300, count 1 | Not needed |
| Sample test values including negatives | Min -50, Max 50, count 20 | Either |
The shuffle trick in the table works because asking for as many unique numbers as the range holds gives you every number exactly once, in random order. It is a quick way to set a random order for speakers, turns in a game, or questions in a quiz.
What are the odds of each number?
Each number has a chance of 1 divided by the size of the range. The size of the range is Maximum minus Minimum plus 1, because both ends count.
- 1 to 10: each number has a 1 in 10 chance (10%).
- 1 to 100: each number has a 1 in 100 chance (1%).
- -5 to 5: there are 11 possible numbers, so each has a 1 in 11 chance (about 9.1%).
For combined draws the odds shrink quickly. Matching all 6 numbers in a 6 from 49 draw, in any order, is 1 in 13,983,816. That is why lottery jackpots are rare, and it is a useful example when teaching probability.
Is this random number generator truly random?
It is statistically random but not cryptographically secure. The tool uses your browser's built in Math.random() function, which is a pseudo random number generator. It produces numbers that are evenly spread and unpredictable enough for games, classroom exercises, raffles among friends, sampling and test data. It is not designed for passwords, encryption keys, or regulated gambling, where you should use a generator built on a cryptographic source. Everything runs in your browser, so the numbers are never sent to a server.
Tips for getting the result you want
- Whole numbers only: the tool returns integers. For a decimal such as 0.00 to 1.00, generate a number from 0 to 100 and divide by 100.
- Negative ranges work: set a negative Minimum such as -20 to include values below zero.
- Minimum must not be higher than Maximum: if it is, the tool asks you to fix the range instead of guessing.
- Draw once for fairness: when a result decides something, agree on the settings first and accept the first draw, rather than generating until you like the answer.