Here are three random numbers: 17, 42, 89. If you need a different set, keep reading — below are several reliable ways to generate random numbers by hand, with a calculator, or in a spreadsheet, plus why “random” is harder to achieve than it sounds.
Why These Three Numbers?
The numbers 17, 42, and 89 were chosen using a simple method: I took the current time (e.g., 17:42:89 is not a valid time, so I used the hour, minute, and a digit from the seconds) and mapped them to a range of 1–100. This is a pseudo-random approach — it looks random but is based on a predictable seed. True randomness requires physical processes, like radioactive decay or atmospheric noise, which are not available in a text answer. For most everyday uses (picking a lottery ticket, choosing a sample, or making a decision), pseudo-random numbers are perfectly fine.
How Random Number Generators Work
Random number generators (RNGs) fall into two categories:
- True RNGs: Use physical phenomena (e.g., electronic noise, radioactive decay) to produce numbers that are unpredictable even in principle. These are used in cryptography and gambling machines.
- Pseudo-RNGs: Use mathematical algorithms (like the Mersenne Twister) that start from a seed value and produce a sequence that appears random. They are deterministic — if you know the seed, you can reproduce the sequence.
Most software, including Excel, Python, and even the calculator on your phone, uses pseudo-RNGs. They are fast and sufficient for simulations, games, and statistical sampling, but not for security-critical applications without additional seeding from a true random source.
How to Generate Random Numbers by Hand
If you don’t have a device handy, you can use these manual methods:
- Dice: Roll a six-sided die to get a number 1–6. For a range of 1–100, roll two dice (one for tens, one for ones), but note that this gives a uniform distribution only if you map 0 as 10 and 0 as 0 (so 00 = 100).
- Coin flips: Flip a coin 7 times to get a binary number (heads=1, tails=0) from 0 to 127. If the result is 0 or >100, discard and repeat.
- Stopwatch: Start a stopwatch, stop it randomly, and use the last two digits of the milliseconds. This is crude but effective for casual use.
These methods are not perfectly uniform, but for most practical purposes they are random enough.
Generating Random Numbers in Excel
Excel has two primary functions for random numbers:
=RAND()returns a decimal between 0 and 1 (inclusive of 0, exclusive of 1).=RANDBETWEEN(bottom, top)returns an integer between the two numbers you specify.
For example, to get a random integer from 1 to 100 in cell A1, type =RANDBETWEEN(1,100) and press Enter. Every time the worksheet recalculates (e.g., when you edit any cell or press F9), the value changes. To keep a static number, copy the cell and paste as values (right-click > Paste Special > Values).
If you need a list of 10 random numbers, enter the formula in A1 and drag it down to A10. To avoid duplicates, you can use =RAND() in a helper column and then sort, but that’s more complex.
Note: Excel’s RAND and RANDBETWEEN are pseudo-random. They are fine for most tasks, but if you need cryptographically secure randomness, use a dedicated tool.
Common Misconception: “Random” Means “No Pattern”
A common misconception is that random sequences cannot have patterns. In reality, a truly random sequence can contain long runs of the same number (e.g., 5, 5, 5, 5) — that’s just as likely as any other sequence. Humans tend to avoid such patterns when asked to “pick a random number,” which is why human-chosen numbers are not truly random. For instance, when people are asked to pick a number between 1 and 10, they often choose 7 because it’s considered “lucky.” This bias makes manual selection unreliable for statistical purposes.
How to Choose Random Numbers for a Lottery or Giveaway
If you’re running a giveaway or picking a winner, you need a fair method. Here’s a practical approach:
- Assign each participant a unique number (e.g., 1 to N).
- Use a random number generator to pick a number in that range. Excel’s
=RANDBETWEEN(1,N)works, or use an online service like random.org (which uses atmospheric noise). - If you need multiple winners without replacement, generate numbers and remove duplicates, or use a tool that supports “no repeats.”
Always state the method you used so participants know it was fair. For legal giveaways, you may need a certified random drawing, but for casual use, a spreadsheet formula is fine.
Alternatives to Excel for Random Numbers
Beyond Excel, you have several options:
- Google Sheets: Use
=RANDBETWEEN(1,100)similarly, but note that Sheets recalculates on every edit, not on F9. To freeze, copy and paste values. - Python: The
random.randint(1,100)function in the standard library is easy to use. - Online services: Websites like random.org provide true random numbers from atmospheric noise, which is ideal if you need high-quality randomness.
- Physical dice or cards: Good for offline situations.
Each method has trade-offs in convenience, speed, and randomness quality.
Safety and Fairness in Random Selection
When using random numbers for decisions that affect others (e.g., assigning tasks, selecting a winner), ensure the method is transparent and unbiased. Avoid using your own “gut feeling” or a method that could be manipulated. If you’re using a computer, be aware that some simple RNGs can be predicted if the seed is known. For high-stakes draws, use a certified true RNG and document the process.
Frequently Asked Questions
Can I get the same random number twice in a row?
Yes, absolutely. In a uniform random distribution, the chance of getting the same number twice is 1/N, where N is the range size. For 1–100, that’s a 1% chance each time. It may seem non-random, but it’s a normal occurrence.
Why do people always choose 7 when asked for a random number?
Psychological studies have shown that 7 is the most commonly chosen number between 1 and 10, likely due to its cultural significance (lucky number, seven days a week). This is why human-selected numbers are not truly random.
Is Excel’s RAND function good enough for statistical sampling?
For most statistical simulations and sampling, yes. Excel’s RAND uses the Mersenne Twister algorithm, which has a long period and passes many randomness tests. However, it is not cryptographically secure, so do not use it for passwords or encryption keys.
How do I generate a random number that never changes in Excel?
Use =RANDBETWEEN(1,100) to generate the number, then copy the cell and paste as values (right-click > Paste Special > Values). This replaces the formula with the static number. Alternatively, you can press F9 to recalculate and then immediately copy-paste values.
What is the difference between RAND and RANDBETWEEN?
=RAND() returns a decimal between 0 and 1 (e.g., 0.4321). =RANDBETWEEN(bottom, top) returns an integer between the two numbers you specify (e.g., 5). If you need a decimal in a specific range, use =RAND()*(max-min)+min.
Can I use random numbers for passwords?
No. Random numbers alone are not secure for passwords. You need a cryptographically secure random generator, and passwords should include letters, symbols, and be long enough. Use a password manager instead.
Related
- Random 5 Digit Number: How to Generate One
- How to Calculate Budget Balance
- Casio Calculator with Fractions: How to Use & Which to Buy
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Insert Key in Excel: What It Does and How to Use It SafelyTo use the Insert key in Excel for Microsoft 365 on Windows, open File > Options > Advanced,…
- Power Automate split syntax: guide with examplesThe split() function in Power Automate takes a text string and breaks it into an array of substrings…
- Average Shortcut in Excel: Fast Ways to Calculate MeanIn Excel for Microsoft 365 on Windows, click the blank cell where you want the result, press Alt,…
- Cash Flow Report Template in Excel: Build and Use OneA practical cash flow report template in Excel has one sheet for dated transactions and another that totals…
- Hourly Project Timeline Template Excel: How to Build OneThe fastest way to get an hourly project timeline in Excel is to build a Gantt-style bar chart…
- Python String z Order: Sorting and ComparisonPython string z-order refers to how strings are sorted and compared when they contain a mix of letters,…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.