Skip to content

Random Number Generator

Generate random numbers with customizable range, duplicates, and sorting options

Calculator Details

Generated Numbers:10 numbersSee results ↓

Standard uses your range; dice rolls 1 to 6; coin flips heads (1) or tails (0)

The lowest number that can be drawn

The highest number that can be drawn

Number of random numbers to draw

Whether the same number can come up more than once

Show the numbers smallest first

Draw #1. Sharing the link shares this exact draw.

Your Results

Generated Numbers: 10 numbers

Generated Numbers

10 numbers

Range: 1 to 100

Generated Numbers

68
34
88
22
4
53
65
21
85
18

Detailed Breakdown

Your draw
SettingValue
ModeNumbers in a range
Range1 to 100
Possible values100
How many drawn10
DuplicatesAllowed (numbers can repeat)
OrderAs drawn
Seed (reproduces this draw)1

How This Calculator Works

How Random Number Generation Works

Each draw starts from a 32-bit seed chosen with your browser's secure random generator (crypto.getRandomValues) when you press Generate. A fast pseudo-random generator (mulberry32) turns the seed into numbers, so the same seed and settings always give the same draw.

Your draw: 10 numbers from 1 to 100
Range size = 100 − (1) + 1 = 100 possible values
Each number has a 1 in 100 chance of each value

Random Number Formula

Random integer = min + (r mod range size)
r is a random 32-bit value; values of r above the largest multiple of the range size are thrown away and redrawn, so every number is equally likely

Example: range 1 to 100, r = 3,141,592,653 → 1 + (3,141,592,653 mod 100) = 1 + 53 = 54

Unique Numbers (Fisher-Yates Shuffle)

When "no duplicates" is selected, the generator runs the first steps of a Fisher-Yates shuffle: each pick swaps a random remaining value to the front, so values are drawn without replacement like cards from a deck. Only swapped positions are stored, so even a range of two million values is instant.

Frequently Asked Questions

Why does a shared link show the same numbers?

The link stores the draw’s seed along with the range and options, so whoever opens it sees exactly the numbers you saw. That makes a draw easy to verify. Press “Generate new numbers” for a fresh, unpredictable draw.

How random are the generated numbers?

Each press of Generate picks a seed with crypto.getRandomValues(), the browser’s cryptographically secure generator, and a well-tested pseudo-random generator (mulberry32) expands it into numbers. That is fair for games, classroom picks, raffles and simulations. It is not meant for passwords or cryptographic keys, because anyone with the link (which contains the seed) can reproduce the draw.

What is the difference between duplicates allowed vs. unique numbers?

With duplicates allowed, each number is generated independently, so the same number can appear multiple times (like rolling a die multiple times). With unique numbers, each generated number is different, ensuring no repeats (like drawing cards from a deck without replacement).

Can I generate more unique numbers than my range allows?

No. If your range is 1-10 (10 possible values), you can generate at most 10 unique numbers. Requesting more will produce an error. With duplicates allowed, you can generate any count regardless of range size.

What does sorting do to my random numbers?

Sorting arranges your generated numbers in ascending order (smallest to largest). This is useful when you want to see patterns or need ordered results, like lottery numbers. The numbers are still randomly generated; sorting just organizes them afterwards.

Can it roll dice or flip a coin?

Choose Dice in the Mode menu to roll six-sided dice (1 to 6), or Coin to flip coins: each flip shows Heads or Tails and the result counts how many of each. Standard mode uses any range you type (including negative numbers). In every mode you can draw many at once, and the unique and sort options still apply.

Can I use negative numbers in my range?

Yes! You can use any integer range, including negative numbers. For example, -50 to 50 generates numbers from negative fifty to positive fifty, including zero. The range size is calculated correctly: -50 to 50 has 101 possible values.

What is the maximum count of numbers I can generate?

You can generate up to 10,000 numbers in a single request. This limit prevents performance issues while still allowing most use cases. If you need more numbers, generate multiple batches or consider using a programming script for very large datasets.

Whole numbers from -1,000,000 to 1,000,000, up to 10,000 per draw. Seeds come from crypto.getRandomValues; numbers come from a seeded pseudo-random generator so links reproduce a draw. Not suitable for passwords, keys or regulated lotteries. Decimals and weighted draws are not included.

Random Number Generator: How the Draw Works and When to Trust It

By FindMySum · Last reviewed

A random number generator picks whole numbers from a range so that every value has the same chance of coming up. This one draws up to 10,000 numbers between −1,000,000 and 1,000,000, with or without repeats, and every draw is reproducible from a seed stored in the page link. That combination matters: the numbers are unpredictable before you press Generate, but once drawn they can be checked by anyone you share them with. This article explains how the draw is made, which figures in the result are fixed by your settings, what the probabilities look like, and where the method stops being good enough.

How a draw is made

Step 1: a seed from a secure source

When you press Generate, the page asks your browser for a 32-bit number from crypto.getRandomValues, the Web Crypto function that draws on the operating system's cryptographically secure generator. That generator is seeded from physical sources of unpredictability inside the device, the same kind of entropy NIST's random bit generation standards are built around. The result, a whole number from 1 to 4,294,967,295, becomes the seed and is written into the URL as the draw number.

Step 2: expanding the seed

A small, well-tested pseudo-random algorithm called mulberry32 turns the seed into a stream of 32-bit values. Each value looks random and passes common statistical tests, but the stream is fixed by the seed. That is the point: the same seed and the same settings always give the same numbers, so a link shows the same draw on every device.

Step 3: fitting values into your range

Each 32-bit value r becomes a number in your range by

number = min + (r mod range size), where range size = max − min + 1.

