Random Utility

Random Number Generator

Generate random numbers within a custom range. Supports duplicate prevention, excluded numbers, multiple draws, and draw history.

Custom ranges Enter minimum and maximum values or use quick presets.
Draw rules Prevent duplicates or exclude specific numbers and ranges.
Result history Review results, sums, averages, maximums, and minimums by round.
STEP 1

Random number settings

Choose a range, draw count, and exclusion rules, then generate random numbers.

Waiting
Draw result No draw yet
-
Latest sum 0
Latest average 0
Recorded rounds 0
HISTORY

Draw history

Each round stores results, sums, and averages.

History count 0
Maximum 0
Minimum 0
  1. No draw history yet.
Practical guide

Set the range and repeat rules before drawing numbers

Draw integers from an inclusive range, exclude individual numbers or ranges, and choose whether results can repeat. Review available candidates and past draws before sharing a result.

Who this helps

  • Organizers assigning numbered turns
  • Developers preparing small integer samples

When to use this tool

  • Pick six different numbers from 1–45.
  • Exclude previously assigned numbers from a new draw.

From input to a checked result

  1. 1

    Set the minimum and maximum integers.

  2. 2

    Choose the draw count and whether to exclude duplicates.

  3. 3

    Enter exclusions using commas and ranges such as 2,3~4.

  4. 4

    Check that enough candidates remain.

  5. 5

    Draw and record the range, exclusions and duplicate rule with the result.

Example 1

Two candidates, five draws

Input
1–5; exclude 2,3~4; count 5; duplicates allowed
Result
Five values, each either 1 or 5.

Repeated values are allowed, so the count can exceed the candidate pool.

Example 2

An exhausted pool

Input
1–5; exclude 2,3~4; count 2; no duplicates
Result
1 and 5 appear once each, in an unpredictable order.

The next draw has no candidates until history is cleared or the rules change.

How it works

The tool combines overlapping exclusion ranges, builds a candidate array and selects indexes using Math.random(). With duplicate exclusion enabled, selected numbers leave the pool and stay excluded across draws in this page session.

Limitations

  • Math.random() is not a cryptographic random source or an auditable draw system.
  • Endpoints must be integers within ±1 billion; the range allows at most 100,000 integers, a draw 1,000 results and exclusions 10,000 characters.
  • Disabling history does not clear the set of numbers drawn with duplicate exclusion.
  • Clearing history, resetting or reloading also clears the used-number set.
Your data

Inputs and results are processed in the browser and are not uploaded by the tool.

Related tools

Frequently asked questions

Do earlier results stay excluded?

Numbers drawn while duplicate exclusion is on remain excluded. Numbers drawn with it off are not added to that set.

Can I repeat more times than the pool size?

Yes, if duplicates are allowed and at least one candidate remains.

Why does clearing history change the next draw?

It also clears previously used numbers, making them eligible again.