Account

What new tool do you want?

Generators

Random Number Generator

Generate random numbers in any range — one or many, whole or decimal, with or without repeats, sorted if you like.

How to use

  1. 1Set the minimum, maximum and how many numbers you need.
  2. 2Choose unique or decimals, then press Generate.

Frequently asked questions

Is this truly random?

It uses your browser's cryptographically secure generator, which is unpredictable and suitable for draws, games and sampling.

Are the minimum and maximum included?

Yes, for whole numbers both ends are included — 1 to 10 can give 1 or 10.

What does 'No repeats' do?

Each number appears at most once, like drawing numbered balls from a bag. You can't ask for more numbers than the range contains.

What 'no repeats' actually checks

With decimals set to 0, enabling 'No repeats' first counts how many whole numbers exist in your range (max − min + 1) and refuses to generate more numbers than that — asking for 15 unique numbers between 1 and 10 fails immediately with a clear error rather than silently returning fewer than requested or looping forever. Numbers are drawn one at a time into a Set until it reaches the requested count, so for a range that's much larger than the count requested (say, 50 unique numbers from 1–10,000) duplicates are rare enough that this finishes almost instantly; for a range close to the requested count, it has to work harder to fill in the last few unused values.

Decimals change the uniqueness logic entirely

Whole-number mode guarantees true uniqueness by tracking exactly which integers have been used. Decimal mode instead generates `lo + rng() * (hi - lo)` and rounds to your chosen decimal places, then deduplicates afterward with a Set — so with enough decimal places, collisions are so unlikely that 'No repeats' rarely removes anything, but with 0–1 decimal places over a narrow range, you can ask for more unique decimals than actually fit and get back fewer results than requested with no error, unlike the integer case. If exact counts matter, stick to whole numbers when uniqueness is required.

Why both endpoints are included

For whole numbers, the range is inclusive on both ends — rolling 1 to 6 can land on 1 or 6, matching how a physical die or numbered-ball draw works, not the half-open ranges common in programming (like array indices). This is also why the generator fits dice rolls, raffle draws, sports team assignment and similar real-world picks: the behavior matches what people expect from a physical draw, not what a programmer might expect from a loop.

Worked example: Random Number Generator

Minimum 1, maximum 49, count 6, unique on, sort on — the classic lottery-ticket shape — pulls 6 distinct whole numbers from the 49 available (so the uniqueness check easily succeeds, since 6 is far below 49) and returns them in ascending order, e.g. `3, 11, 22, 28, 35, 44`. Switching decimals to 2 instead with the same range would produce values like `17.84` drawn from the continuous range 1–49 rather than the 49 discrete integers, which is a fundamentally different kind of draw worth not confusing with the whole-number case.

A backwards range is swapped, not rejected

If the minimum is higher than the maximum, the two ends are swapped and the draw still runs, so 100 and 1 is treated as 1 to 100. For whole numbers the ends are tightened to whole values first: a minimum of 1.2 becomes 2, and a maximum of 5.9 becomes 5. If that leaves no whole number in the range, you get an error instead of a decimal sneaking through. How many is capped at 10,000 and starts at 1. Decimal places are capped at 10. With decimals turned on, No repeats only drops values that happened to land on the same rounded number, so you can receive fewer results than you asked for. Sort, which starts off, orders the list from low to high after the draw, including after that duplicate removal.

Related tools

More: Generators