Number Generators
Random Number In a Custom Range
Set any lowest and highest value, including negatives, and draw numbers from exactly that range.
Random Number In a Custom Range
Range 1 to 100 · 1 result
Choose the range
How many numbers to generate
Up to 1000 per draw
How to use the custom range generator
- Type the lowest and highest value, or tap a preset range.
- Choose how many numbers to draw, and whether repeats are allowed.
- Press Generate from range. Both ends of the range can be drawn.
- Copy or download the results.
Popular ranges and what they map to
Nearly every practical draw is one of a small family of ranges. This table lists the ones people set most, so you can match the job to the bounds in one glance.
| Range | What it maps to |
|---|---|
| 1 to 2 | a coin style either or choice |
| 1 to 6 | a standard die |
| 1 to 10 | ratings and quick picks |
| 0 to 9 | a single digit |
| 1 to 52 | a card in a standard deck |
| 1 to 90 | bingo, 90 ball |
| 1 to 100 | percentages and giveaway draws |
| 1 to 365 | a day of the year |
| 0 to 255 | a byte or an RGB colour channel |
| -50 to 50 | values that swing around zero |
Are both ends of the range included
Off by one mistakes are the classic range bug, because different tools treat the endpoints differently. This generator includes both ends, so 1 to 100 really can return 1 and 100. Elsewhere the behaviour varies, which is worth knowing when you reproduce a draw in code or a spreadsheet.
| Tool or function | Endpoint behaviour |
|---|---|
| This generator | both ends included |
| Excel and Google Sheets RANDBETWEEN | both ends included |
| Python random.randint(a, b) | both ends included |
| Python random.randrange(a, b) | top value excluded |
| JavaScript Math.random() | gives 0 up to but not including 1, needs scaling |
| Java Random.nextInt(n) | gives 0 to n minus 1, top excluded |
The table is also a reminder of why a purpose built tool is safer than a quick formula: RANDBETWEEN style functions rest on a pseudo random engine and a spreadsheet recalculates them on every edit, while this page draws once from the browser cryptographic source and the result stays put until you generate again.
How range size changes the odds
Every value in the range carries the same chance, exactly 1 divided by the size of the range. Widen the range and each individual value becomes rarer, but repeats also become rarer, which matters when you draw several numbers at once. From a pool of 100, twelve draws produce a repeat about half the time, so for multi number draws from tight ranges consider the no repeats generator, which makes duplicates impossible.
Popular generators
Frequently asked questions
How do I set a custom range
Type your lowest value and your highest value in the two fields, or tap a preset. The draw includes both ends.
Can the range start below zero
Yes. Ranges such as minus 20 to 20 work, and every value in between is equally likely.
Can I draw more than one number
Yes, up to 1000 per draw. Turn on no repeats if each value in the set must be different.
What happens if I reverse the values
The tool swaps them for you, so a lowest of 100 and a highest of 1 still draws from 1 to 100.
Is it free
Yes, free and with no sign up. Every draw runs in your browser and nothing you enter leaves your device.
Related generators
- Random Number Generator
- Random Integer Generator
- Random Decimal Number Generator
- Random Number List Generator
- Random Number Generator With No Repeats
- Random Even Number Generator
- Random Odd Number Generator
- Random Negative Number Generator
- Random Number Divisible By N
- Number Randomizer
Looking for a plain draw with quick presets? The random number generator is the general tool, and the no repeats generator forces every result to be unique.