Distance Calculator

Distance between points, or between two places on Earth

Calculate the distance between two points in 2D or 3D, or the great-circle distance and bearing between two latitude/longitude locations.
Share
Try an example:
Your result will appear here as you type.

About Distance Calculator

Formula

d = √((x₂ − x₁)² + (y₂ − y₁)²)

Haversine: d = 2R·asin(√(sin²(Δφ/2) + cos φ₁ cos φ₂ sin²(Δλ/2)))

Worked examples

(1, 2) to (4, 6)

√(9 + 16) = 5.

Mumbai to Delhi

About 1,148 km in a straight line, heading north-north-east (21.7°).

How it works

  1. Between points: d = √(Δx² + Δy² + Δz²).
  2. Between places: the haversine formula gives the shortest distance over the Earth's surface, and the starting compass bearing.

What you need

  • Coordinates of two points, or latitude and longitude of two places.

Tips

  • Get coordinates by right-clicking a spot in Google Maps.
  • South latitudes and west longitudes are negative.

Limitations

  • Treats the Earth as a sphere (error under 0.5%).

Runs in your browser. Calculations run in your browser - nothing you enter is sent anywhere.

Definitions

Great circle
The shortest path between two points on a sphere.
Bearing
Compass direction, clockwise from north.

Frequently asked questions

Why is the road distance longer?+

Roads bend around terrain and follow routes; this is the straight line over the Earth's surface.

Was this calculator helpful?