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.

What do you want to generate?

Uses your browser’s crypto generator

Both ends are included: 1 to 100 can give 1 and 100. Negative numbers work too.
Repeats
10 random numbers
10 random whole numbers from 1 to 100, no repeats.

301313821343911253
Smallest1
Largest53
Mean of these24.2
Mean if perfectly even50.5
Possible values100
Chance of each value1 in 100
How these were made
  1. Count the possible values: 100 − 1 + 1 = 100.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
Computers make random numbers in two ways. A pseudo-random generator uses a formula, so the same starting seed always replays the same sequence. A true random generator measures a physical process, such as atmospheric noise. This page uses your browser’s cryptographically secure pseudo-random generator, which is seeded from unpredictable system data and cannot be predicted in practice.
Distribution check
1 to 5: 501 drawn, 500 expected6 to 10: 468 drawn, 500 expected11 to 15: 476 drawn, 500 expected16 to 20: 506 drawn, 500 expected21 to 25: 478 drawn, 500 expected26 to 30: 526 drawn, 500 expected31 to 35: 474 drawn, 500 expected36 to 40: 516 drawn, 500 expected41 to 45: 538 drawn, 500 expected46 to 50: 456 drawn, 500 expected51 to 55: 484 drawn, 500 expected56 to 60: 493 drawn, 500 expected61 to 65: 514 drawn, 500 expected66 to 70: 479 drawn, 500 expected71 to 75: 498 drawn, 500 expected76 to 80: 502 drawn, 500 expected81 to 85: 544 drawn, 500 expected86 to 90: 514 drawn, 500 expected91 to 95: 492 drawn, 500 expected96 to 100: 541 drawn, 500 expected
1 to 596 to 100
Count drawnExpected if perfectly even
10,000 fresh draws from your range, counted in 20 groups. The largest gap between a bar and its expected count is 8.8%. χ² = 23.872 with 19 degrees of freedom (p = 0.201). For a fair generator χ² is usually near 19, and p is below 0.05 about 1 run in 20 just by chance, so one low p is not a warning sign. Bars even out as you add draws.
Numbers come from your browser’s crypto.getRandomValues, a cryptographically secure pseudo-random generator seeded from unpredictable data your device collects. Nothing is sent to a server. For a lottery, raffle or other draw with rules, use the official method the rules require.

How to use the random number generator

  1. 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.
  2. Enter the lowest and highest numbers. Both ends are included, and negative numbers work.
  3. Choose how many numbers you want, whether repeats are allowed, and the order: as drawn, smallest first or largest first.
  4. Press Generate. Use Copy results to paste the numbers with commas, spaces or one per line.
  5. 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.

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.

Question 1 of 10
1. How many whole numbers are there from 1 to 50, including both ends?

Found a mistake? Let us know!

2. A fair generator picks a whole number from 1 to 20. What is the chance it picks 7?

Found a mistake? Let us know!

3. How many whole numbers are there from −5 to 5, including both ends?

Found a mistake? Let us know!

4. How many different sets of 6 numbers can be chosen from 1 to 49 when order does not matter?

Found a mistake? Let us know!

5. A generator takes a random byte (256 equally likely values) and uses its remainder after dividing by 100. How many byte values give a remainder of 10?

Found a mistake? Let us know!

6. You draw 3 numbers from 1 to 10 with no repeats. How many different ordered results are possible?

Found a mistake? Let us know!

7. A fair coin generator gave heads 5 times in a row. What is the chance of heads on the next flip?

Found a mistake? Let us know!

8. You draw 10,000 numbers from 1 to 20. About how many times do you expect each number?

Found a mistake? Let us know!

9. Normal random numbers have mean 50 and standard deviation 10. About what share falls between 40 and 60?

Found a mistake? Let us know!

10. With 2 decimal places, how many values are on the grid from 0 to 1, including both ends?

Found a mistake? Let us know!

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

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

No one replied yet.

Leave a Reply