Enter data
Misc- —
Settings
- 4
- 2
- 6
- 8
- 10
- 9.8 m/s²
- 9.81 m/s²
- 10 m/s² (school)
Result
CalcCoreHow the generator works
The generator picks numbers with crypto.getRandomValues, the browser's cryptographic generator rather than the ordinary Math.random. For a range it takes the needed number of random bits and rejects values outside the range, drawing again. As a result every number has exactly the same chance, without the bias that appears when you simply take a remainder.
Numbers in a range
Enter “From” and “To”, a count of up to 1000 and, if needed, the number of decimal places. Both ends are included and negative numbers down to −10¹⁵ are allowed. For decimals the values are worked out as whole numbers in the scale of the step, so there are no floating-point errors. You can sort the result and copy it comma-separated, space-separated or one per line.
No repeats and the lottery
The “No repeats” option picks different numbers: a set 6 of 49 or 5 of 36 takes one press. It uses Floyd's algorithm, which does not build an array of the whole range, so it works even for ranges of a billion values, and every subset and order is equally likely. The calculator shows the number of possible sets: for 6 of 49 it is 13,983,816, and no “lucky” number changes that chance.
Dice and the probability of a sum
The notation 2d6+3 means two six-sided dice plus 3. Dice from d4 to d100 and a custom number of sides up to 1000 are supported, with up to 20 dice and up to 10 rolls at a time. For the sum the exact probability distribution is shown: with two dice a sum of 7 comes up with a 16.7% chance, while 2 or 12 only 2.8% each. For many dice the average and standard deviation are shown.
The coin
Each flip is one random bit, so heads and tails are equally likely and the flips are independent. For a series the calculator shows the counts, percentages, the longest run of the same side and the exact probability of such a result. In a short series deviations from 50/50 are normal: the coin does not “remember” earlier flips.
Picking from a list
Paste a list, one item per line up to 500, and choose a number of winners or shuffle the whole list. The pick does not repeat items and the chance of each is shown. The shuffle uses the Fisher–Yates algorithm, so all orders are equally likely. Identical lines count separately.
Sources, rights and contact
The calculations are mathematical and do not depend on external data. For the source of randomness see the crypto.getRandomValues documentation, for shuffling the Fisher–Yates algorithm and for the dice format dice notation. Sampling without repeats is described in Bentley's “Programming Pearls” (Floyd's algorithm). The site is not affiliated with or endorsed by these organizations, and their names belong to their owners. If you are a rights holder with a concern, write to us on the Contacts page.
Limits
The result is random and is not stored, so no link to it is created. Official draws and lotteries need a public independent process with verification, while this tool suits games, samples and informal draws. The absolute value of the numbers is limited to 10¹⁵ and up to 1000 numbers can be drawn at a time.
Every number in the range has the same chance and earlier results do not affect later ones. There are no “lucky” numbers: in a lottery the set 1-2-3-4-5-6 is as likely as any other.
FAQ
How random are these numbers?
They are picked by the browser's cryptographic generator crypto.getRandomValues. Values that would break uniformity are rejected, so every number has the same chance.
What is modulo bias?
If you simply take the remainder of a random number divided by the range size, smaller numbers come up slightly more often. We reject values from the “incomplete tail”, so there is no bias.
How do I get numbers without repeats?
Turn on “No repeats”: all numbers will be different. The count cannot exceed the size of the range, otherwise the calculator says so.
Can I get decimal numbers?
Yes, choose from 1 to 6 decimal places. The values are worked out exactly, without floating-point errors.
How do I generate lottery numbers?
Press “6 of 49” or “5 of 36”: a set with no repeats in ascending order. All sets are equally likely and the number of possible combinations is shown next to it.
Are there “lucky” numbers?
No. Every set in a lottery has the same chance, and earlier draws do not affect later ones.
What does the notation 2d6+3 mean?
Roll two six-sided dice and add 3 to the sum. The first number is the number of dice, the second the number of sides, and after the plus or minus comes the modifier.
How is the probability of a dice sum worked out?
Exactly: the distributions of the single dice are convolved. For two six-sided dice a sum of 7 has a chance of 6 in 36, or 16.7%.
Is the coin fair?
Yes: each flip is one random bit, so heads and tails are equally likely and the flips are independent. Five heads in a row is a normal event in a long series.
How do I pick a winner from several participants?
On the “From a list” tab paste the names one per line, choose the number of winners and press “Generate”. Everyone has the same chance.
Can I use this for an official draw?
For public prize draws a process the participants can verify is better, for example with a video recording and witnesses. This generator suits informal draws.
Are my lists and results stored or sent?
No. Everything happens in your browser, nothing is sent or stored, and no link to the result is created.