Skip to content

$ceil

Rounds a numeric expression up to the nearest integer.

Syntax

{ "$ceil": <numberExpression> }

Example

Input

{ "measurement": 12.01 }

Stage

{ "$project": { "roundedUp": { "$ceil": "$measurement" } } }

Output

{ "roundedUp": 13 }