ceil()


Syntax

ceil(x)

Returns

Number

Description

Rounds the input up to the nearest integer. Note that this function rounds away from zero for positive numbers, but towards zero for negative numbers.

Arguments

  • x (Number): The numerical value or expression to evaluate.

Examples

  • ceil(1.1) results in 2.
  • ceil(-1.1) results in -1.