<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKQuantityTypeIdentifier/dietaryCarbohydrates",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:@HKQuantityTypeIdentifierDietaryCarbohydrates"
  },
  "title" : "dietaryCarbohydrates"
}
-->

# dietaryCarbohydrates

A quantity sample type that measures the amount of carbohydrates consumed.

```
static let dietaryCarbohydrates: HKQuantityTypeIdentifier
```

## Discussion

These samples use mass units (described in [`HKUnit`](/documentation/HealthKit/HKUnit)) and measure cumulative values (described in [`HKQuantityAggregationStyle`](/documentation/HealthKit/HKQuantityAggregationStyle)).

## See Also

[`HKQuantityTypeIdentifier`](/documentation/HealthKit/HKQuantityTypeIdentifier)

The identifiers that create quantity type objects.

[`HKQuantitySample`](/documentation/HealthKit/HKQuantitySample)

A sample that represents a quantity, including the value and the units.

[`HKQuantity`](/documentation/HealthKit/HKQuantity)

An object that stores a value for a given unit.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)