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
Range 1 to 100 · 1 result
Generate an integer from a range
Select how many integers to generate
Up to 1000 integers per draw
How to use the random integer generator
- Enter the lowest and highest integer. Both can be negative and both ends are included.
- Set how many integers you need, from 1 up to 1000.
- Tick No repeats if every integer in the set must be different.
- 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.
| Draw | Lowest | Highest | Used for |
|---|---|---|---|
| Coin style choice | 1 | 2 | binary decisions, who goes first |
| Die roll | 1 | 6 | board games, quick chance |
| Rating point | 1 | 10 | scores and rankings |
| Percent value | 1 | 100 | percentages, giveaway draws |
| Single digit | 0 | 9 | PIN digits, check digits |
| Byte or RGB channel | 0 | 255 | test data, colour channels |
| Playing card position | 1 | 52 | picking a card by number |
| Day of the year | 1 | 365 | random dates, schedules |
| UK Lotto ball | 1 | 59 | lottery style lines |
| Signed offset | -50 | 50 | temperatures, 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 type | Lowest value | Highest value |
|---|---|---|
| 8 bit unsigned | 0 | 255 |
| 8 bit signed | -128 | 127 |
| 16 bit unsigned | 0 | 65,535 |
| 32 bit signed | -2,147,483,648 | 2,147,483,647 |
| JavaScript safe integer | -9,007,199,254,740,991 | 9,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 100 | Chance of at least one repeat |
|---|---|
| 5 | 9.7% |
| 10 | 37.2% |
| 12 | 49.7% |
| 20 | 87.0% |
| 30 | 99.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
- Random Number Generator
- Random Decimal Number Generator
- Random Number List Generator
- Random Number Generator With No Repeats
- Random Number In a Custom Range
- Number Randomizer
- Random Even Number Generator
- Random Odd Number Generator
- Random Negative Number Generator
- Random Number Divisible By N
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.