Generate one or more random whole numbers between any minimum and maximum, with or without repeats. Enter the range and how many numbers you need, and get a fair draw for raffles, games or picks.
Last updated: November 15, 2026 · Written by the CalculatorGate team
A lottery-style draw:
| Numbers in the range | 49 |
|---|---|
| Chance of one given number in one draw | 2.04% |
| Possible sets of 6 numbers | 13,983,816 |
Information about random number generation
The random number generator creates completely random numbers within your specified range. It can be used for raffles, chance games, statistical sampling, and decision-making processes.
If you allow duplicates, the same number can appear multiple times. In non-duplicate mode, each number is generated at most once.
Example use cases: Lottery numbers, team selection, order determination, random selection, password generation, game dice, and test data generation.
Note: This tool is not cryptographically secure and should not be used in security-critical applications.
Tickets are numbered 1 to 250 and there are 3 prizes. How do you draw fairly, and what chance does each ticket have?
Short answers to common questions
The random number generator uses JavaScript's Math.random() function to generate a random number between 0 and 1, then scales it to your specified range. For example, for 1-100, it uses the formula Math.floor(Math.random() * 100) + 1.
In duplicate mode, the same number can be generated multiple times. For example, if you generate 5 numbers from 1-10, you might get 7 twice. In non-duplicate mode, each number is generated at most once, so you'll get 5 different numbers.
No, this tool is not cryptographically secure. For passwords or security keys, use your browser's crypto.getRandomValues() API or dedicated password generator tools. Math.random() is predictable and should not be used in security applications.
For performance reasons, you can generate a maximum of 1000 numbers. Additionally, in non-duplicate mode, the maximum number you can generate is limited by the width of your specified range. For example, for 1-10 non-duplicate, you can generate a maximum of 10 numbers.
More tools for similar calculations
Lowest number in the range.
Highest number in the range.
Between 1 and 1000.