Random Number Generator

Pick a range and how many numbers you need, decide whether repeats are allowed, and get fair, unbiased random numbers instantly.

0 gives whole numbers.
Possible values
100
Chance of this value
1 in 100
Random number (1 to 100)97
  • Drawn with your browser’s cryptographic random generator; every value in the range is equally likely.

A random number generator should do one thing well: give every value in your range the same chance, every time. This one draws from your browser’s cryptographic random source and converts each draw to your range without bias, so it is fair enough for raffles, classroom picks, sampling and games. Choose a range, choose how many numbers, and decide whether a number may come up twice.

How to use the random number generator

  1. Enter the minimum and maximum. Both ends are included, so 1 to 100 can return 1 or 100.
  2. Enter how many numbers you need, up to 10,000 at a time.
  3. Set decimal places to 0 for whole numbers, or 1–6 for decimals.
  4. Choose an order: as drawn, smallest to largest, or largest to smallest.
  5. Tick No repeats if each number may appear only once, then press Generate.

The tape shows the result plus the smallest and largest values drawn, the sum and the average. For longer lists, every number appears below the calculator with a comma-separated copy ready to paste.

How fair random numbers are made

The generator first counts how many values your range holds:

N = max − min + 1  ·  P(any one value) = 1 ÷ N

It then takes a random 32-bit integer from crypto.getRandomValues. A naive tool would compute random mod N, but unless N divides 2³² exactly, the smallest values would come up slightly more often — a flaw called modulo bias. To avoid it, draws that land in the uneven leftover zone at the top of the 32-bit range are thrown away and redrawn. This is called rejection sampling, and it guarantees each value has probability exactly 1 ÷ N. Ranges wider than 2³² values use a 53-bit draw with the same rule.

For lists without repeats, the tool runs a partial Fisher–Yates shuffle over the whole range, the textbook method that makes every possible ordered selection equally likely.

Repeats or no repeats?

When repeats are allowed, each draw is independent, and duplicates turn up sooner than most people expect. The chance that k draws from N values are all different is

P(no repeat) = N × (N − 1) × … × (N − k + 1) ÷ Nk
Draws from 1–100 Chance of at least one repeat
5 9.7%
10 37.2%
12 49.7%
20 87.0%

That is the same arithmetic as the classic birthday problem. If a repeat would be a problem — raffle winners, seat assignments, a random order of students — tick No repeats.

Worked example: a raffle with 250 tickets

Tickets are numbered 1 to 250 and you need three winners.

  • Set minimum 1, maximum 250, how many 3, and tick No repeats.
  • Each ticket’s chance of winning one of the three prizes is 3 ÷ 250 = 1.2%.
  • There are 250 × 249 × 248 = 15,438,000 possible ordered draws, all equally likely.

Read the winners in draw order if first, second and third prizes differ, or sort them if order does not matter.

Decimal and very large ranges

With decimal places turned on, the generator picks from an evenly spaced grid. Between 1 and 2 with one decimal place, that grid has 11 values (1.0, 1.1, … 2.0). Wide ranges are fine too: 1 to 1,000,000,000,000 works, and every one of the trillion values is equally likely.

When to use a different tool

For a number between 1 and 10 or 1 and 100 in one click, use the 1–10 generator or the 1–100 generator. To pick from a list of names, use the random name picker; for dice notation such as 3d6, try the dice roller. Passwords deserve a dedicated password generator that mixes character types.

Results are random every time and cannot be predicted or reproduced. Keep a copy of any list you need, such as raffle results, before generating a new one.

Frequently asked questions

Is this random number generator truly random?

It uses crypto.getRandomValues, the cryptographically secure generator built into every modern browser, which is seeded from your device's hardware entropy. Each draw is mapped to your range with rejection sampling, so every value is exactly equally likely.

How do I generate random numbers without repeats?

Tick 'No repeats' before pressing Generate. The tool then draws like pulling numbered balls from a bag without putting them back, so each value appears at most once. You cannot ask for more unique numbers than the range contains.

Can I get random decimals instead of whole numbers?

Yes. Set Decimal places to anything from 1 to 6. With 2 decimal places between 0 and 1 the generator picks evenly from the 101 values 0.00, 0.01, … 1.00.

Can I use negative numbers?

Yes. Any minimum and maximum work as long as the minimum is not larger than the maximum, for example −50 to 50. The range can be as wide as about ±9 quadrillion.

Are my numbers stored anywhere?

No. The numbers are generated in your browser and are not sent to a server. Copy them from the list below the result before you generate again.

Last reviewed October 2026 by the CalcFluent editorial team. How we check our calculators.