--- type: "fhirpath-function" title: "FHIRPath Function: sum" function: "sum" category: "Aggregates" section: "7.2" source: "fhirpath/functions.json" --- # FHIRPath Function: sum _No canonical section match found in index.md._ ## Summary - **Category**: Aggregates - **Section**: `7.2` - **Return Type**: `Integer | Long | Decimal | Quantity` - **Empty Input Result**: `empty` - **Errors on Multiple Input**: `false` ## Description Returns the sum of all elements in the input collection (in the same type). ## Arguments - none ## Type Mapping - n/a ## Example ```fhirpath (1.0 | 2.0 | 3.0).sum() // 6.0 ```