RAND Function

Excel Functions › Math & Trig

All versions Math & Trig

The Excel RAND function returns a new random decimal number greater than or equal to 0 and less than 1 every time the sheet recalculates. It takes no arguments.


Quick answer:
=RAND() a random decimal from 0 up to (but not including) 1

Syntax

=RAND()
ArgumentDescription
(none)OptionalRAND takes no arguments — always use empty parentheses.

How to use it

RAND returns a uniformly distributed random decimal in the range 0 ≤ x < 1. It is volatile: it recalculates a fresh value every time the workbook recalculates (any edit, or pressing F9).

=RAND() // e.g. 0.5193... , changes on every recalc

Scale and shift it to land in any range. For a random decimal between a and b, use a + RAND()*(b-a):

=10 + RAND()*(50-10) // random decimal between 10 and 50

For random whole numbers, reach for RANDBETWEEN instead, or wrap RAND in INT. To spill a whole grid of random numbers at once (Excel 365), use RANDARRAY.

Volatile: the value changes on every recalculation. To freeze a result, copy the cell and Paste Special > Values.

Try it: interactive demo

Live demo

Pick a RAND example to see the formula and its result.

Result:

Practice workbook

📊
Download the free RAND practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

What range does RAND return?
A decimal that is greater than or equal to 0 and strictly less than 1 (0 ≤ x < 1). It will never return exactly 1.
Why does my RAND value keep changing?
RAND is volatile — it recalculates on every workbook change and whenever you press F9. To lock a value in place, copy it and use Paste Special > Values.
How do I get a random number in a custom range?
Use a + RAND()*(b-a). For example =10+RAND()*40 gives a random decimal between 10 and 50.
How is RAND different from RANDBETWEEN?
RAND returns a decimal between 0 and 1; RANDBETWEEN returns a whole number between two bounds you specify, such as =RANDBETWEEN(1,6) for a die roll.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: RANDBETWEEN · RANDARRAY · SEQUENCE · INT · ROUND