LiveFlow raises $13.5 million Series A led by New York-based Valar Ventures and launches LiveFlow Next to revolutionize accounting!
Read More
Arrow
Back to guides
Excel Formulas

RAND Function in Excel: Explained

In this article, you will learn about the RAND formula and its uses in Excel.

What is a RAND function in Excel?

The RAND function in Excel is a built-in function that generates a random decimal number between 0 and 1. It is primarily used to generate random numbers for various purposes, such as creating random samples and simulations or developing random values for testing purposes.

Syntax of RAND Function in Excel

The syntax of the Excel RAND function is as follows:

=RAND()

When you enter this formula in a cell and recalculate the worksheet, Excel will generate a new random decimal number between 0 and 1. 

How to Use a RAND Function in Excel?

As you understand, the RAND function does not take any arguments as input. Take a glance at some simple cases.

Generating Random numbers between 0 and 1

You need to write the function below

=RAND()
An image showing the RAND formula in a cell  in Excel

A picture displaying a random number generated by the RAND formula in Excel

The random number keeps getting auto-updated on any activity in the cells.

Generating random numbers greater than or equal to 0 and less than 100

You need to write the following function.

=RAND()*100
A screenshot presenting another use case of the RAND function in Excel

 

A picture showing the random figure generated by the RAND function multiplied by 100 in Excel

As you can see, the random number is generated between 0 to 100. Similarly, you can generate random numbers between 0 to 1000 or so on by changing the multiplier factor.

Generating random integers greater than or equal to 0 and less than 100 

You need to write the function as follows. 

=INT(RAND()*100) 
An image capturing the combination of the INT and RAND functions with a multiplier of 100 in Excel

 

A screenshot displaying the result returned by the combination of the INT and RAND functions with a multiplier of 100 in Excel

Generating random numbers greater than or equal to X and less than Y where X and Y are numbers.

You need to insert the function as follows. 

=RAND()*(Y-X)+X

Suppose we need to generate random numbers between 22 and 32. The function to return the numbers that meet the criterion can be written as below.

=RAND()*(32-22)+22
An image presenting another application of the RAND formula in Excel

 

A picture showing the random number between 22 and 32, returned by the RAND function in Excel

When should you use the RAND Function in Excel? 

The RAND function in Excel is useful in situations where you need to introduce randomness or generate random numbers. It can be used for various purposes, such as creating random samples for statistical analysis, simulating random events or scenarios, generating random test data, or adding variability to models or calculations.

What is the difference between RAND and RANDBETWEEN functions in Excel?

In Excel, the RAND and RANDBETWEEN functions are used to generate random numbers, but they serve different purposes. The RAND function in Excel generates a random decimal number between 0 and 1. The RANDBETWEEN function, on the other hand, generates random whole numbers within a specified range in its arguments.

Learn how to do this step-by-step in the video below 👇

Automate financial reporting with LiveFlow

Cta Photo

Want to eliminate manual updates of your Excel & Google Sheets models?

Yes, show me how!

Get personal help

We guarantee you personal help on chat or Zoom within maximum 6 hours between 9am and 10pm EST.
Blue Tick
Email us at: help@liveflow.io

Liked this article? Then you'll love the ones below

Supercharge your financial reporting today

See LiveFlow in action and discover how to streamline your workflows.