---
title: "distance(from:to:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/lazysequence/distance(from:to:)-5ong5"
---

# distance(from:to:)

## Declaration

```swift
func distance(from start: Self.Index, to end: Self.Index) -> Int
```
