Random Number Picker

Generate a truly random number within a specific range. Just enter your minimum and maximum values and click "Generate."


Generator Settings

About this Tool

This tool provides a simple way to pick a random integer (a whole number) between two specified values, inclusive.

It uses the JavaScript Math.random() function, which generates a pseudo-random floating-point number between 0 (inclusive) and 1 (exclusive). We then use a formula to scale this result to fit your desired range (min and max).

The formula used is:

Math.floor(Math.random() * (max - min + 1)) + min

  • (max - min + 1): Calculates the total number of possible integers in the range (e.g., 1 to 100 is 100 integers).
  • Math.random() * ...: Scales the 0-1 random number to the size of your range (e.g., giving a number between 0 and 99.99...).
  • Math.floor(...):Rounds the result down to the nearest whole number (e.g., 99.99... becomes 99).
  • ... + min: Shifts the range from (0 to 99) to (1 to 100) by adding the minimum value.