Skip to main content Skip to complementary content

Ceil - script and chart function

Ceil() rounds up a number to the nearest multiple of the specified step interval. The result is increased by the value of offset, if one is specified, or reduced if offset is negative.

Compare with the floor function, which rounds input numbers down.

Syntax:  

Ceil(x[, step[, offset]])

Return data type: integer

Examples and results:  

Examples Results

Ceil( 2.4 )

Returns 3

Ceil( 2.6 )

Returns 3

Ceil( 3.88 , 0.1 )

Returns 3.9

Ceil( 3.88 , 5 )

Returns 5

Ceil( 1.1 , 1 )

Returns 2

Ceil( 1.1 , 1 , 0.5 )

Returns 1.5

Ceil( 1.1 , 1 , -0.01 )

Returns 1.99

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!