--- type: "fhirpath-operator" title: "FHIRPath Operator: div (div)" operator: "div" category: "Math" section: "6.6.5" source: "fhirpath/operations.json" --- # FHIRPath Operator: div (div) Performs truncated division of the left operand by the right operand (supported for Integer and Decimal). In other words, the division that ignores any remainder: ``` fhirpath 5 div 2 // 2 5.5 div 0.7 // 7 5 div 0 // empty ({ }) ``` ## Summary - **Category**: Math - **Section**: `6.6.5` - **Left Argument**: `Integer | Decimal` - **Right Argument**: `Integer | Decimal` - **Return Type**: `Integer` - **Empty Input Result**: `empty` - **Errors on Multiple Input**: `true` ## Description Performs truncated division of the left operand by the right operand, ignoring any remainder. Supported for Integer and Decimal. Each operand must be a single element. Division by zero results in empty collection. ## Type Mapping - `Integer-Integer` - `Decimal-Decimal` - `Integer-Decimal` - `Decimal-Integer`