Distance Calculator
Calculate the distance between two points in 2D or 3D, or between two latitude/longitude locations on Earth (great-circle distance).
Calculator
Was this tool useful?
About this tool
About Distance Calculator
Find the straight-line distance between points on a graph or in space, or the distance between two places on a map using their coordinates.
How it works
2D: d = √((x₂ − x₁)² + (y₂ − y₁)²). 3D adds (z₂ − z₁)². Map distance uses the haversine formula with Earth radius 6,371 km.
Example
Lahore (31.5204, 74.3587) to Karachi (24.8607, 67.0011) ≈ 1,033 km in a straight line.
How to use this tool
- Choose 2D, 3D or latitude & longitude.
- Enter the coordinates of both points.
- Read the distance, midpoint and (for maps) the bearing.
Frequently asked questions
Is the map distance the same as driving distance?
No. It is the shortest distance over the Earth’s surface (as the crow flies). Roads are longer.
How do I find coordinates?
Right-click a place in Google Maps and copy the latitude and longitude.
Do I need to sign up?
No. The calculator is free, works in your browser and nothing you type is stored.
Can I use the Distance Calculator for homework?
Yes. The Distance Calculator shows the answer and, where possible, the method, so you can check your own working. Teachers usually want to see the steps, so use it to learn the method rather than only copying the answer.