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
- Choose Custom range or one of the lottery presets.
- For a custom range, enter the minimum and maximum (both included) and how many numbers you want.
- 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.
- 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 and outputs a 32-bit integer at each step:
followed by a few shifts and XORs of the state. Its period is . The seed is spread over the four state words with a SplitMix-style mixing function.
Unbiased range. To pick one of values, the naive favours small values when does not divide . The generator therefore rejects draws above the largest multiple of and tries again, so
with 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 , swap position with a random position . Every ordered selection is equally likely.
Lottery odds. The chance of one exact combination is , multiplied by the bonus draw: for 6 out of 49, .
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
- D. Blackman, S. Vigna (2021), Scrambled Linear Pseudorandom Number Generators, ACM Transactions on Mathematical Software 47(4)
- S. Vigna, xoshiro / xoroshiro generators and the PRNG shootout (reference code)
- R. Durstenfeld (1964), Algorithm 235: Random permutation, Communications of the ACM 7(7)
- NIST Dictionary of Algorithms and Data Structures: Fisher–Yates shuffle
Last updated: