Random Number Generator guide
Random Number Generator: Pick Numbers in Any Range
Use our random number generator to pick one or more random whole numbers or decimals in any range, with or without repeats.
By the AllCalculator editorial teamUpdated 16 October 20261 min read
Need to pick a winner, choose a number for a game or draw a random sample? Our Random Number Generator does it fairly, every time.
How to use the calculator (Random Number Generator)
- Choose whole numbers or decimals.
- Enter the lowest and highest numbers.
- Choose how many numbers you want and whether to allow repeats.
- Press Generate again for a new set.
How it works
The numbers come from your browser's cryptographically secure random number generator, the same kind used to create encryption keys. Every number in the range is equally likely, and earlier results don't affect later ones.
With no repeats, each number can only come up once, like drawing raffle tickets from a hat.
Example uses
| Task | Settings |
|---|---|
| Roll a dice | 1 to 6, one number |
| Pick a raffle winner | 1 to the number of tickets |
| Lottery-style numbers | 1 to 59, six numbers, no repeats |
| Random sample of a list | 1 to the list length, no repeats |
With the calculator's default settings, it picks one whole number from 1 to 100.
Frequently asked questions
Is it truly random?
It uses the operating system's secure random source, which is unpredictable for all practical purposes.
Can I use it for a prize draw?
Yes, but for a public competition, keep a record of how the winner was chosen, and follow the rules of your draw.
Can I pick from a list of names?
Number your names, then generate numbers from 1 to the number of names without repeats.
Sources and further reading
Links open official and independent websites in a new tab.
This guide is general information to help you understand your options. It isn't financial, tax, legal or building advice and doesn't take your personal circumstances into account. Figures were checked when the guide was last updated and can change, so confirm anything important with GOV.UK, HMRC, a regulated adviser or a qualified tradesperson.