Random Number Generator

Free random number generator: pick random numbers in any range, choose how many, allow or block duplicates, sort them, and get the sum and average.

Quick presets

Did this calculator solve your problem today?

Contributor

Reviewed by

Free Random Number Generator

Pick a random number — or a whole batch — in any range you choose. Set the minimum and maximum, decide how many numbers you want, allow or block duplicates, choose integers or decimals, and sort the results. Every number is drawn with your browser's cryptographically secure randomness, so the picks are unbiased and unpredictable. Nothing is stored, and you can copy the results or export them as CSV.

How Random Number Generation Works

A random number generator picks values from a range so that every outcome is equally likely. Computers do this with a random number generator function; a cryptographically secure one (CSPRNG) is unbiased and hard to predict, which is why this tool uses your browser's crypto.getRandomValues with rejection sampling instead of the ordinary Math.random(). To pick an integer, it scales a uniform random value to your range, as shown below.

Random number

n = min + ⌊r × (max − min + 1)⌋, where r is a uniform random value in [0, 1)

How to Generate Random Numbers

1

Set the minimum and maximum of your range.

2

Choose how many numbers to generate.

3

Pick integers or decimals, and whether duplicates are allowed.

4

Optionally sort the results ascending or descending.

5

Read your numbers, tap Generate for a fresh set, or copy and export them.

When to Use a Random Number Generator

Raffles & giveaways

Draw unique winning numbers fairly and transparently.

Lottery picks

Generate unique numbers within your lottery's range, sorted for easy entry.

Games & dice

Roll dice or pick a number for board games, classrooms, and parties.

Sampling & testing

Produce a batch of random values for research, surveys, or QA.

Decision making

Let a random number settle a choice when you cannot decide.

Teaching probability

Demonstrate randomness and distributions with live examples.

Why Use Our Random Number Generator?

Truly unbiased & secure

Uses your browser's cryptographic randomness (crypto.getRandomValues) with rejection sampling, not the biased Math.random().

Any range, any count

Pick a single number or up to 1,000 at once, between any minimum and maximum you set.

Unique or repeating

Draw without repeats for raffles and lotteries, or allow duplicates when you need them.

Integers or decimals

Choose whole numbers, or decimals to the precision you need (up to 10 places).

Sort and see stats

Sort ascending or descending, and get the sum, average, minimum and maximum of your set.

Free, private, instant

Everything runs in your browser. Nothing is stored — copy the results or export them as CSV.

Random Number Generator FAQ

Set a minimum and maximum, choose how many numbers you want, and the generator picks values where every number in the range is equally likely.

They use your browser's cryptographically secure generator (CSPRNG), which is unbiased and unpredictable for everyday and most security uses. Some physical applications prefer hardware or atmospheric sources, but a CSPRNG is more than enough here.

Turn off Allow duplicates. The generator then draws without replacement, so every number in the result is unique.

Yes. Switch the number type to Decimal and choose how many decimal places you want, up to 10.

Up to 1,000 numbers per set. You can copy them all with one click or download them as a CSV file.

Yes. Both the minimum and the maximum value can appear in the results.

With duplicates turned off, you cannot draw more unique numbers than exist in the range, so the count is automatically capped to the range size.

Yes. Everything runs locally in your browser. Nothing you generate is stored, logged, or sent to a server.