AllFreeCalculator

Random Number Generator

Generate one number or many between any min and max, with or without duplicates. Copy the results in one click.

Generated numbers

Press Generate to start.

What this random number generator does

The random number generator draws one or many random integers between a minimum and maximum that you choose. You can pick with or without duplicates (with duplicates is random sampling with replacement; without is sampling without replacement, used for raffles and lotteries). Results are shown in a copy-friendly block so you can paste them straight into a spreadsheet, list or message.

How the randomness is generated

Behind the scenes the tool calls crypto.getRandomValues, the browser's cryptographically-strong source of random bytes. It is more uniform and less predictable than older Math.random implementations, which is what you want for raffles, sampling, dice rolls and most casual cryptography. For truly high-stakes randomness — like generating private keys for production systems — server-side hardware sources are still preferred, but for everyday random selection this is comfortably good enough.

Inclusive ranges and the unique-only mode

The range is inclusive on both ends, so min = 1 and max = 100 can return 1 and 100. In unique-only mode (the "Allow duplicates" checkbox off) the tool uses a Fisher-Yates shuffle on the range [min, max] and takes the first count numbers. Every possible result has equal probability, and no number can repeat. The count must be no greater than the size of the range (max − min + 1) — otherwise there are not enough distinct numbers and the tool warns you.

Common uses

  • Raffle and giveaway draws. Generate one or more unique winners from a numbered list.
  • Random sampling. Pick rows from a spreadsheet for audit, survey or quality-control checks.
  • Tabletop games. Roll dice (1 to 6, or however many sides) or pick a card.
  • Tests and demos. Quick fake data when you need a column of numbers.
  • Decision-making. Pick a song, a restaurant, a topic — anything that maps cleanly to a numbered list.

Tips for fair use

If your draw is high-stakes, run it once and stick with the result rather than re-rolling until you like it — that defeats the randomness. For public draws, screen-record the generation so participants can verify it. If you need a tie-breaker, generate a single number from 1 to N to pick from your list of contenders.

Use with the other tools

For statistics on a set of numbers, the average calculator and standard deviation calculator are quick companions. For percentages or ratios on results, see the percentage calculator and ratio calculator.

Frequently asked questions

How does the random number generator work?

It uses the browser's crypto.getRandomValues to draw cryptographically-strong random integers from your chosen [min, max] range. The unique-only mode uses a Fisher-Yates shuffle so every result has the same probability and there are no duplicates.

Are the numbers truly random?

They are cryptographically-strong pseudo-random — good enough for raffles, dice rolls, sampling and most games. For high-stakes cryptography you would still use a server-side hardware source, but for everyday randomness this is far better than older Math.random implementations.

Can I generate numbers without duplicates?

Yes. Turn off "Allow duplicates" and every generated number will be unique. This requires that the count is no larger than the size of the range; otherwise there are not enough distinct numbers to pick from.

What is the maximum count or range?

You can generate up to 10,000 numbers in one batch, and the min/max can be any integers between −1,000,000,000 and +1,000,000,000. Larger requests slow the page down without adding value.

How do I copy the results?

Click the copy button. The numbers are copied to your clipboard separated by commas (or one per line if you choose that format) so you can paste them directly into a spreadsheet, list or message.

What is this useful for?

Picking raffle winners, sampling rows from a list, rolling dice for tabletop games, generating test data, random ordering, choosing a song from a playlist — anything that needs an unbiased pick from a range.

Worked example

You want to pick 5 raffle winners from tickets numbered 1 to 200.

  • Set min = 1, max = 200, how many = 5
  • Untick "Allow duplicates" — each winner should be a different ticket
  • Click Generate to draw, then Copy to paste the winners into your record
  • Sample result: 17, 62, 91, 138, 174 (your numbers will differ)

Switch duplicates back on for things like dice rolls, where the same value can legitimately appear twice in a row.

Related calculators