Random Number Generator: Draws and Unique Picks

Last updated: · 3 min read

A raffle, a classroom draw or a giveaway needs winners chosen by chance, not by habit or favoritism. The Random Number Generator produces whole numbers between two limits you set; the numbers come from the browser's secure random source and are not sent to any server. This guide explains how bias is avoided, how a no-repeat draw works and what to check before announcing a winner.

Formula

Range size n = maximum − minimum + 1
Integer below n: draw the bits needed, mask them, and discard any value ≥ n (rejection)
No-repeat draw: at step i, j = i + random(n − i); swap positions i and j (partial Fisher–Yates)

To avoid bias, a number is built from random bits and any value outside the range is thrown away, so no number is favored over another. In no-repeat mode each chosen number is removed from the pool and cannot be picked again. Sources: W3C Web Cryptography API and crypto.getRandomValues.

What the inputs mean

Minimum
The lowest number in the range, included. For raffle entries numbered from 1, enter 1.
Maximum
The highest number in the range, included. For 100 entries, enter 100. It must be larger than the minimum.
How many numbers
The count of numbers to draw, from 1 to 1000. For a five-winner draw, enter 5.
Repeats
"Each number at most once" prevents the same entry winning twice, which is the right setting for a prize draw. In this mode the count cannot exceed the number of distinct values in the range.
Order
"In draw order" shows the numbers as they were drawn; "Ascending" sorts them. Sorting does not change which numbers were chosen.

Worked example: A five-winner draw from 1 to 100 with no repeats

  1. Enter 1 as the minimum and 100 as the maximum; the range then holds 100 numbers.
  2. Enter 5 for how many numbers, and choose "Each number at most once" for repeats.
  3. The tool makes five draws; each time it picks one of the numbers still available and removes it from the pool.
  4. Choose "In draw order" to keep the order the numbers came out, or "Ascending" to list them from smallest to largest.

Result: Each run gives five different whole numbers between 1 and 100. Which numbers come out cannot be predicted, so no sample result in this guide is a value to expect.

🎲 Random Number Generator

Free, no sign-up; your data stays in your browser.

Open the calculator →

How to read the result

A random draw looks fair only if the process is open. Record the entry list before drawing, publish the result and confirm the winner against the original entries. The tool only produces numbers; if you run a legally regulated raffle or lottery, check the rules that apply to it. This is general information.

Common mistakes

  • Treating a sorted list as random: sorting only changes how the numbers are displayed; it does not make the draw more predictable.
  • Allowing repeats in a prize draw: the same entry should not win twice, so choose "Each number at most once".
  • Entering the wrong range: using 0 instead of 1 as the minimum adds a number that is not in your entry list.
  • Asking for more unique numbers than the range holds: drawing 10 distinct numbers needs a range of at least 10 values, or the tool returns an error.
  • Comparing a result with a pre-written list: examples in a guide only show the method; every real draw is generated fresh.

Frequently asked questions

Are these numbers truly random?

They come from the browser's cryptographically secure generator (crypto.getRandomValues) and are chosen without bias using rejection sampling. This is far more reliable than an ordinary Math.random call.

Why use a no-repeat draw for a raffle?

If a number repeats, one entry would be selected twice. The no-repeat mode picks each number only once, which matches how most prize draws work.

Are the numbers sent to a server?

No. The numbers are generated in your browser and are not sent anywhere. For transparency, still record the result and publish it.

Will I get the same numbers if I run it again with the same settings?

No. Each run draws new random bits, so the results differ. That unpredictability is the point of the draw.

The result is not exact or binding and is for information only; it is not an official document and cannot be used in official procedures. Confirm it with the competent authority or a professional before acting; no liability is accepted for losses arising from its use.

Sources

Choose your cookie preference to continue

Records the site needs to work (theme, language, favourites) stay in your browser.

This site is free and funded by ads.

With your consent, Google Analytics cookies measure visits and Google AdSense cookies are used to show ads; the data is processed on Google servers abroad.

If you reject, the site works just the same.

Cookie Policy · KVKK notice