Links

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

1
ceil(2.5)
Result: 3
1
ceil(12.00001)
Result: 13
1
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 modified 1yr ago