---
updatedAt: 2026-04-16T21:23:00.000Z
agentTools:
  projectIndex: https://docs.observeinc.com/llms.txt
---

# ceil

```
ceil(val: numeric, [precision: const int64]?) -> float64
```

Computes the ceiling of numeric `val` at a configurable decimal scale. By default the value is rounded up to an integer `int64` result; with a positive `precision` constant the result is a `float64` value retaining fractional digits at that scale. A null `val` propagates as null. The optional `precision` argument behaves like [round](function-round) and [floor](function-floor).

The `precision` argument is an optional compile-time constant in `[-18, 18]` that defaults to `0`. Values `<= 0` produce an `int64` (coarser-than-unit scales still use integer quantization); values `> 0` produce a `float64` with the given number of fractional digits.

# Domain

This is a scalar function (calculates a single output value for a single input row).

# Categories

* [Numeric](function#numeric-functions)

# Examples

<OpalCodeBlock code={
`make_col slots:ceil(@.utilization)
`}/>

Rounds utilization up to the next integer unit so capacity planning always allocates whole slots.

<OpalCodeBlock code={
`make_col billed:ceil(@.usage_hours, 2)
`}/>

Uses a positive precision so fractional hours are rounded up to two decimal places before billing aggregation.