# Ceiling Function

### Description

The Ceiling function rounds a number up to the next multiple of number2, if specified.

### Syntax

Ceiling(number[,number2])

### Arguments

Number is the value to be rounded. The number can be a constant, a numeric field, an expression that results in a number or a function that returns a number.

Number2 is the optional multiple to which number is rounded. If this is not specified, it defaults to 1.0 (or -1.0), causing rounding/truncating to the nearest integer.

### Return value

This function returns a number.

Note: If number2 is zero, or if the sign of number2 differs from the sign of number, then these functions return a null value.

### Calculated field examples

If the Unit_price field contained the value 2.5, the following calculated field expression would return the number 3: Ceiling(Unit_price,1)

If the Unit_price field contained the value 12.46, the following calculated field expression would return the number 12.50: Ceiling(Unit_price,0.25)

### Filter/Find example

Records with a Unit_price field value of 35.01 or 35.17 can be selected or found using the expression: Ceiling(Unit_price,0.50)=35.5

© 2024 Altair Engineering Inc. All Rights Reserved.