--- type: "fhirpath-function" title: "FHIRPath Function: ceiling" function: "ceiling" category: "Math" section: "5.8.2" source: "fhirpath/functions.json" --- # FHIRPath Function: ceiling {:.stu} Returns the first integer greater than or equal to the input. {:.stu} Accepts input types of Decimal or Quantity. {:.stu} When used with a Decimal input type, the result is an Integer.
When used with a Quantity, the result is a Quantity with the same units and the value *(Decimal)* set to the integer result calculated. {:.stu} If the input collection is empty, the result is empty. {:.stu} If the input collection contains multiple items, the evaluation of the expression will end and signal an error to the calling environment. {:.stu} ``` fhirpath 1.ceiling() // 1 1.1.ceiling() // 2 (-1.1).ceiling() // -1 ``` {:.stu} > Note: We may consider a CeilingLong() function to handle Long output types. {: .stu-note } ## Summary - **Category**: Math - **Section**: `5.8.2` - **Return Type**: `Integer | Quantity` - **Empty Input Result**: `empty` - **Errors on Multiple Input**: `true` ## Description Returns the first integer greater than or equal to the input. ## Arguments - none ## Type Mapping - `Integer-Integer` - `Decimal-Integer` - `Quantity-Quantity` ## Example ```fhirpath 1.ceiling() // 1 1.1.ceiling() // 2 (-1.1).ceiling() // -1 ```