FormulaCamp
Completed
← Google Sheets functions
Google Sheets function

RAND in Google Sheets

RAND in Google Sheets is volatile: it gives a new number on every recalculation, and the Calculation setting under File, Settings decides whether that also happens every minute or every hour.

Syntax (same in Google Sheets)

RAND()

A fixed random value needs Paste special, Values only.

For a fuller explanation of the arguments and common errors, see the RAND Excel guide.

Worked examples in Google Sheets

Lower bound check

A
1Check

Formula: C2: =RAND()>=0

Result: TRUE

Every generated value is at least zero.

Upper bound check

A
1Check

Formula: C2: =RAND()<1

Result: TRUE

The upper endpoint one is excluded.

Scale a fixed-width interval

A
1Width
20

Formula: C2: =10+RAND()*A2

Result: 10

A zero width keeps this verification stable while showing the usual lower + RAND()*width pattern.

Try it

A tiny spreadsheet with example data. Edit the formula or any number and see the result.

Formula in D2: =RAND()

Example spreadsheet for RAND
ABCD
1NumberStepResult
21234.567500.064242551837
3175
4-4.712
51449
62.53
75012
Result in D2: 0.064242551837

Frequently asked questions

Why does RAND keep changing in my Google Sheets file?
RAND recalculates whenever the sheet does, including after any edit. Paste its result as values to freeze it, or relax the recalculation setting under File, Settings, Calculation.

Google Sheets is used here only as a descriptive product name. FormulaCamp is not affiliated with Google.