Docutoolbox

Random number generator

Set a range and generate one or many random numbers — whole or decimal, with or without duplicates.

Please check your range and count — max must be greater than min, and count can't exceed the range when duplicates are off.

What is the Random Number Generator?

This tool generates truly random numbers within any range you choose. Set a minimum and maximum, decide how many numbers you want, and optionally block duplicates or allow decimals — then click Generate for an instant, unbiased result. Everything runs locally in your browser using your device's random number engine, so results are never predictable or reused from a stored list.

How to use it

  1. Enter your minimum and maximum values to define the range.
  2. Enter how many numbers you want generated (up to 500 at once).
  3. Check "No duplicate numbers" if you need every result to be unique — useful for raffles, draws, or sampling without replacement.
  4. Check "Allow decimal numbers" if you want results with two decimal places instead of whole numbers.
  5. Click Generate to see your results.

Whole numbers vs. decimals

By default, the generator produces whole numbers (integers) between your minimum and maximum, inclusive. If you turn on the decimal option, it instead produces numbers with two decimal places within the same range — handy for simulating measurements, prices, or other continuous values rather than counts.

Unique vs. repeatable results

With "No duplicate numbers" switched off (the default), every number is generated independently, so the same value can appear more than once in your results — this mirrors real-world random events like dice rolls or lottery draws where repeats are possible. Switching it on generates a unique set instead, similar to shuffling a deck of numbered cards and drawing without putting any back. Note that unique mode requires your range to contain at least as many possible values as the count you're requesting.

How the randomness works

The generator uses your browser's built-in random number function, which is suitable for everyday needs like games, raffles, sampling, and simulations. For each number, it scales a random fraction between 0 and 1 to fit your chosen range, then rounds appropriately depending on whether decimals are enabled. When uniqueness is required, it keeps generating and discarding repeats until it has collected the requested count of distinct values, then optionally shuffles the final list.

Common uses

  • Picking a winner for a giveaway, raffle, or contest
  • Assigning random group numbers, seating, or turn order
  • Generating sample data for testing spreadsheets, code, or reports
  • Simulating dice, lottery, or probability exercises for school
  • Choosing a random participant, question, or item from a numbered list
  • Quick decision-making — rolling a number to break a tie or make a choice

Tips for common scenarios

Picking a single random winner from a numbered list

Set the minimum to 1 and the maximum to your total number of entries, set count to 1, and click Generate — the result tells you which entry number won.

Drawing multiple unique winners

Use the same range, set count to however many winners you need, and turn on "No duplicate numbers" so nobody is picked twice.

Simulating a dice roll

Set minimum to 1, maximum to 6 (or however many sides your die has), and count to however many dice you're rolling — leave duplicates allowed, since real dice rolls can repeat.

Frequently asked questions

Can I generate negative numbers?

Yes — set the minimum to any negative value and the range will work correctly, including ranges that span from negative to positive.

What's the maximum count I can generate at once?

Up to 500 numbers per click, which comfortably covers raffles, classroom activities, and most data-sampling needs.

Why am I getting an error with unique numbers enabled?

Unique mode needs your range to contain at least as many whole numbers as the count you're requesting — for example, you can't generate 20 unique numbers from a range of only 10 possible values.

Are the numbers truly random?

They're generated using your browser's cryptographically-seeded random number engine, which is more than sufficient for games, raffles, sampling, and everyday randomization needs.