Random number generator
Set the lowest and highest number, how many you want and press Generate. You can ask for no repeats, sort the list and copy it.
Free · no signup Runs in your browser
How do I pick a random number between two numbers?
Enter the lowest and highest number, choose how many you want and press Generate. For a whole-number draw each value in the range is equally likely, because the tool uses the browser's secure random generator and discards values that would favour the low end. Tick unique to stop the same number appearing twice, which is how a lottery-style draw works.
Why this draw is fair
A common shortcut for a random whole number is to take a random value and use the remainder after dividing by the range size. That slightly favours the low numbers whenever the range does not divide evenly into the generator's output, a flaw known as modulo bias. This tool avoids it by rejection sampling: it draws a 32-bit random value and throws away the few values at the top that would unbalance the result, then tries again. Every whole number in the range is then exactly as likely as every other.
The random values come from the browser's crypto.getRandomValues, the same source used for passwords and keys, rather than Math.random, which is a fast pseudo-random generator not designed for fairness-critical use. Nothing is sent over the network and no draw is stored.
It runs in your browser. Nothing is sent anywhere, and there is no sign-up.
Unique numbers and lottery-style draws
With unique ticked, a number can appear only once. For ranges up to a million the tool builds the full list and does a partial Fisher–Yates shuffle, which gives every possible set and order equal chance. For a larger range it draws one at a time and rejects repeats. A request for more unique numbers than the range holds is capped at the range size and the page says so.
This is a tool for decisions, games, classroom draws and testing. It is not an official lottery, and nothing here predicts or improves your odds in one: each draw is independent of every earlier one.
When to use it
- Choosing who goes first, or a winner from numbered entries
- Drawing raffle or door-prize tickets
- Picking numbers for a game, a bingo card or a test data set
- Settling a tie with a fair draw
Mistakes it helps you avoid
- Using a remainder trick that favours small numbers.
- Allowing repeats when each ticket can win only once.
- Assuming a number is 'due' because it has not come up lately.
- Using a pseudo-random generator for anything security-related.
The formula
How the answer is worked out.
1. Take a random 32-bit value from the browser's secure generator.2. If the value falls in the top slice that would unbalance the range, throw it away and draw again.3. Otherwise number = lowest + (value mod size of range), where size = highest − lowest + 1.4. For unique numbers, shuffle the list of possible values (Fisher–Yates) and take the first ones.
Whole-number ranges up to 4,294,967,296 wide are supported. Decimal numbers are made from 53 random bits scaled into the range and rounded to the places you choose, so they are very evenly spread but the end values are slightly less likely than the middle after rounding. At most 1,000 numbers are produced at once.
Example: six unique numbers from 1 to 49
You want six different numbers from 1 to 49 for a game.
- Rangelowest 1, highest 49: 49 possible values
- How many6, unique ticked, sorted ticked
For example: 4, 11, 19, 27, 33, 46
Your numbers will differ every time you press Generate.
Terms on this page
- Rejection sampling
- Throwing away random values that would make a result uneven, then drawing again.
- Modulo bias
- The slight favouring of low numbers when a random value is reduced with a remainder.
Common questions
Is the random number generator really random?
It uses the browser's cryptographically secure generator, which is suitable for fairness-critical draws. It is not 'true' physical randomness, but no one can predict it.
Can the same number come up twice?
Yes unless unique is ticked. Each draw is independent.
Can I get decimals?
Yes: choose how many decimal places. Unique applies to whole numbers only.
How many numbers can I generate at once?
Up to 1,000.
Is it an official lottery tool?
No. It is for everyday decisions and games.
Is anything I enter sent to a server?
No. The calculation happens in your browser and nothing you type leaves your device.
What to work out next
Where these numbers come from
- MDN Web Docs — Crypto.getRandomValues() The browser's cryptographically strong random number source used by these tools.
- Wikipedia — Fisher–Yates shuffle The unbiased shuffle used, and why a naive sort-based shuffle is biased.
- Wikipedia — Pseudorandom number generator The difference between pseudo-random and cryptographically secure generators.
Last verified 2026-10-25 The method on this page is checked against the sources above at least once a year. Spotted something out of date? Tell us and we will fix it.
Related tools
Dice roller
Roll any dice with notation such as 2d6+3, 4d6 drop lowest or advantage on a d20, using unbiased secure random numbers.
Open toolCoin flip
Flip a fair virtual coin once or many times and keep a running tally of heads and tails.
Open toolRandom name picker
Paste a list of names, then pick one or several winners at random with a fair shuffle, or shuffle the whole list.
Open toolCountdown timer
Set hours, minutes and seconds, press Start and hear an alarm when time is up. It stays accurate when you switch tabs.
Open toolRandom team generator
Split a list of names into fair random teams, by the number of teams or by the size of each team.
Open toolPrice per kg to lb
Compare shelf prices when one is per kilogram and the other is per pound.
Open calculator✨ Everyday and leisure calculators
The small calculations that come up in a kitchen, a supermarket aisle or a games session.
See all 26 tools in this section