Home / Statistics & Probability / Random Number Generator
STATISTICS & PROBABILITY RANDOMNESSRandom Number Generator
Generate random numbers in any range — one at a time or a thousand at once — drawn from your browser's cryptographic random source, so every value is exactly as likely as every other. No duplicates when you need a fair draw, decimals when you need fractions, and an optional seed when a draw must be reproducible.
Your Random Draw
Both ends of the range are included: 1 to 100 can give 1 and 100. Numbers come from the cryptographic random source built into your browser — the same one password managers use — mapped onto your range without bias.
Everything is generated on your device. Nothing you enter — or draw — is stored or sent anywhere.
Quick Answer
Quick answer: set a minimum of 1 and a maximum of 100, ask for one number, and Generate — you get one value, drawn fresh, with every number from 1 to 100 exactly equally likely. Need a fair draw instead? Tick No duplicates, ask for as many numbers as there are winners, and sort them: that is a raffle, a lottery pick and a random sample in three clicks.
How to Use the Random Number Generator
- Set the range. Minimum and maximum are both included — 1 to 100 means 100 possible values. Negative ranges and ranges crossing zero work too.
- Choose how many — from 1 to 1,000 numbers in a single draw — and whether you want whole numbers or decimals (with up to 6 decimal places).
- For draws and samples, tick No duplicates so no value can appear twice; sort the results if you want them in order rather than in draw order.
- Optionally add a seed — a word or phrase. The same seed with the same settings always produces the same list, which is what lessons, tests and reproducible sampling need.
- Copy the list with one click, or just press Generate again for a fresh draw.
How the Generator Works
Every draw starts from crypto.getRandomValues — the cryptographic random source built into your browser, fed by your operating system's entropy (the same source password managers and secure connections rely on). It is deliberately not Math.random, which is a fast, predictable sequence designed for games and animations, not for fair draws.
Turning a raw random value into "a number from 1 to 100" hides a trap. The naive shortcut — divide and take the remainder (the modulo operation) — quietly favours some values over others whenever the range does not divide the source evenly. This generator uses rejection sampling instead: draws that fall in the leftover, uneven tail are thrown away and re-drawn, so every value in your range has exactly the same probability. The cost is an occasional discarded draw; the benefit is a draw you cannot accuse of bias.
With No duplicates ticked, the generator draws without replacement — a partial shuffle of the range for ordinary spans, and rejection against a drawn-so-far set for very wide ones. Either way, every possible selection of that size is equally likely.
Duplicates: When They Matter
With duplicates allowed, each number is drawn independently — which means repeats are not a malfunction, they are arithmetic. Five numbers drawn from 1 to 100 already carry about a 10% chance of containing a repeat, and thirty draws from 1 to 1,000 collide about a third of the time. It is the birthday effect: collisions depend on the pairs among your draws, and pairs grow much faster than the draw count.
- Duplicates are correct for dice rolls, coin flips, simulations and experiments — each event really is independent, and forbidding repeats would falsify the model.
- Duplicates are a bug for raffle winners, lottery picks, random samples, seat or team assignments and test-data IDs — tick No duplicates, and the generator will refuse the impossible case (asking for more unique numbers than the range holds) instead of looping forever.
Presets and Everyday Uses
| Use | Settings |
|---|---|
| Lottery picks (6 from 49) | 1–49, 6 numbers, No duplicates, sorted |
| Raffle or giveaway winners | 1 to the number of entrants, as many numbers as prizes, No duplicates |
| Dice substitute | 1–6, duplicates allowed (or 1–20 for a d20) |
| Random sample from a spreadsheet | 1 to the last row number, No duplicates, as many as you need |
| Classroom cold-calling | 1 to the class size, 1 number per question |
| Test data and simulations | Any range, decimals mode for measurements, a seed when the run must be repeatable |
The four preset buttons above the form load the common cases — lottery, dice, coin flips, a single 0–100 pick — and draw immediately.
Seeded Draws: Random, but Reproducible
Leave the seed empty and every draw is fresh and unpredictable. Type any word or phrase as a seed and the generator switches to a deterministic sequence (a mulberry32 generator started from a hash of your seed): the same seed with the same settings produces the same list, every time, on any device.
That sounds like the opposite of random, and for a raffle it would be — never run a real draw on a seed you chose or shared in advance. But reproducibility is exactly what some work needs: a teacher who wants the whole class to draw the same "random" sample, a test that must feed a program identical data on every run, a simulation a colleague must be able to repeat and check. The draw is labelled as seeded whenever one is used, so the two modes can never be confused.
Are the Numbers Really Random?
Honestly stated: they are cryptographically secure pseudorandom numbers. A program generates them, but the program is seeded from your operating system's entropy pool — mouse timings, system noise, hardware events — and its output passes the statistical tests that distinguish randomness from pattern. Nobody, including this page, can predict the next number of an unseeded draw.
What they are not is true randomness harvested from a physical process (atmospheric noise, radioactive decay), and they are not a certified draw. For games, raffles among friends, sampling, teaching and testing, cryptographic pseudorandomness is the right tool — it is what banks use to generate session keys. For a regulated lottery, a legal sweepstake or an audit, you need an independently witnessed, certified provider instead. The generator says so here rather than overselling itself.
Common Mistakes to Avoid
- Expecting no repeats by default. Independent draws repeat — about 10% of the time even for 5 numbers from 1–100. If a repeat would break your draw, tick No duplicates.
- Assuming a "balanced" short run. Ten coin flips landing 7–3 is unremarkable; randomness evens out over thousands of draws, not over ten. A streak is not evidence the generator is broken.
- Using a seed for a real draw. A seeded draw is reproducible by anyone who knows the seed — the opposite of a fair public draw. Seeds are for lessons and tests.
- Reading meaning into a lottery pick. Every combination is equally likely: 1, 2, 3, 4, 5, 6 has exactly the same chance as any scattered set. (It is only a worse bet because many people pick it and would share the prize.)
- Asking for more unique numbers than exist. A range of 1–5 holds five values; six unique draws are impossible, and the generator will tell you so rather than hang.
What This Generator Does Not Do
- It is not a certified or witnessed draw service — for regulated lotteries, sweepstakes or audits, use a certified provider.
- It does not pick from names or lists of words — it works on numeric ranges (number your entrants 1 to N and draw numbers).
- It does not roll dice with dice notation (2d6+3, exploding dice) — a dedicated dice roller handles those; here, a die is simply the range 1 to 6.
- It does not generate passwords — random characters need a password generator with its own rules.
- Draws are capped at 1,000 numbers and ranges at about 9 quadrillion values wide.
Frequently Asked Questions
Quick answers about random numbers — duplicates, seeds, fairness, and what this generator should and should not be used for. Tap a question to open it.
How does a random number generator work?
This one asks your browser for cryptographic random values (crypto.getRandomValues, fed by your operating system’s entropy) and maps them onto your range with rejection sampling: draws landing in the uneven leftover tail are discarded and re-drawn, so every value in the range is exactly equally likely. That last step matters — the common modulo shortcut quietly favours some numbers over others.
Can the same number appear twice?
Yes, when duplicates are allowed — each draw is independent, like separate dice rolls. Tick “No duplicates” and the generator draws without replacement instead, so every number in the batch is different. That is the mode to use for raffles, lottery picks and random samples.
How do I pick lottery numbers?
Set the minimum and maximum to the game’s range (1 and 49 for a typical 6-from-49 game), set the count to the number of balls (6), tick No duplicates and sort smallest first. One honest warning: every combination is exactly equally likely, so a generated set has the same chance as any set you choose yourself — the generator cannot improve your odds, only make the picking fair and quick.
What does the seed do?
It makes the draw reproducible. With a seed, the generator runs a deterministic sequence started from a hash of your seed text, so the same seed and settings always produce the same list — on any device. That is what you want for a classroom exercise, a software test or a simulation a colleague needs to repeat. Never use a seed for a real raffle: anyone who knows it can reproduce (and predict) the draw.
Are these numbers truly random?
They are cryptographically secure pseudorandom numbers: produced by an algorithm, but one seeded from real system entropy and unpredictable in practice — the same class of randomness used for secure connections and password managers. They are not harvested from a physical process, and the draw is not independently certified, so do not use this page for regulated lotteries, legal sweepstakes or audits.
Why do duplicates turn up so often?
Because of the birthday effect. Collisions depend on how many pairs your draw contains, and pairs multiply fast: 5 numbers from 1 to 100 already have about a 10% chance of a repeat somewhere, and by 23 draws from 1 to 365 (birthdays) a shared value is more likely than not. A repeat in a small batch is normal arithmetic, not a faulty generator.
Can I generate decimal numbers?
Yes. Switch the number type to Decimals and choose 0 to 6 decimal places; the generator draws evenly across the range and rounds to your chosen precision. Note that uniqueness cannot be guaranteed for decimals — they are drawn independently, so the No duplicates guarantee applies to whole numbers.
What are the limits of this generator?
Up to 1,000 numbers per draw, and ranges up to about 9 quadrillion (9 × 10^15) values wide — far beyond any everyday use. In No duplicates mode the count also cannot exceed the number of values in the range; the generator checks and tells you instead of running forever.
Does this generator use Math.random?
No. Math.random is a fast pseudorandom sequence meant for games and animation; it is predictable enough that it should not decide anything that matters. This generator uses crypto.getRandomValues — the browser’s cryptographic source — and rejection sampling rather than the biased modulo shortcut, so its draws are both unpredictable and unbiased.
Related Calculators
More free calculators on MyDayCalculator:
- GPA Calculator — weighted averages for school grades.
- Age Calculator — your exact age in years, months and days.
- Probability Calculator
- Combination Calculator
- Statistics & Probability Calculators
Your privacy: everything is generated on your device. The generator does not store or send your settings, seeds or results anywhere.
A quick note: randomness feels wrong surprisingly often — streaks and repeats are what honest randomness looks like up close. Judge a generator by its method, not by whether a short run "looks random".
Last reviewed: November 2026.
