Skip to content

Random Number Generator: Pick Numbers in Any Range

Random number generator for any range: pick 1 to 1,000 numbers with or without repeats, sorted or not. Unbiased, cryptographically secure, instant.

By Updated Runs in your browser

Random Number Generator guide

Generate random numbers between any minimum and maximum. Pick one number or up to 1,000, block repeats for raffles and lotteries, and sort the results. Every value has an exactly equal chance.

How the numbers are generated

This generator uses crypto.getRandomValues, the browser's cryptographically secure random source, to pick each integer between your minimum and maximum, inclusive. Unlike Math.random, it is seeded from the operating system's entropy pool and is not predictable from previous outputs.

Both ends of the range are included. A range of 1 to 6 behaves like a fair die, and 1 to 100 can return both 1 and 100.

With or without repeats

By default, each number is drawn independently, so repeats happen. That surprises people more than it should. Draw 10 numbers from 1 to 100 and the chance of at least one duplicate is about 37 percent. This is the birthday problem in miniature: 23 people give better-than-even odds of two sharing a birthday.

Turn on unique results when you need a draw without replacement, like picking raffle winners or assigning seats. The count cannot exceed the size of the range; you cannot pull 20 unique numbers from 1 to 10.

Worked examples

Picking a giveaway winner: export entrants to a numbered list of 347 names, set the range to 1 to 347, count to 1, and generate. Screen-record the draw if you want transparency.

Choosing three winners: same range, count 3, unique on. Each entrant has a 3 in 347, or about 0.86 percent, chance of being picked.

Random sampling: to audit 50 of 2,000 invoices, set 1 to 2,000, count 50, unique on, then sort the list before pulling files.

Dice and games: 1 to 6 for a d6, 1 to 20 for a d20. For two dice, generate two numbers rather than one number from 2 to 12; the sum of two dice is not uniform, with 7 coming up six times as often as 2.

Randomness misconceptions

Streaks are normal. Flip a fair coin 100 times and you will almost certainly see a run of five or more identical results. Random data looks clumpier than people expect; data that looks "evenly spread" is often not random.

Past results do not affect future ones. If 7 has not come up in a while, it is not "due". Each draw is independent. For perspective, Powerball jackpot odds are 1 in 292,201,338 no matter which numbers you pick or how long they have gone without appearing.

Fairness and how to prove it

For a public giveaway, fairness is also about perception. Announce the rules before the draw: how entries are numbered, the range you will use, and whether repeats are allowed. Then record your screen while generating. Anyone can verify the entry list and see that the number was not chosen after the fact.

If one person can hold multiple entries, keep them as separate numbered lines so each entry has an equal chance. If you remove duplicate entrants first, say so in the rules.

Probability quick reference

The chance of a specific number in one draw from 1 to N is 1 in N. The chance of it showing up at least once in k independent draws is 1 − ((N − 1) ÷ N)^k. Rolling at least one 6 in four rolls of a die is 1 − (5/6)^4, about 52 percent, slightly better than a coin flip. That exact bet made gamblers in 17th-century France rich and helped start probability theory.

For unique draws, the chance a given entrant is picked is simply k ÷ N. With 500 entries and 5 winners, each entry has a 1 percent chance.

When to use something else

For legally regulated drawings, like state lotteries or sweepstakes with prizes above certain values, rules may require audited hardware or a third-party administrator. For cryptographic keys, use a dedicated key generator. For everything else, this is fast, fair, and private: numbers are generated on your device and never sent anywhere.

How we calculate: sources

Frequently asked questions

How do I pick a random number between 1 and 10?

Set Min to 1, Max to 10, and How many to 1, then press Generate. Each number from 1 to 10 has exactly a 10% chance.

Can I generate numbers without repeats?

Yes. Keep Unique results checked. You can request up to as many numbers as the range holds, for example all 50 values from 1 to 50 in random order.

Is every number equally likely?

Yes. The generator uses crypto.getRandomValues with rejection sampling, which removes the small modulo bias that simpler generators have.

Can I use it to pick lottery numbers?

Yes. For Powerball, generate 5 unique numbers from 1 to 69, then 1 number from 1 to 26. Random picks have the same odds as any other combination: 1 in 292,201,338 for the jackpot.

Does it include the min and max values?

Yes. Both ends are inclusive, so 1 to 6 can return 1, 2, 3, 4, 5, or 6, just like a die.

Can I generate negative numbers?

Yes. Enter a negative minimum such as −50 and the generator picks any whole number from −50 up to your maximum.

Is anything sent to a server?

Everything runs in your browser. Nothing you enter is uploaded to a server or stored by us.

Is this random number generator truly random?

It uses a cryptographically secure pseudorandom generator seeded from your operating system's entropy. It is unpredictable for practical purposes, including giveaways and sampling.

How do I pick a random winner from a list?

Number the entries, set the range from 1 to the number of entries, and generate one number. Turn on unique results for multiple winners.