Free · No sign-up · Instant

Random number generator

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.

Enter a valid integer
Must be greater than minimum
Enter a number from 1 to 200
Press Space to regenerate
Ad
Write with confidence
Fix grammar, improve clarity, and choose the right words — everywhere you write.
Try free →
Free plan · No credit card
6 numbers
  • 7
  • 42
  • 13
  • 99
  • 5
  • 28
Saved numbers (0) Copy saved
Click the heart on any number to save it here
Advertisement · 336×280
Grammarly — write with confidence
Grammar, tone & clarity. Used by 30 million people. Works in Google Docs, Gmail, Word and more.
Try Grammarly free

More random tools

Coin flips, dice rollers, and more — all free

Advertisement · 336×280
Grammarly — write with confidence
Instantly improve grammar, spelling, clarity, and tone. Works everywhere you write online.
Try Grammarly free

What is a random number generator?

The Random Number Generator (RNG) creates a truly random number list with no predictable sequence. You can set a minimum and maximum number, as well as the number of picks that you require, and the RNG will select numbers within that specified range. The result is as ‘fair’ as picking numbers from a hat where each number in the range has an equal chance of being picked for each draw (when allowing for repeats). Toggling off ‘duplicates’ causes the tool to switch to a ‘drawing without replacement’ model where no number can be selected twice.

Lottery and raffle use: duplicates off

This tool is also useful to draw winners for a raffle or to simulate a lottery. As an example, you printed 200 raffle tickets. In the generator, you then set the "min" and "max" values between 1 and 200 and the "count" to the number of prizes you'd like to give away. Under "options," you can then switch off the “duplicates” setting. Adjusting these settings will result in a unique list of numbers (there are no duplicates), like what you'd get from a lottery ticket. So you can use this tool for simulating the lottery (Powerball or Mega Millions). Simply adjust the minimum, maximum, and count, and let the generator do the work to simulate these games.

Dice rolls and games: duplicates on

If you want to simulate a dice roll, or any game where the same number can appear multiple times, keep the duplicate setting on. For a single die, a range of 1 to 6 can be specified. For two dice, you can choose the same range (1 to 6) and change the number of dice to roll to 2. A 20-sided die (D&D) would have a range of 1 to 20, and you would roll 1 die. This feature is also very useful to randomly pick a score, a book page, or even a question from a list that you numbered beforehand. The sort toggle is also very useful in that it sorts the numbers from smallest to biggest instead of in the order they were picked.

Classroom and teaching uses

Randomize a list of students (of any class size), make groups of students, create practice problems for students, or randomize the order in which you present information to students. Change the count to 1 and re-generate as needed. Alternatively, generate a list of ALL the student numbers and select from that list in a completely random and fair order. No account to set up and no software to download. Work in class with your computer, tablet, or smartphone. This is very easy to set up and use.

Statistical sampling and simulations

Researchers and analysts can use this tool to create random samples from a population or to randomly assign participants to control groups and treatment groups in experiments. For sample selection, the range is set to the size of the population, and duplicates are switched off. As many random samples are then generated as required. All results can then be copied and immediately inserted into a spreadsheet. You can then easily sort the results in the required order of the population's numbered list.

How the randomness works

This random number generator uses the Math.random() function found in JavaScript to create random numbers. This type of generator is called a pseudorandom number generator. Note that the generated numbers are not completely random but rather seem to be random for most applications and pass random number tests. The seed value is generated from the current time and from hardware noise bits. So, for games, raffles, classwork (i.e., picking random students from a class list), etc., this tool can be used to simulate randomness for programs, games, etc., to learn how to program, etc., but not for security purposes where you need to use a true random number generator (hardware random number generators, etc.). Such tools are also available as APIs, such as crypto.getRandomValues().

Frequently asked questions

What is a random number generator?
A random number generator (RNG) is an integer random number generator defined by simple parameters: minimum value, maximum value, and the number of numbers to generate. You can choose to generate numbers with or without duplicates. Thus, you can, for example, use this RNG for online raffles or for generating, for example, digital dice rolls with possible repeats of the same outcome.
Are the numbers truly random?
Math.random() is used to generate random numbers. This is a pseudorandom number generator that is seeded with hardware entropy. The numbers it generates pass a variety of statistical tests and are suitable for games, raffles, statistical sampling, and school exercises. However, for cryptographic purposes, a hardware RNG should be used.
How do I use this as a lottery picker?
Generate a lottery for a game like Powerball by setting the minimum value to 1 and the maximum value to the highest number for the white balls (e.g., 69). Set the Count for the lottery to the number of balls that are drawn for that portion of the game (e.g., 5). Disable duplicates for the generation. If there are a number of bonus balls drawn from a separate range of numbers, then generate a second list of numbers for those draws with a count of 1.
What is the difference between allowing and blocking duplicates?
With duplicates allowed, picks are independent events. With duplicates blocked, every pick is unique, just as if you were drawing tickets from a hat one at a time without replacing them. Use no-duplicates mode for raffles, for picking groups of people to do something, for assigning jobs to people, etc. For such cases, you want each option to appear only once.
Can I generate a random number between 1 and 10?
Simply select Min: 1, Max: 10, Count: 1, and click Generate. The range of numbers can be any (e.g., 1–6 for a standard six-sided die, 1–20 for a D&D d20, 1–100 to generate a percentage, etc.).

Who uses this tool

Teachers & facilitators
Pick random students, assign groups, set presentation order, and generate practice problems — all without bias or the appearance of favoritism.
Raffle & event organizers
Draw winners fairly with duplicates off. Set the range to your ticket count, pick as many winners as you need, and get a clean list instantly.
Game players & dungeon masters
Roll virtual dice for any polyhedral — d4, d6, d8, d10, d12, d20, d100. Generate multiple dice at once or simulate draws from a numbered deck.
Researchers & analysts
Create random samples, assign participants to groups, and seed simulations. Copy results directly into a spreadsheet with one click.