Random Number Generator

Generate random whole numbers in a range you choose, in any quantity, with or without duplicates.

Calculations happen locally. We do not send your values to our server.

Example

A range of 1 to 100 contains 100 possible whole numbers, each with a 1% chance on every draw, while 1 to 6 behaves like a fair die with 16.67% for each face.

Calculation method

Both ends of the range are included. Values come from the browser’s cryptographically secure source with rejection sampling, so numbers at the top of the range are neither more nor less likely than the rest — a flaw found in some quick formulas.

Important notes

Only integers are produced. For a random decimal, generate an integer in a larger range and divide it, for example 1 to 1,000 divided by 100. A single request is limited to 1,000 numbers so the page stays responsive.

Inclusive ranges and equal chances

Enter a minimum, a maximum and how many numbers you want. Both ends are included, so 1 to 100 contains 100 possible whole numbers and each has a 1% chance on every draw, while 1 to 6 behaves like a fair die with 16.67% for each face. The generator uses the browser’s cryptographically secure source and rejection sampling, so values at the top of the range are not slightly more or less likely than the rest, a flaw found in some quick formulas.

Why repeats appear sooner than expected

With duplicates allowed, each number is drawn independently, and repeats become likely surprisingly fast. Drawing 5 numbers from 1 to 100 produces at least one repeated value 9.65% of the time. Drawing 23 numbers from 1 to 365 produces a repeat 50.73% of the time, the classic birthday paradox. If your raffle tickets or test IDs must be different, clear “Allow duplicates” so each value appears at most once in that set.

Unique sets and practical limits

With duplicates turned off, the quantity cannot exceed the number of values in the range. Asking for 10 numbers from 1 to 10 returns all ten values exactly once in random order, which is a quick way to shuffle numbered seats or questions. A single request is limited to 1,000 numbers so the page stays responsive. Only integers are produced; for a random decimal, generate an integer in a larger range and divide it, for example 1 to 1,000 divided by 100.

Worked examples
InputResult
1–100 · ×1P(each value) 1%
1–6 · ×1P(each value) 16.67%
1–100 · ×5 · duplicates allowedP(any repeat) 9.65%
1–365 · ×23 · duplicates allowedP(any repeat) 50.73%
1–10 · ×10 · no duplicatesall 10 values once

Frequently asked questions

Why do repeats appear so quickly?

Because with duplicates allowed each number is drawn independently. Drawing 5 numbers from 1 to 100 produces at least one repeat 9.65% of the time, and drawing 23 numbers from 1 to 365 produces one 50.73% of the time — the classic birthday paradox.

How do I get a set with no duplicates?

Clear “Allow duplicates”, and every value then appears at most once in that set, which is what raffle tickets and test IDs usually need. The quantity cannot exceed the number of values in the range once duplicates are off.

Can I shuffle a numbered list with it?

Yes. Asking for 10 numbers from 1 to 10 with duplicates off returns all ten values exactly once in random order, which is a quick way to shuffle numbered seats, questions or turns without writing anything down.

Related tools