Generate random whole numbers in a chosen range
Enter a minimum, maximum and count. Choose whether repeated numbers are allowed. The random number generator includes both bounds and can generate up to 1,000 integers per request. Unique mode samples without replacement.
Formula and calculation method
Integers are sampled with the browser’s cryptographic random generator using rejection sampling, so each integer in the inclusive range is equally likely. Unique mode samples without replacement. Bounds must be safe whole numbers, the range can contain up to 2³² integers, and each request can produce up to 1,000 results.
Worked example
With a minimum of 1 and maximum of 6, every result is one of the six integers on a die. Requesting six unique values produces each integer once, in random order.
Can I request more unique numbers than exist in the range?
No. A range from 1 to 6 contains six integers, so at most six unique values can be generated. Increase the range or allow repeats.