Use the RAND and RANDBETWEEN functions to create random numbers
Google Sheets has two built-in functions that generate random numbers. RAND() creates a decimal between 0 and 1, while RANDBETWEEN() creates a whole number within a range you specify. Both functions recalculate every time the sheet updates, so your random numbers will change unless you convert them to static values.
The function you choose depends on what you need. If you want decimals for calculations or percentages, use RAND. If you want whole numbers — like lottery picks, dice rolls, or ID numbers — use RANDBETWEEN with a minimum and maximum value.
Key Takeaways
- RAND() generates a decimal between 0 and 1; RANDBETWEEN(min, max) generates a whole number within your specified range.
- Type the function directly into a cell, and Google Sheets calculates it immediately — no special menu or dialog needed.
- Random numbers recalculate every time the sheet changes, so copy and paste as values if you need them to stay the same.
- You can fill a column or range with the same formula by selecting the cell and dragging the fill handle down, or by selecting the range and pressing Ctrl+D (Windows) or Cmd+D (Mac).
Create a list with RANDBETWEEN for whole numbers
Open your Google Sheet and click the cell where you want the first random number. Type =RANDBETWEEN(1,100) to generate a whole number between 1 and 100. Replace 1 and 100 with your own minimum and maximum values. Press Enter, and the number appears immediately.
To fill a column with random numbers, click the cell containing your formula. Look for the small blue square in the bottom-right corner of the cell — this is the fill handle. Click and drag it down as far as you need. Each cell will contain a new random number within your range. Alternatively, select the cell with the formula, then select the entire range where you want numbers (for example, A1:A50), and press Ctrl+D on Windows or Cmd+D on Mac to fill down.
Each time you make any change to the sheet — typing in a cell, deleting a row, or even just opening the file — all your random numbers recalculate and change. This is normal behavior. If you need the numbers to stay fixed, see the section below on converting them to static values.
Create a list with RAND for decimals
Click the cell where you want a decimal random number and type =RAND(). There are no parameters to set — the function always generates a number between 0 and 1 with many decimal places. Press Enter.
To fill a column, use the same method as RANDBETWEEN: drag the fill handle down, or select your range and press Ctrl+D (Windows) or Cmd+D (Mac). If you need random decimals in a different range — for example, 0 to 50 — multiply the result: =RAND()*50 gives you a decimal between 0 and 50.
Stop the numbers from changing with Paste Special
Because random functions recalculate constantly, your list will change every time you interact with the sheet. To lock the numbers in place, you must convert them from formulas to static values.
Select all the cells containing your random numbers. Copy them (Ctrl+C on Windows, Cmd+C on Mac). Right-click and choose Paste special, then select Values only. The formulas disappear and are replaced with the numbers themselves. Now they will not change.
If you do not see "Paste special" in the right-click menu, use the keyboard shortcut instead: Ctrl+Shift+V on Windows or Cmd+Shift+V on Mac. A dialog box opens with paste options. Click Values only and confirm.
Create a random list without duplicates
RANDBETWEEN and RAND do not prevent duplicates — if you generate 10 random numbers between 1 and 10, you may get the same number twice. To create a list of unique random numbers, use a different approach.
In a new column, type numbers in order: 1, 2, 3, and so on up to your maximum. In the next column, use =RAND() next to each number. Sort both columns by the RAND column (highest to lowest or lowest to highest — the order does not matter). The numbers are now shuffled randomly with no repeats. Delete the RAND column when you are done, or keep it and convert it to values if you want to preserve the shuffle.
This method works because sorting by random decimals effectively shuffles your original list. It is the most reliable way to get a random order without duplicates in Google Sheets.
Common mistakes and how to fix them
The most common error is forgetting the equals sign. Typing RANDBETWEEN(1,100) without the = at the start treats it as text, not a formula. Always start with =.
Another mistake is using the wrong function for your needs. RAND gives decimals with many digits after the decimal point — if you need whole numbers, use RANDBETWEEN instead. Trying to round RAND results adds unnecessary steps when RANDBETWEEN does the job directly.
If your random numbers keep changing when you do not want them to, you forgot to convert them to values. Select the cells, copy, and paste as values only to lock them in.
If you see #NAME? or #ERROR in a cell, check your formula for typos. Common mistakes include missing parentheses, spaces in the wrong places, or incorrect syntax like RANDBETWEEN 1 100 instead of RANDBETWEEN(1,100).
Use random numbers for real tasks
Random number lists are useful for more than just testing. You can use RANDBETWEEN to assign random order to a list of names (shuffle them for team selection), generate sample IDs for testing, create random quiz questions from a question bank, or pick random rows from a dataset.
For picking random items from a list, combine RANDBETWEEN with INDEX: =INDEX(A:A,RANDBETWEEN(1,10)) picks a random cell from the first 10 rows of column A. This is more powerful than a simple number list because it returns the actual item, not just a number.
Frequently Asked Questions
Can I generate random numbers without them changing every time I edit the sheet?
Yes. After you create your random numbers with RAND or RANDBETWEEN, select them, copy, and paste as values only. This converts the formulas to fixed numbers that never recalculate. Use Ctrl+C to copy, then Ctrl+Shift+V (Windows) or Cmd+Shift+V (Mac) to open Paste Special and choose Values only.
What is the difference between RAND and RANDBETWEEN?
RAND generates a decimal between 0 and 1 with many digits. RANDBETWEEN generates a whole number within a range you set, like 1 to 100. Use RANDBETWEEN for whole numbers and RAND for decimals or when you need to multiply the result for a custom range.
How do I create a random list with no repeating numbers?
Create a column with numbers 1 through your maximum, add RAND() in the next column, then sort both columns by the RAND column. This shuffles your original numbers randomly without repeats. Delete the RAND column when done, or convert it to values to keep the shuffle permanent.
Why do my random numbers keep changing?
RAND and RANDBETWEEN recalculate every time the sheet updates — when you type, delete, or even just open the file. This is normal. To stop them from changing, convert the formulas to values by copying, then pasting as values only.
Can I generate random numbers in a specific range like 50 to 100?
Yes, with RANDBETWEEN. Type =RANDBETWEEN(50,100) to generate whole numbers between 50 and 100. For decimals in a range, use =RAND()*50 for 0 to 50, or =RAND()*50+50 for 50 to 100.