Random Number Generator

Compare Calculations

Downloads

Includes your inputs and results for this calculation, plus any additional calculations you've compared.

Picking One or More Numbers Uniformly at Random

A random number generator picks one or more whole numbers uniformly at random from a range you choose. Enter a minimum and maximum, how many numbers you want, and whether repeats are allowed, and this calculator generates them instantly — useful for picking a raffle or giveaway winner, settling a decision, drawing lottery-style numbers, or generating test data.

Unlike every other calculator on this site, the result here is deliberately not reproducible from the inputs alone — a shared link restores your settings (minimum, maximum, count, and whether repeats are allowed) so a friend can generate their own numbers with the same setup, but it won’t hand them the exact same numbers you got. That’s the entire point of a random number generator: running it again is supposed to give you something new.

How It Works Under the Hood

Each number is chosen uniformly at random from every whole number between your minimum and maximum, inclusive — every value in the range has an equal chance of being picked. When “no repeated numbers” is checked, this calculator keeps drawing until it has enough distinct values, the same approach as physically drawing numbered balls from a bag without putting them back.

Worked Example

Picking 5 unique numbers between 1 and 49 (a common lottery-style draw), with repeats not allowed:

  1. The calculator draws a whole number from 1 to 49, uniformly at random.
  2. If that number hasn’t already been drawn, it’s kept; if it has, the calculator draws again, the same way pulling a numbered ball out of a bag without putting it back works.
  3. This repeats until 5 distinct numbers have been drawn — for example, 7, 14, 22, 35, and 41.

Running this exact same setup again produces a genuinely different 5 numbers, since (as covered above) only the settings are meant to be reproducible here, never the actual result.

Common Uses

  • Picking a winner from a numbered list of raffle or giveaway entries.
  • Drawing lottery-style numbers for games that pick several numbers from a range.
  • Settling a decision — rolling a virtual die (1-6), flipping a coin (1-2), or picking between a few options.
  • Generating sample or test data for a spreadsheet or a coding project.

Key Factors to Consider

  • “Uniformly random” means every number in the range has an equal chance of appearing, not that results will look evenly spread across many draws. A short run of random numbers can look clustered or uneven purely by chance — true randomness doesn’t guarantee even distribution over a small number of draws, it only guarantees equal probability for each individual pick.
  • Excluding repeats changes the probability distribution compared to allowing them, especially for a small range. Drawing without repeats (like a lottery draw) removes previously-picked numbers from consideration for subsequent draws, while allowing repeats keeps every draw completely independent — picking the right mode matters for accurately modeling a real-world scenario like a lottery versus a repeated dice roll.
  • This calculator’s randomness is suitable for everyday use (games, raffles, sampling) but not for cryptographic or security purposes. True cryptographic random number generation has stricter unpredictability requirements than a general-purpose random number generator needs to meet — see the Password Generator Calculator, which specifically uses a cryptographically secure random source, for that different use case.
  • A shared link intentionally restores only the SETTINGS, never the actual generated numbers. This is a deliberate design choice, not a limitation — re-generating fresh numbers each time is the entire point of a random number generator, so a link is meant to let someone else run the same setup, not see the same result.

Common Mistakes

  • Expecting a shared link to reproduce the exact numbers someone else got. As covered above, a link restores the settings only — the numbers themselves are freshly generated every time, by design.
  • Using this for security-sensitive purposes like generating a password or an encryption key. This calculator’s randomness is fine for games, raffles, and sampling, but isn’t cryptographically secure — use a tool built for that purpose instead.
  • Assuming a small batch of random numbers will look evenly spread out. True randomness only guarantees equal probability per draw, not a smooth-looking distribution over just a few numbers — clustering in a short run is normal, not a sign of a broken generator.

Useful to Know

  • Need a cryptographically secure random string instead, like a password? Password Generator uses a secure random source built for that purpose.
  • Want to roll virtual dice instead of picking from a custom range? Dice Roller Calculator simulates rolling any number of dice with any number of sides.
  • Curious about the odds of a particular draw or outcome? Probability Calculator calculates the probability of single and combined events.

Source: Wikipedia: Random Number Generation.

Frequently Asked Questions

Can I generate numbers without repeats?

Yes — check "No repeated numbers" to generate a set of distinct values, useful for picking multiple raffle winners or drawing lottery-style numbers where the same number shouldn't appear twice.

Will a shared link give someone the same numbers I got?

No — a shared link restores your settings (minimum, maximum, count, and whether repeats are allowed) so someone else can generate their own numbers with the same setup, but the actual numbers generated are different every time by design. That's the entire point of a random number generator.

Is this truly random?

It uses your browser's built-in random number generator, which is suitable for everyday uses like picking a winner or settling a decision. It isn't a cryptographically secure random source, so it shouldn't be used for security-sensitive purposes like generating passwords or encryption keys.

Confirm Your Age

To create an account, please tell us your birth month and year.