# Ceil Script and chart function

Ceil() rounds up a number to the nearest multiple of the step shifted by the offset number.

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

Syntax:

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

Return data type: numeric

Arguments:

Arguments

| Argument | Description |
| --- | --- |
| x | Input number. |
| step | Interval increment. The default value is 1. |
| offset | Defines the base of the step interval. The default value is 0. |

Examples and results:

Examples and results

| Examples | Results |
| --- | --- |
| `Ceil(2.4 )` | Returns 3<br><br>In this example, the size of the step is 1 and the base of the step interval is 0.<br><br>The intervals are ...0 &lt; x &lt;=1, 1 &lt; x &lt;= 2, 2&lt; x &lt;=3, 3&lt; x &lt;=4... |
| `Ceil(4.2 )` | Returns 5 |
| `Ceil(3.88 ,0.1)` | Returns 3.9<br><br>In this example, the size of the interval is 0.1 and the base of the interval is 0.<br><br>The intervals are ... 3.7 &lt; x &lt;= 3.8, 3.8 &lt; x &lt;= 3.9, 3.9 &lt; x &lt;= 4.0... |
| `Ceil(3.88 ,5)` | Returns 5 |
| `Ceil(1.1 ,1)` | Returns 2 |
| `Ceil(1.1 ,1,0.5)` | Returns 1.5<br><br>In this example, the size of the step is 1 and the offset is 0.5. It means that the base of the step interval is 0.5 and not 0.<br><br>The intervals are ...0.5 &lt; x &lt;=1.5, 1.5 &lt; x &lt;= 2.5, 2.5&lt; x &lt;=3.5, 3.5&lt; x &lt;=4.5... |
| `Ceil(1.1 ,1,-0.01)` | Returns 1.99<br><br>The intervals are ...-0.01&lt; x &lt;= 0.99, 0.99&lt; x &lt;= 1.99, 1.99 &lt; x &lt;=2.99... |

## Learn more

* [Floor Script and chart function](https://help.qlik.com/en-US/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/floor.htm)