---
title: HKStatisticsCollection
framework: healthkit
role: symbol
role_heading: Class
path: healthkit/hkstatisticscollection
---

# HKStatisticsCollection

An object that manages a collection of statistics, representing the results calculated over separate time intervals.

## Declaration

```swift
class HKStatisticsCollection
```

## Overview

Overview For more information on statistics objects, see HKStatistics. For more information on calculating statistics over consecutive time intervals, see HKStatisticsCollectionQuery.

## Topics

### Accessing Statistics Collections

- [statistics()](healthkit/hkstatisticscollection/statistics().md)
- [statistics(for:)](healthkit/hkstatisticscollection/statistics(for:).md)
- [enumerateStatistics(from:to:with:)](healthkit/hkstatisticscollection/enumeratestatistics(from:to:with:).md)

### Getting Information About Statistics Collections

- [sources()](healthkit/hkstatisticscollection/sources().md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Statistics

- [Executing Statistical Queries](healthkit/executing-statistical-queries.md)
- [Executing Statistics Collection Queries](healthkit/executing-statistics-collection-queries.md)
- [HKStatisticsQueryDescriptor](healthkit/hkstatisticsquerydescriptor.md)
- [HKStatisticsQuery](healthkit/hkstatisticsquery.md)
- [HKStatisticsCollectionQueryDescriptor](healthkit/hkstatisticscollectionquerydescriptor.md)
- [HKStatisticsCollectionQuery](healthkit/hkstatisticscollectionquery.md)
- [HKStatistics](healthkit/hkstatistics.md)
- [HKStatisticsOptions](healthkit/hkstatisticsoptions.md)
