---
title: "distance(from:)"
framework: corelocation
role: symbol
role_heading: Instance Method
path: "corelocation/cllocation/distance(from:)"
---

# distance(from:)

Returns the distance (measured in meters) from the current object’s location to the specified location.

## Declaration

```swift
func distance(from location: CLLocation) -> CLLocationDistance
```

## Parameters

- `location`: The destination location.

## Return Value

Return Value The distance (in meters) between the two locations.

## Discussion

Discussion This method measures the distance between the location in the current object and the value in the location parameter. The distance is calculated by tracing a line between the two points that follows the curvature of the Earth, and measuring the length of the resulting arc. The arc is a smooth curve that doesn’t take into account altitude changes between the two locations.

## See Also

### Measuring the distance between coordinates

- [getDistanceFrom(_:)](corelocation/cllocation/getdistancefrom(_:).md)
