CALCORA

Random Number Generator

Generate a random integer between a minimum and maximum value using your browser.

How the random number generator works

This tool generates one or more random integers within the minimum and maximum values you provide. The endpoints are included, so a range from 1 to 6 can produce either 1 or 6. It is useful for classroom activities, informal draws, simple games and choosing a random item from a numbered list.

How to use it

  1. Enter the smallest allowed integer in Minimum.
  2. Enter the largest allowed integer in Maximum.
  3. Choose how many numbers to generate, from 1 to 100.
  4. Select Generate and read the result list. Generate again for a new sample.

Example

If Minimum is 1, Maximum is 10 and the count is 3, the tool may return results such as 2, 7 and 10. These are examples only; each generation can be different. If the minimum and maximum are equal, every result will be that same number.

Unique-number mode

Enable unique mode when each number should appear at most once, such as drawing numbered tickets without replacement. The requested count cannot exceed the number of integers in the chosen range. Unique mode shuffles a pool of eligible integers; normal mode samples independently and can repeat values.

Important details and limitations

The inputs are rounded inward to integer bounds: the minimum is rounded up and the maximum is rounded down. Ensure the resulting minimum is not greater than the maximum. The generator uses the browser’s JavaScript Math.random() function, which is suitable for casual, non-security uses but is not intended for cryptographic keys, passwords, gambling systems or security-sensitive lotteries. For those applications, use an appropriately audited, cryptographically secure random source and a fair, documented selection process.

Frequently asked questions

Are the minimum and maximum included?

Yes. The algorithm can return either endpoint, as well as integers between them.

Can the tool generate repeated numbers?

Yes. Each result is generated independently, so duplicates can occur. If you need unique numbers, use a method designed to sample without replacement.

Is the result guaranteed to be unique or cryptographically secure?

No. Repeated values are possible, and Math.random() is not a cryptographic security source. Do not use this tool for passwords, secret tokens or security-critical selection.

Related calculators

All Calculators · Statistics · Mean Median Mode