Use this free distance calculator to find a distance in three ways. Find the distance between two points on a graph, find the straight-line distance between two places from their latitude and longitude, or find the distance you travel from your speed and time. The result is shown in kilometers, miles, meters, feet, and nautical miles. No signup needed.
Calculate distance between two points, two geographic locations, or using speed and time.
Enter positive or negative coordinates. All coordinates must use the same unit.
Use negative latitude for south and negative longitude for west. This calculates straight-line great-circle distance, not road distance.
| Kilometers | — |
| Miles | — |
| Meters | — |
| Feet | — |
| Nautical Miles | — |
Earth's mean radius is approximately 6,371 kilometers.
Between two points (x, y):
The distance for two locations is the straight-line (great-circle) distance over the surface of the Earth, also called “as the crow flies.” It is shorter than the distance by road, rail, or sea, because roads curve, and they follow terrain and borders. For driving or walking directions, use a map or navigation service.
Distance between two points in 2D:
d = √((x₂ − x₁)² + (y₂ − y₁)²)
Distance between two points in 3D:
d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²)
Midpoint: ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2)
Manhattan (grid) distance: |x₂ − x₁| + |y₂ − y₁|
Distance between two latitude and longitude points (Haversine formula):
where φ is latitude, λ is longitude (both in radians), and R is the Earth’s mean radius, about 6,371 km (3,959 miles).
Distance, speed, and time:
Point A is (1, 2) and point B is (4, 6).
Point A is (1, 2, 3) and point B is (4, 6, 15).
Point A is (−3, 4) and point B is (5, −2).
Multan (about 30.1575° N, 71.5249° E) and Lahore (about 31.5497° N, 74.3436° E).
The road distance is longer than this, because it follows the road network.
New York JFK airport (40.6413° N, 73.7781° W) and London Heathrow (51.4700° N, 0.4543° W).
You travel 450 km in 5 hours.
You need to drive 300 miles at 55 mph.
You run at a pace of 5:30 per km for 45 minutes.
You walk at 5 km/h for 20 minutes.
| From | To | Multiply by |
|---|---|---|
| 1 mile | kilometers | 1.609344 |
| 1 kilometer | miles | 0.621371 |
| 1 nautical mile | kilometers | 1.852 |
| 1 nautical mile | miles | 1.15078 |
| 1 meter | feet | 3.28084 |
| 1 foot | meters | 0.3048 |
| 1 yard | meters | 0.9144 |
| 1 inch | centimeters | 2.54 |
Examples:
The 2D distance formula comes from the Pythagorean theorem. The horizontal difference and the vertical difference form two sides of a right triangle, and the distance between the points is the longest side (the hypotenuse): d² = (Δx)² + (Δy)².
It is used in:
Use the distance formula: d = √((x₂ − x₁)² + (y₂ − y₁)²). For (1, 2) and (4, 6), the distance is √(9 + 16) = 5.
Use the Haversine formula, which gives the great-circle distance over the Earth’s surface. The straight-line distance from New York JFK to London Heathrow is about 5,540 km.
Straight-line distance is the shortest path over the Earth’s surface. Driving distance follows the road network, so it is longer. Use a map service for routes.
Multiply speed by time. At 60 mph for 2.5 hours, you travel 150 miles.
Divide distance by speed. For 300 miles at 55 mph, the time is 5.45 hours, or about 5 hours 27 minutes.
Multiply by 1.609344. A distance of 26.2 miles is about 42.16 km.
A unit used in air and sea travel, equal to 1.852 km (about 1.15 miles). It is based on one minute of latitude.
A formula for the great-circle distance between two points on a sphere, based on their latitude and longitude.
It is accurate to within about 0.5% when the Earth is treated as a sphere. It does not include roads, terrain, or altitude.
The distance when you can only move along a grid, calculated as |x₂ − x₁| + |y₂ − y₁|. It is often used for city blocks.
Yes. It is free, with no registration and no limits.
No. It gives the straight-line distance and simple speed-based times. For directions, use a map or navigation app.
A few of the most-used tools in each hub.
This calculator is for general informational purposes only. Straight-line distances are estimates and do not show road, flight, or sea routes. For navigation, travel planning, aviation, or other safety-related uses, rely on official maps, charts, and navigation tools.