Math Calculators

Random Number Generator

Modify the values and click the Calculate button to use

What this calculator does

The Random Number Generator produces whole numbers between a minimum and a maximum. You choose how many numbers to generate and whether duplicates are allowed. It is useful for simulations, games, sampling, and quick decisions.

How to use this calculator

  1. Enter an integer minimum and maximum.
  2. Enter how many numbers you need (1 to 1,000).
  3. Check "No duplicate numbers" if every result must be different.
  4. Click Calculate.

Formula

Each value = minimum + floor(random × (maximum − minimum + 1))

When unique values are requested, the generator samples without replacement and stops if the requested count is larger than the range.

What the results mean

The default settings generate five whole numbers from 1 to 100 with no duplicates. Click Calculate again to generate a new set.

Assumptions and limitations

  • The result uses the browser's Math.random, which is not cryptographic.
  • Use a dedicated cryptographic tool for passwords, keys, or security tokens.
  • The maximum range size is limited to safe integer values.
  • The calculator does not use a server-side seed or remote random service.

Frequently asked questions

Are the numbers truly random?

No. Browsers use a pseudo-random generator that is suitable for games and general simulations, but not for cryptographic security.

Why can't I generate more unique numbers than the range contains?

Unique values cannot repeat. A range of 1 to 5 contains only five possible values, so asking for six unique numbers is impossible.

Can I generate decimal numbers?

This version generates whole numbers only.

Source

Reference: Random Number Generator.

Math Calculators