CEIL

All functions > MATH > CEIL

Returns the number rounded up to the nearest integer (ceiling function).

Signatures

Returns: Integer result of rounding up

CEIL(number: T) → BIGINT
sql
ParameterTypeRequiredDescription
numberTYesThe number to round up

Notes

  • Always rounds towards positive infinity
  • CEIL(2.1) = 3, CEIL(2.9) = 3
  • CEIL(-2.1) = -2, CEIL(-2.9) = -2
  • Returns NULL if the input is NULL
  • For exact integers, returns the same value

Examples

FeatureQL
SELECT
    f1 := CEIL(2.1e0),  -- Positive decimal rounds up
    f2 := CEIL(2.9e0),  -- Another positive decimal
    f3 := CEIL(-2.1e0),  -- Negative rounds toward zero
    f4 := CEIL(-2.9e0),  -- Negative closer to integer
    f5 := CEIL(5.0e0),  -- Exact integer unchanged
    f6 := CEIL(0.0e0),  -- Zero unchanged
    f7 := CEIL(3.14159e0),  -- Pi rounds up to 4
    f8 := CEIL(-3.14159e0)  -- Negative pi rounds to -3
;
Result
f1 BIGINTf2 BIGINTf3 BIGINTf4 BIGINTf5 BIGINTf6 BIGINTf7 BIGINTf8 BIGINT
33-2-2504-3

Last update at: 2026/03/03 16:47:38
Last updated: 2026-03-03 16:48:19