Find your calculator

Use arrow keys, Enter to open, Escape to close.

Browse the full directory
Math & Numbers / Free online tool

Random Number Generator

Generate one or many random integers, with optional unique sampling.

Your inputs

More options & settings
Separate by commas or spaces. Integer mode only; up to 1,000 excluded values.
Try a worked example

Generate a single integer from 1 to 6.

Calculated in your browser. Your inputs stay on this device.

Starting values are examples. First click or keyboard focus clears an example so you can enter yours. Reset restores the examples.

Your result

Enter your values to calculate.

Compare scenarios

Keep up to three results and their inputs during this visit. Reset clears the comparison.

Behind the answer

Integer sampled uniformly from [minimum, maximum]

How to use this calculator

Select Calculate again for a new sample. Rejection sampling removes modulo bias from browser-generated random bytes. Unique mode samples without replacement and randomly orders the selected numbers.

  1. Enter number type, minimum, maximum and review the remaining options.
  2. Select Calculate or change a value to update the result. Read the result label and units before copying.
  3. Use Reset to restore the worked starting values.

Formula and method

Integer sampled uniformly from [minimum, maximum]

Uniform crypto sampling; not a password/key generator. Up to 999 digits per bound and 999 decimal places, at most 1,000 draws. Decimal mode samples a fixed decimal grid, including both representable endpoints.

Worked example

Minimum 1 and maximum 6 simulate a six-sided die.

Questions about random number generator

Can a generated number repeat?

Repeats are allowed by default. Select Unique numbers only to sample without replacement within a batch. Quantity can be up to 1,000 but cannot exceed the range size in unique mode. Each new batch starts fresh; previous batches are not excluded.

What assumptions should I check?

Uniform crypto sampling; not a password/key generator. Up to 999 digits per bound and 999 decimal places, at most 1,000 draws. Decimal mode samples a fixed decimal grid, including both representable endpoints.

Are my inputs saved?

Calculations run in your browser. We store only tool IDs for favorites and recent tools. A calculation link contains your inputs only when you explicitly choose to copy one.