Back to Home
Blog

Random Number

Generate random numbers

About the Random Number Generator

Whenever you need a fair, unbiased number picked without any manual guesswork — settling a bet, drawing a raffle winner, choosing who goes first in a game, or picking a lottery-style set of numbers — doing it by hand (rolling dice, drawing slips of paper) is slow and easy to game. This Random Number Generator picks whole numbers from any range you set, with both ends included, so 1 to 6 behaves like a die and 1 to 100 gives every value from 1 up to and including 100 the same chance. It's built for situations where you want the outcome to be unpredictable rather than something a person subconsciously influences.

You set a minimum and maximum and choose how many numbers you want. If you need several unique picks — for example, five winning raffle ticket numbers out of 500 entries — untick "Allow duplicates" so the same number can't come up twice in one batch. When you draw more than one number, the Sum and Average appear under the results, and each batch is kept in the History list so you can check an earlier draw without starting over.

A practical tip: if you're running a public raffle or contest, generate the numbers on screen where participants can watch and keep the page open, because the history lives only in the open tab and is gone after a reload. The numbers come from the browser's standard Math.random() function, which is ideal for games and draws but is not meant for passwords, PINs or anything else that needs cryptographic randomness.

How to generate random numbers

Generate one or more random numbers within a custom range in just a few clicks.

  1. 1

    Set the range

    Enter your minimum and maximum values to define the range the number should be picked from.

  2. 2

    Choose how many numbers

    Specify how many random numbers you want generated in this draw — one for a quick pick, or several for a batch.

  3. 3

    Untick "Allow duplicates" for unique picks (optional)

    Leave it ticked for independent draws such as dice rolls. Untick it when each number may appear only once, such as raffle winners.

  4. 4

    Generate

    Press Generate. The numbers appear in the order they were drawn, and for more than one number the Sum and Average are shown underneath.

  5. 5

    Copy or check the history

    Press Copy to put the batch on your clipboard as a comma-separated list. Earlier batches stay in the History list below until you reload the page.

Worked examples

Roll a six-sided die

Input
Minimum 1, Maximum 6, How many numbers? 1, Generate.
Result
One whole number from 1 to 6, each with a 1 in 6 chance. Press Generate again for the next roll.

Six lottery-style numbers from 1 to 49

Input
Minimum 1, Maximum 49, How many numbers? 6, untick "Allow duplicates", Generate.
Result
Six different numbers, for example 7, 41, 18, 3, 29, 36, with their Sum and Average underneath.

There are 13,983,816 possible sets of six, so any particular set has about a 1 in 14 million chance.

Why duplicates appear more than you expect

Input
Minimum 1, Maximum 10, How many numbers? 5, "Allow duplicates" ticked.
Result
About 70% of batches contain at least one repeated number; only 30.24% come out all different.

The chance all five differ is 10 × 9 × 8 × 7 × 6 ÷ 10⁵. This is the birthday problem on a small scale.

Tips and common mistakes

  • Both ends of the range are included: Minimum 1 and Maximum 10 can return 1 and 10.
  • Negative ranges work. Minimum −10 and Maximum 10 gives 21 possible values, including 0.
  • With "Allow duplicates" unticked you cannot get more numbers than the range holds. Asking for 10 unique numbers between 1 and 5 shows a message that only 5 different numbers exist.
  • Results are always whole numbers. Decimal bounds are rounded inwards, so Minimum 1.5 and Maximum 9.7 draw from 2 to 9.
  • Large ranges are fine in either mode: 5 unique numbers between 1 and 1,000,000,000 come back as fast as 5 between 1 and 100. One batch can hold up to 10,000 numbers.
  • Generate is disabled when the minimum is larger than the maximum. Swap the two values to fix it.

Frequently Asked Questions

Can I generate multiple random numbers at once?

Yes, you can request more than one number per draw, which is useful for picking several raffle winners or lottery-style numbers in a single click.

How do I stop the same number coming up twice?

Untick "Allow duplicates". The generator then keeps drawing until it has that many different numbers, so a batch never repeats — what you want for distinct raffle winners. If you ask for more numbers than the range holds, it tells you so instead of returning a short batch.

Is the number generation truly random?

Every whole number from the minimum to the maximum, both included, has an equal chance. The numbers come from the browser's Math.random(), a pseudo-random generator: fine for raffles, games and classroom draws, but not for anything security-related such as generating keys or PINs.

Does this tool store or upload my data?

No. All generation happens client-side in your browser, and no numbers or settings are sent to a server or require an account.

What happens to my past results if I refresh the page?

The history list is kept for your current session; refreshing or closing the page clears it, so note down or screenshot results you need to keep.

What order are the results shown in?

The order they were drawn. For a raffle, that means the first number shown is the first winner. Nothing is sorted, and Copy keeps the same order as a comma-separated list.

How is the Average calculated?

It is the sum of the batch divided by how many numbers it contains, rounded to one decimal place. It only appears when you generate more than one number.