ROUND
The function ROUND rounds a number to a given decimal place.
This function takes a two Numbers as input: a base number to round up, and another number describing which decimal place to round it to. It returns another Number: the given number, rounded to the specified decimal place.
Declaration
Parameters
base_number (required, type: Number) The number to round.
digits (required, type: Number) The decimal place to round to. This specifies the number of digits that will trail the decimal point once rounding is complete. Giving 0 for the digits value results in ROUND rounding the base number to the nearest integer. ROUND also accepts negative numbers for digits, which specify how to round to a whole number: -1 means ROUND will round the base number to the ten's place, -2 means ROUND will round the base number to the hundred's place, -3 means ROUND will round the base number to the thousand's place, et cetera.
Return Values
rounded_number (type: Number) The base number rounded to the given decimal place.
Examples
The following example takes the the number 1. 5 and rounds it to the nearest integer:
The following example takes the number 5.8899 and rounds it to the nearest hundredth:
The following example takes the number 32 and rounds it to the nearest ten:
Discussion
The ROUND function follows the conventional rules of rounding. The digit to the right of the place being rounded to dictates whether the ROUND function will round up or down: if the digit in the next smallest place value is less than five, ROUND rounds down, otherwise it rounds up. To round only up or only down, use the ROUNDUP or ROUNDDOWN functions respectively.
In terms of rounding functionality, the ROUND function behaves identically to the MROUND function; the only difference between the two is that ROUND uses the number of digits to describe which place to round to, whereas MROUND uses a multiple.
Last updated