Returns the nearest integer that is greater than or equal to a specified number.

Syntax

CEILING(<expN>)

<expN>

A number, from which to determine and return the integer that is greater than or equal to it.

Description

CEILING( ) returns the nearest integer that is greater than or equal to <expN>; in effect, rounding positive numbers up and negative numbers down towards zero. If you pass a number with any digits other than 0 as decimal digits, CEILING( ) returns the nearest integer that is greater than the number. If you pass an integer to CEILING( ), or a number with only 0s for decimal digits, it returns that number.

For example, if the default number of decimal places is 2,

CEILING(2.10) returns 3.00

CEILING(–2.10) returns –2.00

CEILING(2.00) returns 2.00

CEILING(2) returns 2

CEILING(–2.00) returns –2.00

Use SET DECIMALS to set the number of decimal places CEILING( ) displays.

See the table in the description of INT( ) that compares INT( ), FLOOR( ), CEILING( ), and ROUND( ).