A plain remainder would be slightly unfair. There are 4,294,967,296 possible values of r, and that total is rarely an exact multiple of the range size, so a few results would get one extra way to occur. For a range of 100, the leftover is 96 values, so the generator discards any r at or above 4,294,967,200 and draws again. That happens about twice in every 100 million draws, and it makes all 100 outcomes exactly equally likely. For the widest range allowed, 2,000,001 values, a plain remainder would make some numbers about 0.05% more likely than others; rejection removes that too.

Step 4: unique numbers

With duplicates off, the generator runs the first steps of a Fisher–Yates shuffle: for each pick it chooses a random position among the values not yet used and swaps it to the front, like drawing cards from a deck without putting them back. Only the swapped positions are stored, so even a two-million-value range needs no large list. Sorting, if you ask for it, happens after the draw and changes only the order shown.

Worked example: the calculator's defaults

The generator opens with a minimum of 1, a maximum of 100, 10 numbers, duplicates allowed, no sorting and seed 1.

  1. Range size = 100 − 1 + 1 = 100 possible values.
  2. Each number is drawn independently, so each has a 1 in 100 chance of being any particular value, on every draw.
  3. Seed 1 always produces the same ten numbers: 68, 34, 88, 22, 4, 53, 65, 21, 85, 18.

Those ten values are not special; they are simply what seed 1 gives with these settings, and pressing Generate replaces the seed with a fresh one. The deterministic parts of the result are the range size and the probabilities. Any one draw is only one sample.

A lottery-style draw

Change the settings to 6 numbers from 1 to 49, duplicates off and sorted, and keep seed 1. The generator returns 11, 14, 32, 38, 41, 49. With 49 values and 6 picks, there are 13,983,816 possible combinations, so any particular set, including this one, had a 1 in 13,983,816 chance. A set like 1, 2, 3, 4, 5, 6 is exactly as likely; it only looks less random.

Reading the result sensibly

Streaks and clusters are normal. Truly random sequences contain runs and gaps that look patterned. In ten draws from 1 to 100 there is about a 37% chance of at least one repeat, and about a 10% chance that any particular number you have in mind shows up at least once. People asked to invent random numbers tend to avoid repeats and spread values too evenly, which is one way faked data gets caught.

Small samples don't look uniform. Ten draws will not cover the range evenly. Generate a few hundred and the counts in each band of ten will even out, though never perfectly. The average calculator and standard deviation calculator are useful for checking: for a large uniform draw from 1 to 100 the mean should settle near 50.5.

Without replacement changes the odds as you go. With duplicates off, each pick removes a value, so later picks come from fewer options. Every set of numbers is still equally likely, which is what makes it suitable for choosing winners or a random sample.

When not to use it

This tool is built for games, classroom picks, simulations, random sampling and informal prize draws. It is not suitable for passwords, encryption keys or anything security-related, because the seed travels in the link and anyone who has it can reproduce the numbers. A 32-bit seed also limits a draw to about 4.3 billion possible starting points, far fewer than a security application needs. For those uses, the NIST SP 800-90 series describes the kind of generator required, and your operating system or a password manager provides one. Lotteries and contests regulated by law, such as those overseen by provincial lottery corporations, use certified equipment and audited procedures that a web page can't replace.

Using the result

For a survey or study sample, number your population list and draw without duplicates; the percentage calculator can then show what share of the population you sampled. To simulate dice, use 1 to 6 with duplicates on; for a coin, use 0 to 1. Whatever you draw, keep the link: it is the record that the draw happened the way you say it did.

More questions

What are the chances that a draw of 10 numbers from 1 to 100 contains a repeat?

About 37%, which surprises most people. The first number can be anything, the second must avoid one value, the third two values, and so on, so the chance of no repeat is 1 × 0.99 × 0.98 × … × 0.91, about 0.628. This is the birthday problem in miniature. If repeats would spoil your use, turn duplicates off rather than hoping they won't happen.

How do I run a fair prize draw with it?

Number the entries 1 to N in a list everyone can see, set the range to 1 to N, choose how many winners, and turn duplicates off so no one wins twice. Announce the settings before you press Generate, press it once, and share the resulting link: anyone who opens it sees the same draw, which shows it wasn't rerun until a favoured entry came up. Contests regulated by law may need a certified process instead.

What is modulo bias?

It is a small unfairness that appears when a random 32-bit value is reduced to a range by taking a remainder. Because 2^32 is not usually a multiple of the range size, some results get one extra way to occur. The generator avoids this by discarding the few raw values at the very top of the 32-bit range and drawing again, so every number in your range has exactly the same chance.

Can I generate decimal numbers or a weighted draw?

Not directly; the generator draws whole numbers with equal chances. For decimals, scale up and divide afterwards: draw from 0 to 1,000 and divide each result by 1,000 for three decimal places between 0 and 1. For a weighted draw, give heavier options more numbers, for example 1 to 3 for option A and 4 for option B to make A three times as likely.

What is the difference between pseudo-random and truly random numbers?

A pseudo-random generator is an algorithm: from a starting value it produces numbers that pass statistical tests for randomness but are completely determined by that start. A true random source measures a physical process such as electronic noise. This page combines the two: the browser's secure generator, which gathers physical randomness, picks the seed, and a fast algorithm expands it.

If I keep the seed but change the range, do I get related numbers?

The underlying 32-bit values stay the same, but each one is mapped into the new range by a remainder, so the numbers you see change in ways that are not easy to predict by eye. Changing the count keeps the start of the draw: with duplicates allowed, raising the count from 10 to 12 keeps the first 10 numbers and adds two more.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy