Random Number Generator

Generate random whole numbers or decimals in any range — one at a time or thousands at once.

Last updated · How we test our calculators

How random is it?

Numbers are generated in your browser with the Web Crypto API (crypto.getRandomValues), the same source of randomness used for encryption keys. Every number in the range is equally likely, and nothing is sent to a server.

Ideas

Common settings

To do thisMinimumMaximumHow manyRepeats
Flip a coin (1 = heads, 2 = tails)121Yes
Roll one six-sided die161Yes
Roll two dice162Yes
Pick a number from 1 to 10011001Yes
Draw 6 lottery numbers from 491496No
Choose 3 winners from 250 entries12503No
Put 30 students in a random order13030No

With or without repeats

Allowing repeats is like rolling a die: each pick is independent, so the same number can come up more than once. Turning repeats off is like drawing names from a hat: once a number is picked it can't be picked again. Use "no repeats" whenever each result must be different — prize draws, team assignments, sampling — and remember that you can't ask for more unique numbers than the range contains.

Frequently asked questions

Is this truly random?

The numbers come from your browser's cryptographic random number generator, which is seeded from unpredictable physical events in your device and is designed so that its output can't feasibly be predicted. That's the same standard used to create encryption keys, and far stronger than the simple generators used in many games and spreadsheets.

Is every number equally likely?

Yes. Each whole number in your range has exactly the same chance. Over a small number of picks you'll still see streaks and gaps — that's what randomness looks like — but over many picks the counts even out.

I got the same number twice in a row. Is something wrong?

No. With repeats allowed, a repeat is perfectly normal: between 1 and 10 there's a 1-in-10 chance that any pick matches the one before it. Random results don't "avoid" recent values.

Can I use this for a giveaway or raffle?

Yes. Number your entries, set the range to match, switch repeats off and generate as many winners as you need. For transparency you can record your screen or use the Download CSV button to keep a record of the draw.

Can I generate decimals or negative numbers?

Both. Choose "Decimals" and set the number of decimal places, and use a negative minimum (for example −50 to 50) for negative values.