ReferenceFunctionsRandom Functions
RAND
Returns a uniformly distributed pseudo-random number in the interval `[0, 1)`.
Summary
RAND is volatile and recalculates whenever dependent formulas recalculate.
Remarks
- The result is always greater than or equal to
0and strictly less than1. - Because the function is volatile, repeated evaluations can return different values.
- The engine seeds randomness per evaluation context for reproducible execution flows.
Examples
RAND stays within bounds
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
true
Derived integer bucket from RAND
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
true
Related functions
FAQ
Can RAND return the same value on every recalculation?
Not by default. RAND is volatile, so recalculation can produce a different sample each time.
If RAND is used twice in one formula, do both uses share one sample?
Only if you bind it once (for example with LET). Two separate RAND calls are two separate draws.
Why does RAND look deterministic in some engine runs?
Randomness is seeded per evaluation context, which keeps a run reproducible while still treating RAND as volatile across recalculations.
Runtime metadata
Category
Random
Signature
RAND()Arity
min 0, max 0
Caps
VOLATILE
Source