RAND

Formulas / RAND
Generates a random number between 0 and 1
0.773257393
  • RAND takes no arguments

Examples

  • =RAND()

    The RAND function can be used to generate a random number between 0 and 1. For example, using this formula will generate a random number. This value will always be greater than or equal to 0, and less than 1.

  • =RAND()*(9-1)+1

    The RAND function can also be used to generate random numbers between lower and upper bounds. For example, if you want a random number between 1 and 9 you can use the above formula. This is calculated by taking the random number between 0 and 1, multiplying it by the difference between the upper and lower limits (9 - 1 = 8), and then adding the lower limit (1).

Summary

The RAND function returns an evenly distributed random real number between 0 and 1.

  • The RAND function takes no arguments.
  • The RAND function calculates a new result each time a worksheet is edited and returns a new random decimal number from 0 to 1.


Frequently Asked Questions

What is the syntax of the RAND function?
The syntax of the RAND function is RAND().
Do the Rand function have any arguments?
No, the Rand function has no arguments.
What does the Rand function return?
The Rand function returns a random real number between 0 and 1. The numbers returned are evenly distributed.
How does Sourcetable generate random numbers?
Sourcetable generates random numbers using the Mersenne Twister algorithm.
Does the Rand function return the same random number each time?
No, the RAND function always returns a new random number. The new random number is calculated whenever the worksheet is regenerated.
How do I get a random number between a and b?
Use =RAND()*(b-a)+a to get a random number between a and b.
Sourcetable Logo

Work smarter

Al is here to help. Leverage the latest models to
analyze spreadsheets, enrich data, and create reports.

Drop CSV