Back to top

ReQL command: ceil

Command syntax

r.ceil(number) → number

number.ceil() → number


Rounds the given value up, returning the smallest integer value greater than or equal to the given value (the value’s ceiling).

Example: Return the ceiling of 12.345.

> r.ceil(12.345).run(conn)


The ceil command can also be chained after an expression.

Example: Return the ceiling of -12.345.

> r.expr(-12.345).ceil().run(conn)


Example: Return Iron Man’s weight, rounded up with ceil.


Get more help

Couldn't find what you were looking for?