Ceil - script and chart function

Ceil() rounds x up to the nearest multiple of step [+ offset]. The default value of offset is 0.

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 information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?