Time & Random

Random Number Generator

Pick a random integer between two values.

Results appear here.

What the result means

Both ends count. Asking for 1 and 6 can return 1 or 6, not only the integers between them. The span is the high value minus the low value, plus one. If the low end is above the high end, or the span is greater than one billion, the page stops rather than guessing. The draw reads cryptographic random data. A 32-bit word does not divide evenly into every span, so words in the leftover range are discarded and another word is read. That rejection step is what keeps each integer in the span equally likely. The number belongs to this click. It is not a seed you can replay later, and it is not guidance for a lottery or a study.

Related tools

Advertisement

Questions

Are both ends included?

Yes. Both ends are included. A minimum of 1 and a maximum of 6 can return 1, 6, or any integer between them.

Is it truly random?

It uses crypto.getRandomValues, with rejection sampling so every integer in the span has the same chance. That is a fair draw in the browser. It is not a hardware audit, and it is not a seed you can replay.

Why is a huge range rejected?

Spans above 1000000000 are refused so the unbiased sampling stays inside one 32-bit word and remains exact.