Random Number Generator

Draw random integers within an inclusive range, with optional unique results and a dice preset.

Your calculation

Numbers stay on this device. Changing settings clears the displayed draw; generate again when ready.

Ready to draw

Choose a range, then select Generate numbers.

No numbers are drawn automatically.

Calculated in your browser. Your inputs are not sent to a server.

How to use this calculator

Set minimum, maximum and count, then select Generate numbers. Enable No repeated numbers for sampling without replacement. The six-sided die preset sets the range to 1–6; select Generate to roll. Changing any setting clears the displayed draw.

The math behind it

Range size = maximum − minimum + 1
Accept a random 32-bit value below floor(2³² / size) × size
Integer = minimum + (accepted value mod size)

A worked example

A range of 1–6 can produce any face of a six-sided die. Generating six unique values in that range returns each number exactly once, in random order.

Assumptions & precision

Integer bounds within ±1 billion; 1–1,000 results per draw. Browser crypto.getRandomValues supplies randomness. Rejection sampling avoids modulo bias; a partial shuffle provides unique draws without constructing the whole range. Results remain local and are not persisted. This is not an audited lottery or a password/token generator.

A common question

Can random results repeat?

Yes, independent draws can repeat, even many times. Select No repeated numbers if you need a unique sample; its count cannot exceed the number of integers in the range.