How To Create a Random List of Numbers in Google Sheets
Creating a random list of numbers in Google Sheets is handy for mock data, simulations, shuffling items, or simple practice exercises. Google Sheets has built‑in functions that can generate random values for you, and once you understand how they work, you can mix and match them for many different tasks.
This guide walks through the main methods, what each one actually does, and the key settings that change your results.
Core idea: how randomness works in Google Sheets
Google Sheets includes three key functions for randomness:
RAND()– generates a random decimal number between 0 and 1RANDBETWEEN(min, max)– generates a random whole number between two numbersRANDARRAY([rows], [columns], [min], [max], [whole_number])– generates a whole array (grid) of random numbers
Important behavior:
- These functions are volatile: they recalculate when:
- You edit the sheet
- You press F5 (reload) in the browser
- Google decides the sheet needs recalculation
- That means your “random” list can change every time unless you convert it to static values.
If you just need a quick, changing random list (for testing formulas, for example), you can leave it dynamic. If you need something fixed (e.g., a permanent random order of IDs), you’ll usually generate the list, then copy‑paste it as values.
Method 1: Simple random whole numbers with RANDBETWEEN
If you want a single column of random integers (whole numbers), RANDBETWEEN is the most straightforward.
Basic single random number
In any cell, type:
=RANDBETWEEN(1, 100) This creates a random whole number between 1 and 100 (inclusive).
Create a random list down a column
To create a list:
Click in cell A1.
Enter:
=RANDBETWEEN(1, 100)Press Enter.
Grab the fill handle (small square at the bottom-right of the cell) and drag it down to fill as many rows as you need.
You’ll now have a column like:
- 37
- 92
- 15
- 68
- …
Every time the sheet recalculates, these values may change.
Customize the range
Change the minimum and maximum to fit your needs:
- Random 4‑digit numbers:
=RANDBETWEEN(1000, 9999) - Random age between 18 and 65:
=RANDBETWEEN(18, 65) - Random month number:
=RANDBETWEEN(1, 12)
Method 2: Random decimals with RAND
If you need decimal values instead of integers, use RAND().
Generate basic random decimals
Type in a cell:
=RAND() This gives a random decimal between 0 and 1 (e.g., 0.27493).
Scale to a custom range
To get random decimals in a range (for example between 5 and 10):
=5 + (10 - 5) * RAND() General pattern:
=min + (max - min) * RAND() Examples:
- Random decimal between 0 and 100:
=0 + (100 - 0) * RAND()→=100 * RAND() - Random decimal between 1.5 and 3.5:
=1.5 + (3.5 - 1.5) * RAND()→=1.5 + 2 * RAND()
You can drag‑fill these just like RANDBETWEEN to get a vertical list.
Method 3: Generate many random numbers at once with RANDARRAY
RANDARRAY is useful when you want a block of random values in one go, instead of typing a formula and dragging.
Basic RANDARRAY usage
General form:
=RANDARRAY([rows], [columns], [min], [max], [whole_number]) rows– how many rowscolumns– how many columnsmin– minimum value (optional)max– maximum value (optional)whole_number–TRUEfor whole numbers,FALSEfor decimals (optional)
Example: list of 100 random integers from 1 to 1000
In one cell:
=RANDARRAY(100, 1, 1, 1000, TRUE) This spills a 100×1 range (a column) of random whole numbers.
Example: 10×5 grid of random decimals from 0 to 1
=RANDARRAY(10, 5) By default, if you skip extra arguments, you get decimals between 0 and 1.
Example: 20 random decimals between 50 and 75
=RANDARRAY(20, 1, 50, 75, FALSE) You now have a vertical list of 20 decimal numbers between 50 and 75.
Method 4: Make a random list of unique numbers (no duplicates)
If you need unique random numbers (for example, a shuffled list of IDs 1 to 100), you combine random numbers with sorting.
Approach: Assign random values, then sort
In column A, list your base numbers. For example, enter 1 in A1, 2 in A2, then drag down to 100.
In cell B1, enter:
=RAND()Drag the formula in B1 down to B100.
Select both columns A and B.
Go to Data → Sort range → Advanced range sorting options.
Choose to sort by column B, ascending.
Your numbers in column A are now in a random order. If you want this order to stay fixed:
- Select column A after sorting
- Copy
- Right‑click and choose Paste special → Paste values only
You can delete column B once you’ve locked in the order.
Method 5: Locking in your random list (static values)
Because random functions recalculate, you often need to freeze the current values.
To convert a random list into fixed numbers:
- Select the range containing the random formulas.
- Press Ctrl + C (or Command + C on Mac) to copy.
- Right‑click on the selected range.
- Choose Paste special → Paste values only.
Now the cells contain just numbers, not formulas, so they won’t change.
This step is important when:
- You’re assigning randomized seats, IDs, or groups
- You’re preparing test data to share with others
- You need results that don’t shift whenever the sheet updates
Method 6: Shuffle an existing list (indirect random numbers)
Sometimes you don’t want random numbers themselves, but a randomized order of an existing list (names, tasks, questions).
You can do this with numbers in the background.
Using SORT + RANDARRAY
If your original items are in column A, starting at A2, you can use:
=SORT(A2:A, RANDARRAY(ROWS(A2:A)), TRUE) How this works:
ROWS(A2:A)counts how many items you have.RANDARRAY(…)generates that many random helper numbers.SORTrearranges your list according to those random values.
Each recalc gives a new order. To freeze one version, copy the result and paste as values elsewhere.
Key settings and variables that change your outcome
The “right” way to generate a random list depends on several factors in your own situation.
1. Type of numbers you need
| Need | Best functions to consider |
|---|---|
| Whole numbers only | RANDBETWEEN, RANDARRAY(..., TRUE) |
| Decimal numbers | RAND, RANDARRAY(..., FALSE) |
| Unique sequence / shuffled list | RAND + SORT or RANDARRAY + SORT |
If your use case can’t tolerate duplicates (like unique ticket IDs), you must design around that, often by starting with a non‑random base list and shuffling it.
2. Size of the list
For short lists (a few dozen entries):
- Manually dragging
RANDBETWEENorRANDis easy.
For large lists (hundreds or thousands of rows):
RANDARRAYcan be more efficient and cleaner.- Large volatile ranges can slow down your sheet, especially if it’s already full of formulas.
3. Precision and range
Ask yourself:
- Do I need large numbers, or are small ranges fine?
- Do I care about decimal precision?
- Do I have any constraints like “between 1 and 31” (days of a month) or “up to 4 digits”?
These answers determine your min and max, and whether you scale RAND() manually or just use RANDBETWEEN.
4. Dynamic vs. fixed behavior
Do you want your list to:
- Update automatically (for continuous simulations or teaching demos)?
- Or stay frozen after creation (for grading, assigning resources, or tracking results)?
Dynamic lists stay as formulas. Static ones require that copy‑and‑paste‑values step. How “live” your sheet needs to be will steer you toward one or the other.
5. Spreadsheet complexity and performance
On a lightweight sheet, you can use random functions liberally. On a heavier one:
- Hundreds or thousands of volatile random formulas may slow calculations.
- Sometimes it’s better to:
- Generate random numbers once
- Convert them to values
- Remove the formulas afterward
Your computer’s performance, browser, and the overall complexity of your Google Sheet all play into what feels acceptable.
How different user profiles may approach random lists
Different people tend to use these tools in different ways, even though the underlying functions are the same.
Casual or beginner users
- Likely to use
=RANDBETWEEN(1, 100)or=RAND()directly. - Drag‑fill small lists, mostly for simple demos, practice, or quick random picks.
- Might not worry much about volatility until they notice numbers changing.
Office / productivity users
- Often need stable randomized orders (e.g., surveys, staff scheduling, assigning tasks).
- More likely to:
- Use the “random + sort” method for shuffling lists.
- Convert random values to static once a final version is chosen.
- May balance sheet performance with how much randomness is left dynamic.
Data / analytics users
- Use
RANDARRAYfor large test datasets. - Carefully control ranges and distribution (even if only via basic uniform random).
- Tend to be more aware of how volatile functions impact recalc time.
- Sometimes mix random functions with others (like
ROUND,INT, orIF) to simulate more specific patterns.
Where your own setup becomes the deciding factor
The functions themselves are straightforward, but which method is best for you depends on a mix of:
- Your goal: temporary test data, permanent random IDs, shuffled order, or ongoing simulation.
- Sheet size and complexity: a small one‑off sheet vs. a multi‑tab, formula‑heavy workbook.
- Your comfort level with formulas: simple one‑cell functions vs. combined
SORT+RANDARRAYsetups. - Need for stability: whether changing numbers later is acceptable, or a problem.
- Performance tolerance: how much recalculation delay you’re willing to live with.
Once you’re clear on those pieces for your own situation, the choice between RANDBETWEEN, RAND, RANDARRAY, or a shuffle‑by‑sort approach usually falls into place.