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

# walkingStepLength

A quantity sample type that measures the average length of the user’s step when walking steadily over flat ground.

```
static let walkingStepLength: HKQuantityTypeIdentifier
```

## Discussion

Step length is the distance between the user’s front foot and back foot when they walk. The system automatically records walking step length samples on iPhone 8 or later. The user must carry their phone near their waist—such as in a pocket—and walk steadily on flat ground. To ensure accuracy, the user’s [`height`](/documentation/HealthKit/HKQuantityTypeIdentifier/height) value must be up to date. The system records 10 to 30 step length samples on a typical day. iPhone doesn’t record walking step length samples if the user’s wheelchair status is on.

These samples use distance units (described in [`HKUnit`](/documentation/HealthKit/HKUnit)) and measure discrete values (described in [`HKQuantityAggregationStyle`](/documentation/HealthKit/HKQuantityAggregationStyle)). For example, the following code creates a unit in meters.

```swift
let meters = HKUnit.meter()
```

The sample’s [`quantity`](/documentation/HealthKit/HKQuantitySample/quantity) property represents the average step length between the sample’s [`startDate`](/documentation/HealthKit/HKSample/startDate) and [`endDate`](/documentation/HealthKit/HKSample/endDate) properties.

## See Also

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

Values that indicate the placement of the device that measured a sample.



---

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)