If you need a random number between 1 and 3, the answer is simply: 1, 2, or 3 — each has an equal chance of being selected. To generate one yourself, use a random number generator, a dice roll (with a 6-sided die, map 1-2 to 1, 3-4 to 2, 5-6 to 3), or a simple mental method like drawing straws. This article explains the mechanics, methods, and common pitfalls of generating a random integer in this small range.
What Does “Random” Really Mean Here?
When you ask for a random number between 1 and 3, you’re asking for a uniformly distributed integer. That means each of the three numbers has exactly a 1/3 (about 33.33%) chance of appearing. True randomness is unpredictable and lacks any pattern. However, most everyday methods (like asking a friend to “pick a number”) are biased — people tend to choose 2 more often than 1 or 3. For a truly fair result, you need a mechanical or algorithmic source.
Common Ways to Generate a Random 1-3
Here are the most practical methods, from simplest to most rigorous:
- Physical dice: Roll a six-sided die. If it lands on 1 or 2, call it 1; 3 or 4 → 2; 5 or 6 → 3. This is perfectly uniform if the die is fair.
- Coin flips: Flip a coin twice. Let HH=1, HT=2, TH=3, and TT=re-flip. This gives equal probability, though it may take a few extra flips.
- Online RNG: Use a reputable random number generator website or app. Look for one that uses a cryptographic source (like random.org) for true randomness.
- Calculator or phone: Many scientific calculators have a
RANDfunction. Multiply the result by 3, add 1, and take the integer part (floor). For example, if RAND gives 0.734, then 0.734*3+1 = 3.202, floor = 3. - Spreadsheet: In Excel, use
=RANDBETWEEN(1,3)to get an integer. In Google Sheets, the same function works. These are pseudo-random but fine for most non-security uses.
How to Do It in Excel or Google Sheets
If you want a random number in a spreadsheet, the formula is simple. In Excel (Microsoft 365) or Google Sheets, enter =RANDBETWEEN(1,3) in a cell. This returns an integer between 1 and 3, inclusive, with each value equally likely. The function recalculates whenever the sheet changes. For a one-time static number, copy the cell and paste as values (right-click > Paste Special > Values).
Alternatively, use =INT(RAND()*3)+1. This works by generating a decimal between 0 and 1, multiplying by 3 (giving 0 to 2.999), taking the integer part (0, 1, or 2), then adding 1. Both methods are valid, but RANDBETWEEN is more straightforward. Note: RANDBETWEEN is volatile, meaning it recalculates every time the worksheet recalculates. If you need a fixed set of random numbers, copy them and paste as values.
Why People Usually Get It Wrong
The most common mistake is using a mental method that introduces bias. For example, asking a person to “think of a number from 1 to 3” often results in 2, because it feels “middle.” Another error is using a random number from a larger range and taking modulo 3 without adjusting for bias. For instance, if you take a random number from 1 to 6 and use MOD(n,3)+1, you get 1,2,3,1,2,3 — that’s fine. But if you take a number from 1 to 5 and use modulo, the results are not equally likely because 1 and 2 appear twice as often as 3. Always ensure the source range is a multiple of 3.
Applications and Use Cases
Generating a random 1-3 is useful in many real situations:
- Games: Choosing a door in a trivia game, deciding which of three players goes first, or simulating a three-way tie.
- Decision-making: When you have three options (e.g., where to eat, which movie to watch), a random pick removes bias.
- Sampling: In statistics, assigning subjects to one of three groups randomly.
- Programming: In code, you might use
Math.floor(Math.random() * 3) + 1in JavaScript, orrandom.randint(1,3)in Python.
Safety and Fairness Considerations
For most casual purposes, any method is fine. However, if the random number is used for something important (like a lottery, a prize draw, or a cryptographic key), you need a cryptographically secure random source. Online RNGs that use atmospheric noise (like random.org) are considered truly random. In programming, use a secure library (e.g., secrets in Python) rather than the built-in pseudo-random generator. Also, be aware that some physical dice are slightly biased due to imperfections, but for a 1-3 mapping, the bias is usually negligible.
Frequently Asked Questions
Is there a way to get a random number 1-3 without any tools? Yes, you can use a simple mental trick: think of a number between 1 and 3, but to avoid bias, use a physical action like picking a random word from a book and counting its letters modulo 3 (with 0 → 3). However, this is not truly random because your brain influences the choice.
Can I use a deck of cards to generate a 1-3? Yes. Take a standard deck, assign each card a value (e.g., A=1, 2=2, 3=3, and so on), but you need to handle the 52 cards carefully. A simpler method: draw a card, if it’s a heart, call it 1; spade, 2; diamond, 3; club, re-draw. That gives equal probability (13 cards each) for the first three suits.
What is the difference between a random number and a pseudo-random number? A true random number comes from a physical process (like radioactive decay or atmospheric noise) and is unpredictable. A pseudo-random number is generated by an algorithm and is deterministic — if you know the seed, you can predict the sequence. For everyday use, pseudo-random is fine, but for security, use true random sources.
How do I get a random number 1-3 in Python? Use import random; random.randint(1,3). This returns an integer. For cryptographically secure, use secrets.randbelow(3) + 1.
Why does my random number generator keep giving me 2? If you’re using a physical method like asking a friend, it’s likely bias. If you’re using a computer, it could be a flawed algorithm or you might be using a range that’s not uniform. For example, if you take rand() % 3 in C with a range that isn’t a multiple of 3, you get more 1s and 2s than 0s.
Related
- Random Org Generate Code? How It Works
- Chrome Back Shortcut: Keys, Mouse, and Touch
- Best Time to Hire Data Entry Operators
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- The Knot Budget Spreadsheet: Set Up a Wedding TrackerThe Knot budget spreadsheet usually means either The Knot’s online wedding-budget planner or a spreadsheet someone has made…
- How to Group Rows in Excel With the Plus SignTo group rows in Excel and add a collapsible plus sign, select the detail rows, then choose Data…
- Does Block Sender in Outlook Really Work? What to KnowYes—Outlook’s Block Sender feature works by directing future email from a blocked address to Junk Email, rather than…
- How to Insert a Check Box in Word for Lists or FormsTo add a clickable check box in the Word desktop app, open the Developer tab and select Check…
- How to Combine Columns in Excel Without Losing DataTo combine two columns in Excel without removing their original contents, put the result in a new, empty…
- Traffic Light Signal with Time Display: How It WorksA traffic light signal with a time display—often called a countdown timer—shows the remaining seconds before the light…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.