# Documentation/Calc Functions/RAND

Jump to navigation
Jump to search
TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate

## Function name:

RAND

## Category:

Mathematical

## Summary:

Returns a random number between 0 and 1.

## Syntax:

RAND()

## Returns:

Returns a real number between 0(inclusive) and 1(inclusive), i.e. [0,1]. This function produces a new random number each time Calc recalculates. To force Calc to recalculate manually press F9.

## Arguments:

None

## Additional details:

To generate random numbers which never recalculate, either:

- Copy cells each containing =RAND(), and use
**Edit - Paste Special**(with**Paste All**and**Formulas**not marked and**Numbers**marked). - Use the Fill Cell command with random numbers (
**Sheet - Fill Cells - Fill Random Numbers**).

Use the RAND.NV() function for non-volatile random numbers.

## Examples:

Formula | Description | Returns |
---|---|---|

=RAND() | a random number between 0 and 1 | 0.80206289793007 |

=RAND() where we manually press F9 | a random number between 0 and 1 | 0.505532468097248 |

## Related LibreOffice functions:

## ODF standard:

## Equivalent Excel functions:

RAND