Pages for iCloud: Functions used to round values
In Pages for iCloud, there are several functions that round numbers in different ways, depending on the desired result. All of these functions are located in the Numeric category in the Functions Browser.
CEILING
Rounds a number away from zero to the nearest multiple of a given number. Rounding occurs in steps; for example, the closest multiple of 10. Some examples are:
=CEILING(12,10) returns 20, as rounding is away from zero.
=CEILING(0.4,1) returns 1.
=CEILING (-0.4,-1) returns -1.
EVEN
Rounds a number away from zero to the nearest even number. Rounding is to the nearest number evenly divisible by two. Some examples are:
=EVEN(0.4) returns 2, as rounding is away from zero.
=EVEN(-0.4) returns -2.
FLOOR
Rounds a number toward zero to the nearest multiple of a given number. Rounding occurs in steps; for example, the closest multiple of 10. Some examples are:
=FLOOR(12,10) returns 10, as rounding is toward zero.
=FLOOR(0.4,1) returns 0.
=FLOOR (-0.4,-1) also returns 0.
INT
Rounds a number to the nearest integer that is less than or equal to a given number. Some examples are:
=INT(0.4) returns 0, as this is the nearest integer less than or equal to 0.4. For positive numbers, rounding is toward zero.
=INT(-0.4) returns -1, as this is the nearest integer less than or equal to -0.4. For negative numbers, the rounding is away from zero.
MROUND
Rounds a number to the nearest multiple of the given number. This function differs from CEILING, which rounds up to the nearest multiple. For example:
=MROUND(4,3) returns 3, since 4 is closer to 3 than to the next multiple of 3, which is 6.
=CEILING(4,3) returns 6, the nearest multiple of 3 when rounding up.
ODD
Rounds a number away from zero to the nearest odd number. Some examples are:
=ODD(1.4) returns 3, the nearest odd number when rounding away from zero.
=ODD(-1.4) returns -3.
ROUND
Rounds a number to the specified number of places. If the sign of the second argument is positive, this argument indicates the number of digits (decimal places) to the right of the decimal separator to include in the rounded number. If the sign of the second argument is negative, this argument indicates the number of digits to the left of the decimal separator to replace with zeros (the number of zeros at the end of the number). Some examples are:
=ROUND(1125.376,2) returns 1,125.38.
=ROUND(1125,-2) returns 1,100.
=ROUND(-1125.376,2) returns -1,125.38.
=ROUND(-1125,-2) returns -1,100.
=ROUND(-1155,-2) returns -1,200.
ROUNDDOWN
Rounds a number down (toward zero) to the specified number of places. If the sign of the second argument is positive, this argument indicates the number of digits (decimal places) to the right of the decimal separator to include in the rounded number. If the sign of the second argument is negative, this argument indicates the number of digits to the left of the decimal separator to replace with zeros (the number of zeros at the end of the number). Some examples are:
=ROUNDDOWN(1155.376,2) returns 1,155.37, since rounding is toward zero.
=ROUNDDOWN(1155,-2) returns 1,100.
=ROUNDDOWN(-1155.376,2) returns -1,155.37.
=ROUNDDOWN(-1155, -2) returns -1,100.
ROUNDUP
Rounds a number up (away from zero) to the specified number of places. If the sign of the second argument is positive, this argument indicates the number of digits (decimal places) to the right of the decimal separator to include in the rounded number. If the sign of the second argument is negative, this argument indicates the number of digits to the left of the decimal separator to replace with zeros (the number of zeros at the end of the number). Some examples are:
=ROUNDUP(1125.373,2) returns 1,125.38, since rounding is away from zero.
=ROUNDUP(1125,-2) returns 1,200.
=ROUNDUP(-1125.373,2) returns -1,125.38.
=ROUNDUP(-1125,-2) returns -1,200.
TRUNC
Truncates a number at the specified number of places. If the sign of the second argument is positive, this argument indicates the number of digits (decimal places) to the right of the decimal separator to include in the rounded number. If the sign of the second argument is negative, this argument indicates the number of digits to the left of the decimal separator to replace with zeros (the number of zeros at the end of the number). Extra digits are stripped from the number. Some examples are:
=TRUNC(1125.356,2) returns 1,125.35, as the number is truncated after the two places to the right of the decimal.
=TRUNC(-1125.356,2) returns -1,125.35.
=TRUNC(1155,-2) returns 1,100, as the number is padded with zeros for two places to the left of the decimal.