ceil

To round up a given number to the nearest integer

With this function, you can round up a decimal number to the next higher integer. Existing decimal places are removed, and the remaining integer is increased by 1.

If an integer is already passed as a parameter, it remains unchanged.

Syntax

ceil(number)

Return

number

Examples

ceil(2.5) 

Result: 3

ceil(12.00001) 

Result: 13

ceil(27) 

Result: 27

See also

floor, which rounds down a given number to the next lower integer.

round, which rounds a given number to the nearest integer.

Last updated