GeneratorsFree

Random Number Generator

Free random number generator. Pick random integers between a minimum and maximum, one or many at once.

Last updated 9 October 2026

The range is inclusive at both ends, and the bias is one part in a billion

A range of 1 to 100 here means 100 possible numbers, both ends included. That sounds obvious and it is the single most common off-by-one in anything that picks a random number, so it is worth stating.

Each number comes from a cryptographically random 32-bit value, reduced into your range with a remainder. That carries a small and well-known bias: unless the size of your range divides 4,294,967,296 exactly, some values are backed by one more source value than the others. For a range of 100, the remainder is 96, so 96 of the 100 values are favoured by about one part in a billion. For a range of 2 the remainder is zero and there is no bias at all.

That is far too small to matter for a prize draw, a sample or a test fixture. It is not acceptable for generating a secret, but neither is this page: a password or a key should come from a tool built for it, and this site has a password generator for that.

Unique mode gets slow at the end, for a reason worth knowing

With Unique ticked, the page draws a number, throws it away if it has seen it before, and draws again. That is simple and correct, and it gets expensive as the range fills up.

Asking for 100 unique numbers from 1 to 100 takes about 519 draws on average, not 100. Asking for all 500 from a range of 500 takes about 3,396. The last few are the problem: when 499 of 500 have been used, each draw has a one in 500 chance of being the one you still need. Statisticians call this the coupon collector’s problem.

Leave yourself headroom and it stops being an issue. Drawing 500 unique numbers from a range of 1,000 takes about 693 draws, barely more than the 500 you asked for. If you want a full shuffled list rather than a sample, you want a shuffle, not repeated drawing.

Asking for more unique numbers than the range contains is refused outright, with "Unique count exceeds range size.", rather than looping forever.

Things the page quietly fixes or quietly limits

Sources

The figures on this page were computed from this tool’s own code on 9 October 2026. Where a probability is marked as simulated, it came from 20,000 simulated runs and is an estimate, not an exact value.

Frequently asked questions

Are both the minimum and the maximum included?

Yes. A range of 1 to 100 can produce 1 and can produce 100, and contains 100 possible values.

Can I use these numbers for a password or a key?

No. The source is cryptographically random, but a password needs an alphabet, a length policy and a generator built for the job. Use the password generator on this site instead.

Is it truly uniform?

Very nearly, and the gap is stated above. Reducing a 32-bit random value into a range by remainder favours some values by roughly one part in a billion for a range of 100. For a prize draw or a sample it is irrelevant.

Why is Unique slow when I ask for the whole range?

Because it draws and discards repeats. Getting all 500 numbers from a range of 500 takes about 3,396 draws on average, with most of that spent hunting the last few. Widening the range fixes it: 500 from a range of 1,000 takes about 693 draws.

What happens if I ask for more unique numbers than the range holds?

It refuses, with "Unique count exceeds range size." It will not loop forever trying.

I typed the minimum and maximum the wrong way round.

The page swaps them for you and carries on. That is deliberate, but it does mean a typo in one of those fields will not show up as an error.

Can I get decimals?

No. The tool produces whole numbers only, and a decimal entered in the range fields is truncated rather than rounded.

Is there a limit on how many numbers I can generate?

Yes, 500 per run, and the cap is applied without a message.

Related tools