Skip to content

ceil ​

Rounds a number up to the nearest integer.

Type: transform

Parameters ​

  • input (unknown): The input number to round up.

Returns ​

Type: number

The rounded up integer, or NaN if input cannot be converted to a number.

Examples ​

javascript
ceil(3.2) // 4
javascript
(3.14)|ceil // 4
javascript
ceil(-2.8) // -2

Released under the MIT License.