All calculators
Math

Random Numbers

Generate random numbers in a range.

Fair choices need genuine randomness — picking raffle winners, assigning participants to study groups, sampling rows from a dataset, or just settling who goes first. This generator produces uniformly distributed random integers in any range you set.

How it works

Set the minimum, maximum, and how many numbers you want. Each number is drawn independently and uniformly, meaning every integer in the range has exactly the same chance on every draw.

The formula

n = ⌊random() × (max − min + 1)⌋ + min

random() is a uniform draw from [0, 1). The scaling maps it onto integers from min to max inclusive; independent draws mean repeats can and do occur.

Worked example

Five numbers between 1 and 100 might come out as 87, 3, 45, 87, 12 — note the repeated 87: with 5 draws from 100 values, some repetition is expected about 10% of the time.

Frequently asked questions

Why do I see repeated numbers?

Because draws are independent, like rolling dice. If you need unique values (a lottery draw), generate more than you need and discard duplicates, or draw without replacement.

Is this suitable for passwords or cryptography?

Use our dedicated password generator for secrets — it uses the browser's cryptographic random source. This tool is designed for fair everyday randomness, not key generation.

Are 'streaks' like 5, 5, 5 a sign something's broken?

No — true randomness produces streaks more often than intuition expects. In 100 coin flips, a run of 6+ identical results is more likely than not.

Related Calculators