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