Skip to main content
← Home

Random Number Generator

Generate a random number within a range

Generate a random number between two values

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.

Examples

Roll a die
Min 1, Max 6 → 4
Random decimal
Min 0, Max 1.5 → 0.734215
Negative range
Min -10, Max 10 → -3

Frequently asked questions

Are the minimum and maximum included?

For 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.

Can I generate a number between 1 and 100?

Yes. Enter 1 as the minimum and 100 as the maximum; every whole number in between has the same chance.

Is this generator truly random?

It uses Math.random, a fast pseudo-random generator. It is fair for games and draws, but not suitable for cryptography.

Related tools