Home › Guides › Random Numbers
Last updated: September 2026 · Independently QA-tested formulas
Give me a number between 1 and 10, right now. Whatever you said, you didn't pick randomly — humans avoid round numbers, favor 7, and lean on recent memories. Computers are different: they produce sequences that pass statistical tests for randomness, which is exactly what a random number generator does for picks, draws, dice and raffles.
An RNG is a procedure that outputs values with no usable pattern. Two families exist:
For picking a raffle winner or rolling a d20, a PRNG is exactly as fair as a physical die — arguably fairer, since a worn die is biased.
Where rand() returns a uniform decimal in [0, 1). Multiplying stretches it across your range, flooring snaps it to whole numbers. Three properties matter:
Worked example: rand() returns 0.2719, range 1–100 → 1 + floor(0.2719 × 100) = 28.
The seed is the PRNG's starting state. Same seed in, same sequence out — that's how scientists re-run identical simulations. Everyday tools seed from the system clock or OS entropy, so you never see repeats of the same sequence. If a tool lets you set a seed, use it only when you want reproducibility.
Yes — and they should. Independent draws mean yesterday's result has zero effect on today's. In a 1–10 range, a repeat appears within about 7 picks on average. That feels "unrandom" to humans (the gambler's fallacy) but is mathematically correct. Tools labeled "unique picks" or "no repeats" instead sample without replacement, like dealing cards.
| Use case | Setup |
|---|---|
| Raffle / giveaway winner | Number each entrant, generate one value from 1 to N |
| Dice replacement | Min 1, max = sides; one draw per die |
| Lottery-style pick | Use no-repeat mode with your game's range |
| Prize draw with 3 winners | Generate 3 unique values from 1 to N (or re-roll duplicates) |
| Sampling for a survey | Number the population, draw k unique values |
Every tool on this page is a uniform generator: each number in the range has exactly the same chance. That is what raffles and dice need — but not everything. Some real picks are weighted:
PRNGs like Math.random() are ideal for dice, raffles and games — unpredictable enough that nobody can guess your next roll in practice. They are not designed to resist a determined attacker choosing passwords. Password generation needs a cryptographically secure source (CSPRNG), which is why our password generator exists separately from this one. The password entropy guide explains the math of why a 16-character passphrase beats an 8-character string of symbols.
One honest limitation of "pick a number from 1 to 36" for dice replacement: it gives a flat distribution, while real two-dice throws are peaked. Every one of the 36 (die, die) combinations is equally likely, but a total of 7 has six of them (1+6, 2+5, 3+4, 4+3, 5+2, 6+1) while 2 or 12 have one each:
| Total | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Ways out of 36 | 1 | 2 | 3 | 4 | 5 | 6 | 5 | 4 | 3 | 2 | 1 |
So 7 comes up about 16.7% of the time — six times as often as snake eyes. Board games that "feel wrong" are usually just revealing this curve. For a dice game where the shape of the distribution matters, roll two dice separately (the dice roller does independent draws) rather than one uniform pick from the summed range.
Drawing with replacement keeps every draw at the same odds; drawing without replacement shifts them as the pool shrinks. A 6/49 lottery is the classic case: the first ball is a 1-in-49 shot, but the jackpot needs all six — 49 × 48 × 47 × 46 × 45 × 44 ÷ 720 orders = 1 in 13,983,816. That's C(49,6) — combinations, not permutations, because draw order doesn't matter.
The same combinatorics runs a raffle fairly: 150 unique picks from 200 entrants leaves the last entrant facing odds that rose from 1/200 toward 1/51 as others were drawn. Not unfair — just not the constant 1/200 your intuition keeps quoting. When fairness must be visible, publish the method: numbered entrants, unique-mode draw, order ignored.
A simulated coin flip is — each draw is uniform. Physical flips are slightly biased toward the side that starts facing up, research suggests around 50.8% for a standard flip.
Not without knowing the internal seed and state. For our tools' purposes (picks, dice, draws), the sequence is unpredictable.
Average results are typical, not guaranteed. Three d6s average 10.5, but any total from 3–18 is possible; extremes are simply rarer. Try the dice roller and watch the spread over many rolls.
Yes, provided every entrant maps to exactly one number and the range covers all of them — the team randomizer handles the grouping for you.