Skip to content

Random Number Generator

Random integers or decimals in any range, with or without repeats, sorted or not, plus lottery draws.

Your details

Any whole number. The same seed with the same settings always gives the same numbers, so a draw can be checked later.

Results update as you type

Random numbers

15

Possible values
100

Pseudo-random and reproducible: fine for games, draws and sampling, not for passwords or security keys.

Need a number between 1 and 100, ten winners out of 250 raffle tickets, a random order for presentations, or a quick lottery pick? This random number generator draws up to 1,000 values from any range you choose:

  • integers or decimals (up to 6 decimal places), including negative ranges;
  • with or without repeats — without repeats, every number can come out only once, like balls drawn from an urn;
  • sorted in ascending order or left in the order they were drawn;
  • lottery presets: Loto (5 numbers out of 49 plus a lucky number out of 10), EuroMillions (5 out of 50 plus 2 stars out of 12) and the classic 6 out of 49, with the odds of hitting that exact combination.

Every draw comes from a seed. The page opens with seed 2026; change the seed to get a new draw — type any whole number, for example the time, your birthday or a number someone else picks. The same seed with the same settings always gives exactly the same numbers. That may sound odd for “random” numbers, but it is a feature: a teacher, a club or a company running a raffle can publish the seed and the settings, and anyone can re-run the draw to check that nobody cheated.

Behind the scenes, the generator uses xoshiro128**, a modern pseudo-random algorithm published by Blackman and Vigna, and unbiased sampling so that every value in the range has exactly the same chance.

How to use this calculator

  1. Choose Custom range or one of the lottery presets.
  2. For a custom range, enter the minimum and maximum (both included) and how many numbers you want.
  3. Tick No repeats to draw without replacement, set decimal places if you need non-integers, and tick Sort if you want the result in order.
  4. Change the seed to get a new draw. Note the seed if you may need to prove or reproduce the result.

For a fair public draw, choose the seed from something nobody controls in advance, such as the last digits of an official result announced after the tickets are sold.

The formula

Generator. xoshiro128** keeps a 128-bit state (s0,s1,s2,s3)(s_0, s_1, s_2, s_3) and outputs a 32-bit integer at each step:

out=rotl⁡(5 s1,7)×9(mod232)\text{out} = \operatorname{rotl}(5\,s_1, 7) \times 9 \pmod{2^{32}}

followed by a few shifts and XORs of the state. Its period is 2128−12^{128} - 1. The seed is spread over the four state words with a SplitMix-style mixing function.

Unbiased range. To pick one of KK values, the naive u mod Ku \bmod K favours small values when KK does not divide 2322^{32}. The generator therefore rejects draws above the largest multiple of KK and tries again, so

P(each value)=1K,K=(max−min)×10d+1P(\text{each value}) = \frac{1}{K}, \qquad K = (\text{max} - \text{min}) \times 10^{d} + 1

with dd the number of decimal places.

Without repeats. The values are taken from a Fisher–Yates shuffle (Durstenfeld’s version), stopped after the requested count: at step ii, swap position ii with a random position j∈[i,K)j \in [i, K). Every ordered selection is equally likely.

Lottery odds. The chance of one exact combination is 1/(nk)1 / \binom{n}{k}, multiplied by the bonus draw: for 6 out of 49, (496)=13,983,816\binom{49}{6} = 13,983,816.

Worked example

One number from 1 to 100, seed 2026: the result is 15. Reload the page and you get 15 again; type 2027 as the seed and you get a different number.

Raffle. 250 tickets are sold, 3 prizes to award, no ticket can win twice. With seed 42, the winners are tickets 175, 186, 37, in prize order. Publish “seed 42, range 1–250, 3 numbers, no repeats” and anyone can check it here.

Loto preset, seed 2026: main numbers 18, 23, 26, 43, 47, lucky number 5. The chance of that exact combination is 1 in 19,068,840; for EuroMillions it is 1 in 139,838,160.

Why a seed? Reproducible draws

A computer cannot toss a coin: it follows instructions. A pseudo-random generator turns a starting value, the seed, into a long sequence that passes demanding statistical tests yet is completely determined by that seed. This calculator makes the seed visible instead of hiding it. Pressing nothing and reloading gives the same result, which is exactly what you want when the result must be audited. Scientists use the same idea to make simulations and random sampling repeatable.

Not for passwords or security

xoshiro128** is fast and statistically excellent, but it is not cryptographically secure: someone who sees enough outputs could predict the next ones. Use it for games, classroom activities, random sampling, raffles and simulations. For passwords, encryption keys or anything an attacker might want to guess, use your operating system’s secure generator or a dedicated password manager. To study the probabilities behind games, see the dice probability calculator and the combination calculator.

Frequently asked questions

How do I get a new set of numbers?

Change the seed. Any whole number works; each seed gives a different, independent-looking draw. Keeping the same seed and settings reproduces the previous draw exactly.

Is the minimum and maximum included?

Yes. A range of 1 to 6 can return 1, 2, 3, 4, 5 or 6, each with probability 1/6, like a fair die.

What does “no repeats” do?

It draws without replacement: once a number has come out it cannot appear again, as with lottery balls or raffle tickets. You therefore cannot ask for more numbers than the range contains.

Are the numbers truly random?

They are pseudo-random: produced by a deterministic algorithm, but statistically indistinguishable from chance for practical purposes. Every value in the range has exactly the same probability thanks to rejection sampling.

Can I use it to pick lottery numbers?

Yes, and the presets follow the usual formats. No method improves your odds: every combination is equally likely, and the chance of winning the 6-out-of-49 jackpot is 1 in 13,983,816 whatever numbers you play.

Sources

Last updated:

More Statistics calculators

People also use