RandomNr

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

57

Range 1 to 100 · 1 result

Choose the range

How many numbers to generate

Up to 1000 per draw

Options

Parity
Sort results
Copy separator

How to use the custom range generator

  1. Type the lowest and highest value, or tap a preset range.
  2. Choose how many numbers to draw, and whether repeats are allowed.
  3. Press Generate from range. Both ends of the range can be drawn.
  4. 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.

RangeWhat it maps to
1 to 2a coin style either or choice
1 to 6a standard die
1 to 10ratings and quick picks
0 to 9a single digit
1 to 52a card in a standard deck
1 to 90bingo, 90 ball
1 to 100percentages and giveaway draws
1 to 365a day of the year
0 to 255a byte or an RGB colour channel
-50 to 50values 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 functionEndpoint behaviour
This generatorboth ends included
Excel and Google Sheets RANDBETWEENboth 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

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.