Skip to main content

Random Number Generator

Generate one or many random numbers in any range — with no-repeat and sort options

Range & Options

Numbers use your browser's cryptographically secure random generator. Turn on "no repeats" for draws like raffles or lotteries (the range must be at least as large as the count). Everything runs locally — nothing is sent to a server.

Quick summary

Set a minimum and maximum, choose how many numbers you want, and generate them instantly. Turn on 'no repeats' for draws like raffles and lotteries (the range must be at least as big as the count), and 'sort' to list them in order. Numbers use your browser's cryptographically secure random generator, so results are genuinely unpredictable — and everything runs locally, nothing is sent to a server.

Reviewed by Simple Calculators TeamLast reviewed

How to use this calculator

  1. Enter the Minimum and Maximum whole numbers for your range; both ends are included.
  2. Enter How Many numbers you want, from 1 to 10,000.
  3. Turn on No repeats if every number must be unique, such as for a raffle or lottery-style draw.
  4. Turn on Sort ascending to list the results from smallest to largest.
  5. Click Generate, then use Copy to paste the results elsewhere; click Generate again for a fresh set.

Random Number Formula

Random Whole Number in a Range

n=min+⌊u×(max−min+1)⌋,0≤u<1n = \text{min} + \left\lfloor u \times (\text{max} - \text{min} + 1) \right\rfloor, \qquad 0 \le u < 1
u
A random fraction from your browser's secure random source (Web Crypto)
min, max
The Minimum and Maximum you enter; both can be drawn
⌊ ⌋
Round down to a whole number

Worked example

Range 1 to 100, if the secure random source returns u = 0.5

Given
min = 1
max = 100
u = 0.5
Calculation
1+⌊0.5×(100−1+1)⌋=1+⌊50⌋1 + \lfloor 0.5 \times (100 - 1 + 1) \rfloor = 1 + \lfloor 50 \rfloor
Result
51

Frequently asked questions

How does the random number generator work?

Enter a range and how many numbers you need, then generate. It draws each number using the Web Crypto API, your browser's cryptographically secure random source, so the results aren't predictable. With 'no repeats' on, every number in the set is unique — useful for lottery-style draws.

Are the minimum and maximum included?

Yes. The range is inclusive, so a minimum of 1 and a maximum of 6 can return 1, 6, or anything in between, just like a die. The generator scales a random fraction to the size of the range (maximum − minimum + 1), rounds down, and adds the minimum, which gives every whole number in the range an equal chance.

Can I generate unique (non-repeating) numbers?

Yes — enable 'no repeats.' Each generated number will be distinct, which is what you want for raffles, bingo, or lottery picks. The range must contain at least as many values as the count you request (you can't draw 10 unique numbers from 1–5).

Can I generate negative numbers or decimals?

Negative numbers, yes: the minimum and maximum can be any whole numbers, such as −50 to 50. Decimals, no — the generator accepts and returns whole numbers only. For a random decimal, generate a whole number in a larger range and divide it yourself; for example, pick from 1 to 1,000 and divide by 100 for values from 0.01 to 10.

How do I pick a random winner from a list?

Number the entries from 1 to the size of your list, set Minimum to 1 and Maximum to the last number, and generate one number. For several winners, set How Many to the number of prizes and turn on No repeats so nobody is picked twice. Keep a screenshot or copy of the result if participants may want to see it.

Is this suitable for a giveaway or raffle?

For casual raffles, contests, and games, yes — it's fair and unpredictable. For high-stakes or regulated drawings, use a documented, auditable process, since a client-side tool can't provide a verifiable public record. For everyday picks, it's ideal.

What's the difference from Math.random?

Standard Math.random is fast but not cryptographically secure and can be predictable. This generator uses the Web Crypto API, which draws from the operating system's secure entropy — appropriate when you want genuinely unpredictable results, like picking a winner.

Key terms

Range
The minimum and maximum values a result can take (inclusive).
No Repeats
Each number in the set is unique — for draws and raffles.
Cryptographic RNG
A secure random source (Web Crypto) that isn't predictable.

Methodology, sources & limitations

This page shows the formula, assumptions, and limitations used for this estimate. Rates, thresholds, and other time-sensitive inputs can change, so verify them against the relevant official source before relying on a result.

For our review approach and the primary sources we consult, see the methodology and source policy. If you spot an outdated figure or formula, please contact us with a correction.