Generates a random integer within the specified range. Enter the minimum and maximum values — both boundaries are inclusive.
Common use cases: picking a winner from a list of participants, choosing a random item, generating test data, or breaking a tie.
The generator uses the Mersenne Twister algorithm (mt_rand). Its period is 219937−1, meaning the sequence of generated numbers is virtually non-repeating. The distribution is uniform: every number within the specified range has an equal probability of being selected, which matters for fair draws.
Allowed range: integers, including negative values. On modern servers (64-bit), the upper limit reaches ±9,223,372,036,854,775,807. If the minimum is greater than the maximum, the values are automatically swapped.
The generator is suitable for draws, games, random picks from a list, and test data. It is not suitable for generating passwords, auth tokens, or encryption keys — use the password generator instead. For statistical simulations and scientific calculations, specialized software should be used.