Home/Calculator Tools/Random Number Generator
🎲

Random Number Generator

FREE

Pick a whole number in any range, every value equally likely

Free · No sign-up required
Loading...

What the random number generator does

Set a minimum and a maximum and the generator picks a whole number in that range, each value equally likely. It is the digital equivalent of drawing a ticket from a hat: choosing a raffle winner, picking who goes first, rolling a die of any size, selecting a random row from a spreadsheet, or generating a lottery-style set of numbers. Runs in your browser; nothing is logged.

How the number is chosen

result = min + floor(random() × (max − min + 1)) random() gives a value in [0, 1); the multiplication and floor spread it evenly across max − min + 1 whole numbers, so every integer from min to max inclusive has the same chance.

The underlying random() is the browser's pseudo-random generator — in every modern browser a fast, well-distributed algorithm (xorshift128+) seeded from system entropy. It is more than adequate for games, draws and sampling. It is not cryptographically secure: do not use it to generate passwords, tokens or keys; use the Password Generator, which draws from crypto.getRandomValues.

Common ranges

RangeEquivalent toUse
1–2Coin flipHeads or tails, yes or no
1–6Six-sided dieBoard games
1–20d20Tabletop role-playing
1–100PercentilePercent chance checks, quick sampling
1–NDraw from N entriesRaffle with N tickets, pick a row from N
0–9Single digitBuilding PINs (not secure) or teaching
1–49 / 1–59Lottery ballsPractice picks — the odds do not improve

Using it fairly

  • Decide the mapping before generating. Number the entries, then draw — not the other way round.
  • Draw in front of the people affected or record the screen, so a raffle result is verifiable.
  • For draws without replacement (several winners, no repeats), generate again and skip duplicates, or use the List Randomizer to shuffle all entries at once.
  • Expect streaks. Three sixes in a row is normal randomness, not a fault; humans are bad at judging what random looks like.

Randomness in research and statistics

Random assignment to groups and random sampling from a population are what let experiments and surveys support conclusions. For a small classroom or team experiment this generator is fine: number the participants and draw. For published research, use a documented method (a seeded generator in R or Python, or randomization software) so the procedure can be reproduced and audited.

Frequently asked questions

Are the numbers truly random?

They are pseudo-random — generated by an algorithm from a seed the browser takes from system entropy. For any practical purpose short of cryptography they are indistinguishable from true randomness.

Can I generate several numbers at once?

Generate repeatedly; each draw is independent. For a set without duplicates, use the List Randomizer to shuffle a numbered list.

Can I get decimals or negative numbers?

Negative and large integers work by setting the range. For decimals, generate an integer in a larger range and divide (0–1000 ÷ 100 for two decimal places).

Is the same number more likely twice in a row?

No — each draw is independent and every value has the same chance every time. Repeats happen exactly as often as probability predicts.

Can I pick a random name?

Number the names, generate a number in 1–N, and read off the name. Or paste the names into the List Randomizer and take the first.

Is my draw recorded anywhere?

No. The number is generated in your browser and not stored or sent.

More tools in this category

📊
Percentage Calculator
Quickly calculate percentages and ratios
📈
Percentage Change Calculator
Percentage increase or decrease between two values
🔬
Scientific Calculator
Trig, logs, powers and roots with correct operator precedence
Fraction Calculator
Add, subtract, multiply and divide fractions in lowest terms
📊
Standard Deviation Calculator
Mean, variance and standard deviation — population and sample
🔄
Unit Converter
Length, weight, volume, temperature and speed between metric and imperial