How to generate random numbers
- Type the lowest number in Min and the highest in Max. Negative numbers are fine.
- Choose how many numbers you want, and turn on No repeats if each number should appear only once.
- Pick whole numbers or decimals, and choose a sort order if you want the list in order.
- Press Generate or the space bar. Use Projector mode to show the result to the class.
What is a random number generator?
A random number generator (RNG) picks numbers by chance, so every number in the range is equally likely and the next one cannot be predicted. Teachers use one to pick a student by register number, choose a question, set a starting value for a maths problem or run a raffle. For a range from a to b, the number of possible whole numbers and the chance of each are:
possible numbers = max − min + 1 chance of each = 1 ÷ (max − min + 1) So for 1 to 100 there are 100 − 1 + 1 = 100 possible numbers, and each has a 1 in 100 (1%) chance. For −5 to 5 there are 11 possible numbers, because zero counts too.
True random vs pseudo-random numbers
Computers follow instructions, so most of them make pseudo-random numbers: a formula turns a starting value (a seed) into a long sequence that looks random. If you know the formula and the seed, you can predict every number. That is fine for games and simulations, and it lets scientists repeat an experiment exactly.
True random numbers come from unpredictable physical events, such as electrical noise, radioactive decay or tiny timing differences inside a chip. Your computer mixes this kind of physical randomness into a cryptographically secure generator, which is what this tool uses (crypto.getRandomValues). Its output cannot be predicted in practice, which is why the same method is used for passwords and encryption.
| Pseudo-random | Cryptographically secure | |
|---|---|---|
| Example | Math.random(), a spreadsheet RAND() | crypto.getRandomValues (this tool) |
| Predictable? | Yes, if you know the seed | Not in practice |
| Good for | Games, simulations, repeatable tests | Fair draws, raffles, passwords |
How to avoid repeats
With repeats allowed, the same number can come up twice, just like rolling the same number on a die. Turn on No repeats to draw numbers like raffle tickets that are not put back. For example, picking 6 numbers from 1 to 49 with no repeats gives one of 13,983,816 possible sets. This tool shuffles the numbers with a fair Fisher–Yates shuffle, so every set is equally likely.
Uses in the classroom
- Pick a student: number your class list and generate a number from 1 to the class size. For names, try the random letter generator for games or the random group generator for teams.
- Maths practice: generate two numbers from 2 to 12 and multiply them, or a list of 10 numbers and find the mean and median with the statistics calculator.
- Negative numbers: generate pairs from −20 to 20 and add or subtract them.
- Probability experiments: generate 100 numbers from 1 to 6 and compare the counts with the dice roller.
- Bingo and raffles: for a full game, use the bingo caller.
Common mistakes
- Forgetting the range is inclusive. 1 to 10 includes both 1 and 10.
- Asking for more unique numbers than the range holds. You cannot pick 12 different numbers from 1 to 10.
- Thinking a number is "due". Each draw with repeats allowed is independent, so past results do not change the next one.
Frequently asked questions
How do I generate a random number?
Enter the lowest and highest numbers you want (for example 1 and 100) and press Generate or the space bar. Every whole number in the range, including both ends, has the same chance of being picked.
Is this random number generator truly random?
It uses your browser's cryptographically secure random number generator (crypto.getRandomValues) with rejection sampling, so there is no bias toward any number. That is the same kind of randomness used for passwords and security keys, and much stronger than Math.random().
How do I pick numbers with no repeats?
Turn on No repeats and set how many numbers you want. Each number can then appear only once, like drawing raffle tickets from a hat. You cannot ask for more numbers than there are in the range.
Can I generate negative numbers or decimals?
Yes. Type a minus sign for negative numbers, such as −50 to 50. Choose Decimals and 1 to 6 decimal places to get numbers like 3.72, with every value on that grid equally likely.
How do I pick lottery numbers?
Tap Lottery: 6 from 1–49. It picks 6 different numbers from 1 to 49 and sorts them. There are 13,983,816 possible sets, so any one ticket has a 1 in 13,983,816 chance. This is for fun and classroom maths, and does not make any numbers more likely to win.
Is 1 to 10 inclusive?
Yes. Both the minimum and maximum can be picked. For 1 to 10 there are 10 possible numbers, so each has a 1 in 10 (10%) chance.
Can I show the number on a projector?
Yes. Press Projector mode for a full-screen number in huge type. Press the space bar to generate again and Esc to exit. Your settings and history are saved in this browser.
Last reviewed November 27, 2026 by the ChalkStation team.