Random Number Generator
Generate a random number within a range
Generate a random number within a range
Whole-number limits give a whole number (1 to 6 works like a die); if either limit has a decimal part, the result is a decimal rounded to six places. Negative ranges work. The numbers come from Math.random — fair for games and draws, but not for passwords or keys.
Min 1, Max 6 → 4Min 0, Max 1.5 → 0.734215Min -10, Max 10 → -3For whole numbers, yes: a range from 1 to 10 can return both 1 and 10. For decimal ranges the result is at least the minimum and below the maximum.
Yes. Enter 1 as the minimum and 100 as the maximum; every whole number in between has the same chance.
It uses Math.random, a fast pseudo-random generator. It is fair for games and draws, but not suitable for cryptography.