Skip to content

Rand

RAND Function

The RAND function in Excel generates a random decimal number between 0 and 1. The generated number includes 0 but is always less than 1.

Syntax:

=RAND()

This formula will produce a random decimal number such as 0.622548.

Usage Notes:

  • Every time the worksheet recalculates, RAND generates a new random number. This recalculation can occur when you open the worksheet, enter new data, or use functions that trigger a recalculation.
  • If you want to generate a random integer between two values, you can use the RANDBETWEEN function.
  • To generate a random number from a specific distribution or with specific characteristics, you may need to use additional functions or calculations in conjunction with RAND.

Important: While RAND generates random numbers, these numbers are generated by an algorithm and are therefore pseudorandom. For many purposes, these are sufficiently random, but they are not suitable for cryptographic applications.

Note: If you have a RAND, the test will fail because the calculation output will always be a different value on each run.