Random 3 Digit Number: How to Generate One

How-to basics · Updated November 24, 2026

Yes, a random 3-digit number is any integer from 100 to 999, inclusive. That gives exactly 900 possible values. If you need one quickly, you can use a random number generator, a spreadsheet formula, or even a physical die — but the method you choose affects whether the result is truly random or just good enough for everyday use.

What Counts as a 3-Digit Number

In mathematics and everyday usage, a 3-digit number must have a hundreds digit from 1 to 9. That means the smallest is 100 and the largest is 999. Numbers like 007 or 042 are not 3-digit numbers in the strict sense — they are 1- or 2-digit numbers with leading zeros. However, if you are generating a code or PIN that is always displayed with three characters, you might want to include leading zeros (e.g., 007, 042). In that case, the range becomes 000 to 999, giving 1,000 possibilities. Always clarify which range you mean when asking for a “random 3-digit number.”

How Randomness Works

True randomness is hard to achieve with a computer. Most computer-generated “random” numbers are actually pseudorandom — they follow a deterministic algorithm that produces a sequence that appears random. The algorithm starts with a seed value (often based on the current time) and then generates numbers that pass statistical tests for randomness. For most purposes — games, sampling, picking a lottery number — pseudorandom is fine. But if you need cryptographic security (like generating a password or encryption key), you must use a cryptographically secure random number generator (CSPRNG), which uses entropy from physical sources like mouse movements or hardware noise.

How to Generate a Random 3-Digit Number

Here are several practical ways, from simplest to most technical.

  • Online random number generator: Many websites offer a free tool where you set the minimum (100) and maximum (999) and click generate. Some allow you to exclude repeats or generate multiple numbers at once.
  • Spreadsheet formula: In Microsoft Excel or Google Sheets, you can use =RANDBETWEEN(100,999) to get a random integer in that range. In Excel, this function recalculates every time the sheet changes. For a static result, copy and paste as values.
  • Programming: In Python, random.randint(100,999) gives a random integer. In JavaScript, Math.floor(Math.random() * 900) + 100 does the same.
  • Physical methods: Roll three ten-sided dice (d10) — one for hundreds, one for tens, one for units — but treat a roll of 0 as 0, and if the hundreds die shows 0, reroll it (or use a d9 for hundreds). Alternatively, use a standard six-sided die and reroll any result above 9 (not efficient) or use a deck of cards with 0-9.

Common Problems and Misconceptions

One common misconception is that a random number generator “remembers” previous results. Unless you specifically set it to avoid repeats, each generation is independent — getting 123 once does not make 123 less likely the next time. Another issue is human-generated randomness: people asked to pick a random 3-digit number tend to avoid numbers with repeated digits (like 111 or 222) and favor numbers with a 7 or 3. This bias makes human picks far less random than a machine’s. Also, if you use a spreadsheet formula, be aware that it recalculates on every edit, so if you need to keep the result, copy and paste as values.

How to Choose a Random 3-Digit Number for a Specific Purpose

If you need a random number for a lottery, a giveaway, or a simple decision, any method above works. But if the number will be used for security (like a PIN or a verification code), do not use a simple pseudorandom generator — use a cryptographic one. For example, in Python, use secrets.randbelow(900) + 100 instead of random.randint. In Excel, there’s no built-in CSPRNG, so for security-critical numbers, use a dedicated password manager or a secure random number generator app. Also, if you need to avoid repeats across multiple draws (e.g., picking 10 distinct numbers), you must either remove each picked number from the pool or use a shuffling algorithm.

Comparing Random Number Sources

Here’s a quick comparison of common sources:

  • Spreadsheet RANDBETWEEN: Easy, but pseudorandom and recalculates. Good for casual use.
  • Programming language libraries: Most are pseudorandom (like Python’s random), but secure alternatives exist (like secrets).
  • Online generators: Vary in quality; some use secure random sources, but be cautious about entering sensitive data on unknown sites.
  • Physical dice: Truly random if the dice are fair and rolled properly, but slower and prone to human error in reading.
  • Random.org: Uses atmospheric noise, which is considered true randomness. It’s a reputable service for non-critical uses.

Costs and Safety Considerations

Generating a random 3-digit number is free in almost every method. Online generators may have ads or limits on the number of draws, but basic use is free. For security-sensitive numbers, never rely on a simple website unless it explicitly states it uses a CSPRNG. Also, if you plan to use the number as a password or PIN, remember that 3-digit numbers have only 900 or 1,000 possibilities — trivially easy to brute-force. A 3-digit number is not secure for anything more than a low-stakes game. For actual security, use at least 6-8 random digits.

Frequently Asked Questions

Is 000 a valid 3-digit number?

In strict mathematical terms, no — 000 is not a 3-digit number because it has no hundreds digit. However, if you are generating a code that must always be three characters long, you might include 000. In that case, the range is 000-999, giving 1,000 possibilities.

How do I get a random 3-digit number in Excel without it changing?

Use =RANDBETWEEN(100,999) in a cell, then copy that 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 copy-paste values.

What is the most common random 3-digit number people pick?

Studies of human randomness show that people tend to avoid repeated digits and often pick numbers like 369 or 777. There is no single most common number, but numbers with a 7 are disproportionately popular. If you need a truly random number, don’t ask a human.

Can I use a random 3-digit number for a lottery?

Yes, if the lottery allows any number from 000 to 999 (like a pick-3 game). For a pick-3 lottery, you would need to include leading zeros, so the range is 000-999. For a pick-4, you’d need four digits.

Is there a way to generate a random 3-digit number without a computer?

Yes — use physical dice. Roll a ten-sided die three times, once for each digit. If you want a number from 100 to 999, reroll if the hundreds die comes up 0. Or use a standard six-sided die and assign numbers 1-6 to digits, but that limits your range. A deck of cards with 0-9 works too.

Why does my spreadsheet formula keep changing?

Excel and Google Sheets recalculate volatile functions like RANDBETWEEN whenever the sheet changes. To freeze the value, copy the cell and paste as values. In Excel, you can also set calculation to manual (Formulas > Calculation Options > Manual) to prevent automatic recalculation.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.