RandomNr

Number Generators

Random Integer Generator

Draw random whole numbers from any range you set, positive or negative. Choose how many you need, block repeats for a unique set, then copy or export the result.

Random Integer

7

Range 1 to 100 · 1 result

Generate an integer from a range

Can be negative or zero
Highest value that can be drawn

Select how many integers to generate

Up to 1000 integers per draw

Integer generator options

Parity
Sort results
Copy separator

How to use the random integer generator

  1. Enter the lowest and highest integer. Both can be negative and both ends are included.
  2. Set how many integers you need, from 1 up to 1000.
  3. Tick No repeats if every integer in the set must be different.
  4. Press Generate, then copy the set or download it as a CSV.

Common integer draws and the settings to use

Most integer jobs map onto a handful of well known ranges. This table pairs the everyday draws with the exact settings to type in, so you do not have to work them out each time.

DrawLowestHighestUsed for
Coin style choice12binary decisions, who goes first
Die roll16board games, quick chance
Rating point110scores and rankings
Percent value1100percentages, giveaway draws
Single digit09PIN digits, check digits
Byte or RGB channel0255test data, colour channels
Playing card position152picking a card by number
Day of the year1365random dates, schedules
UK Lotto ball159lottery style lines
Signed offset-5050temperatures, coordinate shifts

How large can the integers be

Computers store integers in fixed sizes, and knowing those limits helps when you are generating test data for a database column or a typed variable. These are the standard limits, and this generator comfortably covers all of the everyday ones.

Storage typeLowest valueHighest value
8 bit unsigned0255
8 bit signed-128127
16 bit unsigned065,535
32 bit signed-2,147,483,6482,147,483,647
JavaScript safe integer-9,007,199,254,740,9919,007,199,254,740,991

The draw itself uses 32 bits of entropy per number with rejection sampling, which is exact for any range up to about 4.29 billion values wide. That covers every row in the table up to and including full 32 bit test data.

How this compares with other random number generators

Popular generators differ mainly in where the randomness comes from. RANDOM.ORG generates true random numbers on its servers from atmospheric noise, the radio static produced by roughly 40 lightning flashes striking somewhere in the world every second, and offers a free daily quota. Tools such as calculator.net and GigaCalculator run pseudo random algorithms, with GigaCalculator reseeding from hardware entropy in line with RFC 4086.

This generator takes a third route. It calls the cryptographic random source built into your own browser, which the operating system seeds from hardware entropy, and applies rejection sampling so no integer in the range is favoured by rounding. Because everything runs on your device there is no server round trip, no quota, and the tool keeps working offline once the page has loaded.

Will the same integer come up twice

With repeats allowed, duplicates arrive far sooner than intuition suggests, an effect known as the birthday problem. Drawing from 1 to 100, the chance that at least two integers in your set match grows like this.

Integers drawn from 1 to 100Chance of at least one repeat
59.7%
1037.2%
1249.7%
2087.0%
3099.2%

Only 12 draws from a pool of 100 already gives a repeat about half the time. When duplicates would spoil the job, tick no repeats on this page or use the random number generator with no repeats, which removes each integer from the pool as it is drawn.

Popular generators

Frequently asked questions

What counts as an integer

An integer is a whole number with no fractional part. It can be positive, negative or zero, for example minus 4, 0 and 27. This tool never returns a decimal.

Can I generate negative integers

Yes. Set the lowest value below zero, for example minus 100 to 100, and negative results are drawn with the same chance as positive ones.

How do I get integers with no repeats

Tick the no repeats option. Every integer in the draw will then be different, and the count is capped at the number of integers your range holds.

Is zero included in the range

Yes, as long as zero falls between your lowest and highest value. A range of minus 5 to 5 can return zero like any other integer.

Is the integer generator free

Yes, free and with no sign up. Every draw runs in your browser and nothing you enter leaves your device.

Related generators

Need something else? Draw across a mixed pool with the random number generator, add decimals with the decimal generator, or build a long set with the random number list generator.