Random Number Generator — Single Numbers, Lists, Dice and Coins
Our free random number generator lets you generate a single random number in any range, create a list of multiple random numbers with or without duplicates, roll any standard tabletop dice, or flip a virtual coin. All results are generated instantly with a single click — no signup, no ads, no limits.
How to Generate Random Numbers
Single Random Number
Set your minimum and maximum values and click Generate. The result is a random whole number anywhere within your specified range, inclusive of both endpoints. The default range of 1 to 100 is the most commonly used for general purposes like picking a number for a game or making a decision.
Multiple Random Numbers
Enter your range, set how many numbers you need, and choose whether duplicates are allowed. The generator produces the full list instantly. Use this for lottery number picks, assigning random values to a list, creating test data, or any situation requiring a batch of random numbers.
Dice Roller
Select your dice type and how many dice to roll, then click Roll. The result shows each individual die value and the combined total. Standard tabletop dice types are all supported: d4, d6, d8, d10, d12, d20, and d100 (also called d%).
Coin Flip
Click Flip Coin for a 50/50 heads or tails result. The session tracker shows your running totals so you can track streaks or run probability experiments over multiple flips.
Common Uses for a Random Number Generator
| Use Case | Mode | Settings |
|---|---|---|
| Pick a lottery number | Multiple Numbers | Range 1–49, pick 6, no duplicates |
| Decide between options | Single Number | Range 1–(number of options) |
| Roll for initiative (D&D) | Dice Roller | 1d20 |
| Roll damage (D&D) | Dice Roller | Varies by weapon (e.g. 2d6) |
| Random team assignments | Multiple Numbers | Range 1–(team size), no duplicates |
| Pick a random winner | Single Number | Range 1–(number of entrants) |
| Coin toss decision | Coin Flip | Heads or tails |
| Generate test data | Multiple Numbers | Any range, duplicates allowed |
| Password number component | Multiple Numbers | Range 0–9, pick 4–6 digits |
| Classroom random selection | Single Number | Range 1–(class size) |
Standard Dice in Tabletop Games
Tabletop role-playing games like Dungeons and Dragons use a set of polyhedral dice referred to collectively as a dice set. Here is what each die is used for:
| Die | Sides | Common Use in D&D |
|---|---|---|
| d4 | 4 | Damage for small weapons (dagger, magic missile) |
| d6 | 6 | Damage for medium weapons, hit dice for rogues |
| d8 | 8 | Damage for versatile weapons, hit dice for clerics |
| d10 | 10 | Damage for heavy weapons, percentile with d% |
| d12 | 12 | Damage for greataxe, hit dice for barbarians |
| d20 | 20 | Attack rolls, saving throws, ability checks |
| d100 | 100 | Percentile rolls, wild magic tables |
How Random Number Generation Works
Computers cannot generate truly random numbers on their own because they are deterministic machines — given the same input, they always produce the same output. Instead, they use pseudo-random number generators (PRNGs), which are algorithms that produce sequences of numbers that appear random and pass statistical tests for randomness.
JavaScript's Math.random() function is a PRNG that produces a floating point number between 0 (inclusive) and 1 (exclusive). To generate a random integer between a minimum and maximum value, the formula is: Math.floor(Math.random() * (max - min + 1)) + min. This produces results that are statistically uniform across the range and suitable for all practical purposes including games, simulations, and random selections.
True Random vs Pseudo Random
| Feature | Pseudo-Random (Math.random) | True Random |
|---|---|---|
| Source | Algorithm + seed | Physical processes (atmospheric noise, etc.) |
| Speed | Extremely fast | Slower (requires hardware input) |
| Reproducible? | Yes, with same seed | No |
| Suitable for games? | Yes | Yes |
| Suitable for cryptography? | No | Yes |
| Example tools | This generator, Excel RAND() | Random.org |
Frequently Asked Questions
How do I pick a random number between 1 and 100?
Use Single Number mode with the default settings (Min: 1, Max: 100) and click Generate. The result is a uniformly random integer from 1 to 100 inclusive.
How do I randomly pick from a list?
Number each item in your list starting from 1, set the range from 1 to the total number of items, and generate a single random number. The item corresponding to that number is your random selection.
Can I use this for a raffle or giveaway?
Yes. Assign each entrant a number, set the range from 1 to the total number of entrants, and generate a single random number to pick the winner. For transparency, you can screenshot the result or generate in front of witnesses.
What is the probability of rolling a 20 on a d20?
The probability of rolling any specific number on a fair 20-sided die is 1 in 20, or 5%. A natural 20 (critical hit in D&D) has exactly this 5% probability on any given roll.
How many random numbers can I generate at once?
This generator supports up to 100 numbers per batch in Multiple Numbers mode. For larger datasets, consider running multiple batches or using a spreadsheet tool with a RAND() function.