The function CEILING rounds a Number up to the nearest specified multiple.
This function takes a Number as input. By default, it will return the given Number rounded up to the nearest integer, though it also accepts, as an option, another Number as input, which specifies which place to round down to.
CEILING(base_number, multiple) -> rounded_number
- base_number (required, type: Number)
- Any number. This is the number that will be rounded up.
- multiple (optional, type: Number)
- The multiple to round up to.
- For instance, a multiple of 10 will round the given number up to the nearest ten, while a multiple of 0.01 will round the given number up to the nearest hundredth.
- rounded_number (type: Number)
- The base number rounded down to the given multiple.
CEILING(21.1) -> 22
The following example takes the number 312 and rounds it up to the nearest hundreds place. Note again that CEILING always rounds the base number up:
CEILING(312, 100) -> 400
The following example takes the number 102.11111 and rounds it up to the tenths place. Note one last time that CEILING always rounds the base number up:
CEILING(102.11111, 0.1) -> 102.2