Free

Random Number Generator

Set a range, choose how many, and draw. This random number generator keeps every number different unless you allow repeats, and works with negative and very large ranges.

Both ends are included. Negative numbers work, and the range can run up to a quadrillion either side of zero.

Repeats
Order

How to pick a random number between 1 and 100

Put 1 in From, 100 in To, leave How many at 1, and press the button. Both ends are included, so 1 and 100 can both come up, and each of the hundred values has exactly one chance in a hundred. Any pair of whole numbers works the same way, as long as From is not larger than To. Setting both to the same number is allowed, and gives you that number.

Counting what is in a range is where people slip when they do it by hand. From 10 to 20 there are eleven numbers, not ten. From -50 to 50 there are 101, because zero sits in the middle and counts as one of them.

All different, or repeats allowed

With repeats allowed, every number is its own independent draw, like rolling a die with as many faces as the range has values. That makes repeats far more common than most people expect. Ask for 10 numbers from 1 to 10 this way and the chance that all ten differ is roughly one in 2,750.

All different draws without replacement, the way balls come out of a raffle drum: once a number is out, it stays out, and every set of numbers is as likely as every other. It is also why the generator sometimes refuses. From 1 to 10 there are only ten numbers, so a request for twelve different ones has no answer. Handing back ten instead, or slipping in a repeat to make up the count, would give you something other than what you asked for without saying so, so the page stops and tells you to widen the range or allow repeats.

The draw itself is a partial shuffle that only keeps track of the positions it has touched. Picking 6 numbers from 1 to 49 takes six steps, and picking 5 from a range of a trillion takes five, with no list of a trillion numbers built first.

How this random number generator handles large and negative ranges

The helper the other tools on this site share draws numbers up to about 2.1 billion. For a wider range, two of its draws are joined into one value with just enough bits to cover the range, and a value that lands past the end is discarded and drawn again. Throwing it away, rather than wrapping it back around to the start, is what keeps 1 to 10 billion as even as 1 to 10.

Negative ranges are a shift. From -20 to 5 is drawn as 0 to 25 and then moved down by twenty, which changes the labels and not the odds. Sorting happens after the draw, so it changes how the result reads and nothing about which numbers came out.

Where the randomness comes from

This tool runs entirely in your browser, using its built in cryptographic random number generator. Nothing you type is sent to us, nothing is stored, and each result is thrown away the moment you leave the page. Numbers are drawn without the rounding bias that the usual shortcut introduces, so every outcome is as likely as every other.

Because nothing is recorded, a result here proves nothing to anyone afterwards. If you need a drawing that other people have to accept, for a prize, a campaign or an audit, use Winner Picker, which publishes each result on a permanent link with a signed record anyone can check.

Other tools