---
title: mostRecentQuantity
framework: healthkit
role: symbol
role_heading: Instance Property
path: healthkit/hkdiscretequantitysample/mostrecentquantity
---

# mostRecentQuantity

The most recent quantity contained by the sample.

## Declaration

```swift
@NSCopying var mostRecentQuantity: HKQuantity { get }
```

## Discussion

Discussion The sample sorts its contained quantities based on the startDate property for the quantity’s date interval.

## See Also

### Accessing Calculated Values

- [averageQuantity](healthkit/hkdiscretequantitysample/averagequantity.md)
- [maximumQuantity](healthkit/hkdiscretequantitysample/maximumquantity.md)
- [minimumQuantity](healthkit/hkdiscretequantitysample/minimumquantity.md)
- [mostRecentQuantityDateInterval](healthkit/hkdiscretequantitysample/mostrecentquantitydateinterval.md)
