Skip to content
MoneyDeck

Random Number Generator

Pick one or up to 1,000 random numbers in any range, with or without repeats

Updated · Free, no signup

Random number(s)

18

Numbers generated

1

Possible values in range

100

Chance of any one value (per draw)

1%

Expected average

50.5

Possible distinct sets (order ignored)

100

Sum of results

18

How the results are spread across the range

About the Random Number Generator

This random number generator (RNG) picks numbers between any minimum and maximum you choose — 1 to 10, 1 to 100, 1 to 1,000,000 or even negative and decimal ranges. Ask for a single number to settle a “pick a number” game, or generate up to 1,000 at once for raffle tickets, sampling, test data, bingo calls or classroom activities.

Turn off repeats to get unique numbers, which is how raffles and lotteries draw: every number can appear at most once. You can also sort the results, choose up to four decimal places, and see the odds behind the draw — the chance of any particular number, the expected average and how many different sets are possible.

Numbers come from the browser’s cryptographically secure generator (Web Crypto), so every value in the range is equally likely. Type a seed if you need the same list again later, for example to reproduce a sample in a spreadsheet or show how a winner was chosen.

How to use the random number generator

  1. 1Enter the lowest and highest numbers you want (both are included).
  2. 2Choose how many numbers to generate, up to 1,000.
  3. 3Switch on “No repeats” if every number must be different, as in a raffle.
  4. 4Pick decimal places and sort order if you need them.
  5. 5Copy the results; change any input (or the seed) to generate a new set.

Formula and method

N = (max − min) × 10^d + 1 · P(value) = 1 ÷ N · Sets = C(N, k) without repeats, C(N + k − 1, k) with repeats

The range is converted to whole steps of 10^−d (d = decimal places), giving N equally likely values. Each number is drawn as min + ⌊u × N⌋ steps, where u is a secure uniform random fraction, so every value has probability 1 ÷ N on each draw and the long-run average is the midpoint (min + max) ÷ 2.

With “No repeats” on, numbers are drawn without replacement using a partial Fisher–Yates shuffle, like balls leaving a lottery drum. The number of different sets you could get (ignoring order) is the binomial coefficient C(N, k); with repeats allowed it is the multiset count C(N + k − 1, k).

N
Number of possible values in the range
k
How many numbers are generated
d
Decimal places

Worked examples

Pick a number from 1 to 100

There are 100 whole numbers from 1 to 100, so each has a 1% chance. Over many draws the average result settles at (1 + 100) ÷ 2 = 50.5.

6 unique numbers from 1 to 49 (lottery style)

Drawing 6 different numbers from 49 can produce C(49, 6) = 13,983,816 different sets — the classic 1-in-14-million lottery odds. Each number has a 1 in 49 chance of being the first ball.

Random decimal between 0 and 1

With 2 decimal places the range 0.00–1.00 contains 101 values in steps of 0.01. Five are drawn with repeats allowed, and they average 0.5 in the long run.

Asking for more unique numbers than exist

Only 10 whole numbers exist from 1 to 10, so a no-repeat draw returns all ten in random order — there is exactly one possible set.

Frequently asked questions

How do I pick a random number between 1 and 10?+

Set the minimum to 1 and the maximum to 10 and leave “How many” at 1. Both ends are included, so each of the ten numbers has exactly a 10% chance.

Are these numbers truly random?+

They come from the Web Crypto API, a cryptographically secure pseudo-random generator seeded by your device’s hardware entropy. For games, draws and sampling they are indistinguishable from true randomness.

How do I generate random numbers without repeats?+

Switch on “No repeats”. Numbers are then drawn without replacement, like lottery balls, so each value appears at most once. You cannot ask for more unique numbers than the range contains.

What does the seed do?+

A seed makes the output repeatable: the same seed with the same settings always produces the same numbers. That is useful for reproducible samples; leave it blank for unpredictable results.

How do I generate a random number in Excel or Google Sheets?+

Use =RANDBETWEEN(1,100) for a whole number or =RAND() for a decimal between 0 and 1. Both recalculate every time the sheet changes, so paste values if you need them to stay fixed.

Can I generate negative or decimal random numbers?+

Yes. Enter a negative minimum such as −50, and choose 1 to 4 decimal places to draw values like 3.14 or −0.0725 in equal steps across the range.

Related tools