Random Number Generator
A random number generator picks numbers so that every allowed value has the same chance. For whole numbers from 1 to 100 there are 100 − 1 + 1 = 100 possible values, so each one has a 1 in 100 (1%) chance on every draw. Picking 6 different numbers from 1 to 49 gives 13,983,816 possible sets.
Uses your browser’s crypto generator
How these were made
- Count the possible values: 100 − 1 + 1 = 100.
- The browser’s crypto.getRandomValues gives a random 32-bit whole number x from 0 to 4,294,967,295, so 4,294,967,296 values in all.
- 4,294,967,296 ÷ 100 leaves a remainder of 96. If every x were used, the first 96 values would come up slightly more often. So any x of 4,294,967,200 or more is thrown away and drawn again (rejection sampling). That happens with a chance of 96 in 4,294,967,296.
- Take the remainder x mod 100, a number from 0 to 99, and add 1. Every value now has exactly 42,949,672 ways to occur, so each has a chance of exactly 1 in 100.
- For no repeats, each value drawn is taken out of the pool before the next draw (a partial Fisher–Yates shuffle), so every remaining value always has the same chance. It is the same as drawing numbered balls from a bag without putting them back.
How to use the random number generator
- Pick a tab: Whole numbers for integers in a range, Decimals for numbers with decimal places or a bell curve, Lottery picks for sets of balls, or Pick from a list to choose winners or shuffle names.
- Enter the lowest and highest numbers. Both ends are included, and negative numbers work.
- Choose how many numbers you want, whether repeats are allowed, and the order: as drawn, smallest first or largest first.
- Press Generate. Use Copy results to paste the numbers with commas, spaces or one per line.
- Open How these were made for the exact method, and read the distribution check below the results.
How a random number in a range is made
To pick a whole number from min to max, first count the possible values: n = max − min + 1. Then take a random whole number x, find its remainder after dividing by n (written x mod n, a number from 0 to n − 1) and add min.
That last step hides a trap called modulo bias. Suppose x came from a single byte, with 256 equally likely values, and you wanted 1 to 100. Since 256 = 2 × 100 + 56, the remainders 0 to 55 each come from 3 values of x, but the remainders 56 to 99 come from only 2. The low numbers would be 1.5 times as likely as the high ones.
This generator uses 32-bit numbers, with 4,294,967,296 possible values. That count is not a multiple of 100 either: it leaves a remainder of 96. So any x of 4,294,967,200 or more is thrown away and drawn again. This is called rejection sampling. Afterwards every number from 1 to 100 comes from exactly 42,949,672 values of x, so each has a chance of exactly 1 in 100.
Repeats allowed or no repeats
With repeats allowed, every draw is independent, like rolling a die again and again. With no repeats, each number drawn is removed from the pool, like drawing numbered balls from a bag without putting them back. You cannot draw more numbers without repeats than the range holds.
Repeats show up sooner than most people expect. Draw 10 numbers from 1 to 100 with repeats allowed, and the chance that all 10 are different is (100 × 99 × … × 91) ÷ 10010 ≈ 0.6282. So about 37.18% of the time at least two numbers match. This is the same math as the birthday problem.
Pseudo-random vs. true random numbers
Computers make random numbers in two ways. A pseudo-random number generator (PRNG) uses a formula. RANDOM.ORG’s introduction to randomness describes PRNGs as efficient, deterministic (a sequence can be replayed if you know where it started) and periodic (the sequence eventually repeats, though modern periods are far too long to matter). A true random number generator measures a physical process; RANDOM.ORG uses atmospheric noise. True generators are slower and cannot replay a sequence.
NIST’s guidance on random bit generators covers both parts in its SP 800-90 series: deterministic generators (SP 800-90A) and the entropy sources that feed them unpredictable input (SP 800-90B).
This page uses your browser’s crypto.getRandomValues. MDN Web Docs explains that browsers implement it with a pseudo-random generator seeded with enough entropy, suitable for cryptographic purposes. In plain terms, the numbers are not “true” physical randomness, but nobody can predict them in practice, and they are far stronger than the everyday Math.random. For a draw that has official rules, such as a state lottery or a regulated raffle, use the method those rules require.
Decimals and bell-curve numbers
With 2 decimal places, the numbers from 0 to 1 form a grid of 101 values: 0.00, 0.01, …, 1.00. The generator picks one grid point with equal chances, so both ends can appear.
The bell curve option draws from a normal distribution with the mean and standard deviation you choose, using the Box–Muller method. About 68% of values land within one standard deviation of the mean, about 95% within 1.96 standard deviations, and values beyond 3 standard deviations are rare. With mean 100 and standard deviation 15, about 68% of numbers fall between 85 and 115.
Lottery odds by format
Lottery picks use no repeats within a set. The number of possible sets is the combination count C(n, k), multiplied by the bonus-ball count when there is a separate bonus pool.
| Format | Possible sets | Chance of a full match |
|---|---|---|
| 3 from 1–10 | 120 | 1 in 120 |
| 4 from 1–20 | 4,845 | 1 in 4,845 |
| 6 from 1–49 | 13,983,816 | 1 in 13,983,816 |
| 5 from 1–50 + 2 from 1–12 | 2,118,760 × 66 | 1 in 139,838,160 |
| 5 from 1–69 + 1 from 1–26 | 11,238,513 × 26 | 1 in 292,201,338 |
| 5 from 1–70 + 1 from 1–25 | 12,103,014 × 25 | 1 in 302,575,350 |
Every set is equally likely, whether it is 1 2 3 4 5 6 or a mix of birthdays. Formats here are examples only; lotteries change their rules, so check the official game rules. The permutations and combinations calculator shows how C(n, k) is worked out.
The distribution check
Below the results, the generator draws thousands of fresh numbers from your range and counts them in up to 20 groups. A fair generator puts about the same count in each group, but never exactly. With 10,000 draws in 20 equal groups, each group expects 500, and a typical gap is about √500 ≈ 22, or roughly 4.5%.
The chi-square statistic adds up the gaps: χ² = Σ (observed − expected)² ÷ expected. For a fair generator it usually lands near the number of groups minus 1. The p-value will fall below 0.05 in about 1 run out of 20 purely by chance, which is why a single low p-value is not proof of bias. Try 100,000 draws to watch the bars even out.
Common mistakes with random numbers
- Thinking a number is “due.” Each draw is independent; past results do not change the next one.
- Forgetting the ends. 1 to 10 has 10 values, not 9.
- Using a plain remainder. x mod n is biased unless the bad values are rejected.
- Expecting no repeats. With repeats allowed, matches are common.
- Treating a sorted list as the draw order. Sorting changes only how the numbers are shown.
Sources
Checked November 2026.
- MDN Web Docs: Crypto.getRandomValues() method
- RANDOM.ORG: Introduction to Randomness and Random Numbers (Mads Haahr)
- NIST Computer Security Resource Center: Random Bit Generation (SP 800-90 series)
Random numbers practice quiz: 10 questions
Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.
Count with max − min + 1: 50 − 1 + 1 = 50. Forgetting the + 1 gives 49.
There are 20 equally likely values and 7 is one of them, so the chance is 1/20 = 5%.
C(49, 6) = 49! ÷ (6! × 43!) = 13,983,816. 10,068,347,520 counts ordered draws, which is 720 times larger.
256 = 2 × 100 + 56, so remainders 0 to 55 each come from 3 values (10, 110 and 210). Remainders 56 to 99 come from only 2. This unevenness is modulo bias.
10 choices for the first, 9 for the second and 8 for the third: 10 × 9 × 8 = 720. With repeats allowed it would be 10³ = 1,000.
Each draw is independent, so the chance stays 1/2. 1/32 is the chance of the 5 heads in a row before they happened.
Each number has a 1 in 20 chance, so the expected count is 10,000 ÷ 20 = 500. Real counts wobble around 500.
40 to 60 is within one standard deviation of the mean, which holds about 68% of a normal distribution.
Quiz complete
Frequently asked questions
Is this random number generator truly random?
It uses a cryptographically secure pseudo-random generator built into your browser, seeded from unpredictable data on your device. The numbers cannot be predicted in practice, but they are not physical "true" randomness like atmospheric noise.
How do I pick a random number between 1 and 10?
Set the lowest number to 1, the highest to 10 and how many to 1, then press Generate. Each number from 1 to 10 has a 1 in 10 chance.
What does "no repeats" mean?
Each number can appear at most once, as if drawn from a bag without putting it back. Ten numbers from 1 to 10 with no repeats is a shuffle of 1 to 10.
Can random lottery numbers improve my chances?
No. Every set has the same chance. With 6 numbers from 1 to 49, any one ticket has a 1 in 13,983,816 chance of matching all six.
How do I pick a random winner from a list of names?
Open Pick from a list, paste the names one per line or separated by commas, set how many winners and press Generate. Each name has the same chance, and no name can win twice.
Related calculators
Related to This Article
More math articles
- SBAC Algebra 1 Free Worksheets: Free Printable Smarter Balanced Algebra 1 Practice with Keys
- 4th Grade Common Core Math Practice Test Questions
- Coordinate Planes as Maps
- Matrix Calculator (Add, Multiply, Determinant & Inverse)
- How to Find the Period of a Function: Rules and Examples
- The Nature of Science
- The Best Grade 7 ELA Practice Tests for Michigan Students
- 7th Grade MCA Math Worksheets: FREE & Printable
- What is the Median of a Triangle?
- Suffixes and Word Families: How Endings Change Meaning


What people say about "Random Number Generator: 1-100, No Repeats, Lottery, List"?
No one replied yet.