Generate one or many random integers or decimals within a range, with or without repeats.
The generator uses your browser’s built-in pseudo-random number generator, Math.random(). It produces numbers that are statistically indistinguishable from true randomness for everyday purposes: picking a raffle winner, rolling for a game, choosing a sample or shuffling a list. It is not suitable for cryptography or security, such as passwords or keys. For those, use the Password Generator, which uses the browser’s cryptographically secure source.
With a lower limit of 1 and an upper limit of 100, the generator returns a whole number from 1 to 100 and each number has the same 1% chance. Across many draws the average settles near (1 + 100) ÷ 2 = 50.5, and the typical spread (standard deviation) of a single draw is about 28.9. Seeing the same number twice in a row has a 1% chance on any given pair of draws, so it happens now and then and is no sign that the generator is broken.
Ask for 10 numbers with repeats turned off and you get 10 different values, as if drawn from a hat without putting them back. The generator builds the list of all possible values, shuffles it fairly and takes the first ones, so there are 17,310,309,456,440 possible sets of 10 numbers from 1 to 100 (order ignored), all equally likely. You cannot ask for more unique numbers than the range holds: 50 unique integers from 1 to 20 is impossible, and the page tells you so. For huge ranges with few picks, the generator draws and rejects repeats instead.
| Pick | From | Possible sets |
|---|---|---|
| 5 | 20 | 15,504 |
| 5 | 50 | 2,118,760 |
| 5 | 100 | 75,287,520 |
| 10 | 100 | 17,310,309,456,440 |
When repeats are allowed, duplicates appear sooner than most people guess. This is the birthday paradox. The chance of at least one repeat among k draws from 100 values is 1 − (100 × 99 × … ÷ 100k):
| Numbers drawn | Chance of a repeat |
|---|---|
| 5 | 9.7% |
| 10 | 37.2% |
| 12 | 49.7% |
| 15 | 66.9% |
| 20 | 87.0% |
| 30 | 99.2% |
In decimal mode the number is picked uniformly between the limits and rounded to the precision you choose. With a precision of 2, the range 0 to 1 has 101 possible values. If you turn duplicates off, any exact repeat is re-drawn, which matters only at very low precision.
When you generate many numbers, use the sort option to see them in order, which makes it easier to spot gaps or to read off the smallest and largest values. Large results are shown on one line separated by commas, so you can copy them straight into a spreadsheet and split them by comma. Numbers of a thousand or more are displayed with thousands separators.
The large box shows one number, or a list for several. If you asked for sorted output, it is in order. Refreshing or clicking Generate again produces a fresh set; nothing is saved between runs. For analysis of the numbers you generated, use the Mean, Median, Mode, Range Calculator or the Standard Deviation Calculator.
Whenever each result must be unique: assigning raffle numbers, shuffling a deck, or picking several different winners from a pool without repeats.
Yes. Every time you click Generate, a fresh set of random numbers is produced. Nothing is cached or remembered between runs.
It uses your browser's pseudo-random generator, which is statistically fair for everyday uses. It is not suitable for cryptography; use the Password Generator for secure random values.
Yes. With limits 1 and 100, both 1 and 100 can appear.
Each draw is independent, so repeats are normal when duplicates are allowed. The chance of a repeat among 10 draws from 1 to 100 is about 37%.
Up to 10,000. Without repeats, you cannot ask for more unique integers than the range contains.
Pick another tool to jump straight to it.