Generate random numbers in any range — set your min, max, and count. Block duplicates for raffles or allow repeats for dice-style rolls. One click, no sign-up.
Coin flips, dice rollers, and more — all free
A random number generator (RNG) produces a sequence of numbers with no correlation between them. The RNG can be set to a minimum and maximum number, as well as the number of numbers to be generated within that range. The tool selects numbers from within the defined range, making it as fair as picking numbers out of a hat. Each integer within the range has an equal chance of being picked on every draw (if duplicates are allowed). The tool can be set to draw without duplicates by toggling off the option that allows for duplicates to be picked.
The no-duplicates mode of the tool is most useful for drawing raffle winners or creating a lottery. You set the range to include all the tickets in your pool. You set the count to the number of prizes you are awarding. You uncheck the option to allow duplicates. You then click Generate, and each of the numbers in the resulting list will be a different winner. The numbers can be used to fill tickets for a subsequent drawing. For simulating games like the Powerball (1–69 for the five balls) or the Mega Millions (1–70 for the five balls), you simply set the min, max, and count to the appropriate values.
Many, many simulations of rollable items such as dice also make sense here. One die? 1–6, count 1. Two dice? 1–6, count 2. A d20 for D&D? 1–20, count 1. This tool can also be used to randomly select scores from a list of scores, to pick random pages from books, to randomly select questions from a list of questions with numbers in front of them, and so on. Sorting the results (toggle sort) is then also very useful here.
Random number generators are used often in classrooms for picking random students (e.g., a number between 1 and the number of students in the class), for making groups, for picking random practice problems, and for randomizing the order of speaker presentations. This simple tool can be used over and over again with no accounts to set up and no software to download, and it works great on any device with a web browser.
In research, random number generators are used to select random samples from populations, to assign participants to treatment and control groups, or even to seed Monte Carlo simulations. For such purposes, you can set up the tool to select a sample of a certain size from a population of the size of your dataset. All numbers are copied to the clipboard and can then be pasted into your spreadsheet. Numbers are sorted by the tool, so that they can be easily compared to numbers from your dataset which have been sorted in the same way.
This tool uses the same JavaScript Math.random() (pseudorandom number generator PRNG) that powers all the other tools on this site. It has been tested for statistical randomness and passes all relevant tests. It is seeded with the system time and with hardware random numbers where available, so it is quite unpredictable and therefore perfectly fine for most games, raffles, school activities, etc. However, for true security – such as for cryptographic key generation – you will need a Hardware RNG or something that uses the crypto.getRandomValues() method.
Math.random(), a pseudorandom number generator built into every modern browser. It is seeded from hardware entropy and produces outputs that pass statistical randomness tests — more than sufficient for games, raffles, sampling, and classroom use. For cryptographic applications, use a dedicated hardware-based RNG.