Calculatorism

Random Number Generator

Generate a random integer between a min and max.

Input Data

Min
Max

Results

Generated integer.
4
Explanatory note about the result.
隨機數 ∈ [1, 100] = 4。

At a glance:Returns a uniform integer in [min, max]. Complements random and dice.

Formula

x = floor(rand()·(max−min+1)) + min.

How to Use

  1. Enter min and max.
  2. The tool returns a random integer.

Case Studies

min 1, max 6

Yields 1–6 like a die.

FAQ

Truly random?

Uses a PRNG; fine for games, not for cryptography.

Related Tools

References

Content review: Calculatorism Science Team. Results are for reference only; please refer to the relevant authorities for the official figures.

Found a problem with the results?

If this calculator's result is wrong, or you have any question about the calculation logic, please let us know. You are viewing:Random Number Generator(/math/random-number)。