Introduction
This Lat Long Distance Calculator finds the straight-line distance between two points on Earth. You type in the latitude and longitude of Point A and Point B, and it gives you the distance in kilometers, miles, and nautical miles.
The distance you get is the "great-circle" distance. That is the shortest path over the curved surface of the Earth, like the route a plane flies. It is not a road distance, so it will be shorter than a drive — for that, try a Driving Distance Calculator instead.
The tool also shows you:
- The starting and ending compass bearing from A to B
- The midpoint between the two places
- A map with the path drawn on it
- Step-by-step math using the haversine formula
You can enter coordinates three ways: decimal degrees (34.0522), degrees and minutes (34°03.13'N), or degrees, minutes, and seconds (34°03'08"N). Letters like N, S, E, and W work too. There is also a converter at the bottom to switch a coordinate from one format to another.
How to use our Lat Long Distance Calculator
Type the latitude and longitude of two places. The calculator shows the distance between them in kilometers, miles, and nautical miles, plus the bearing, midpoint, a map, and the math steps.
Latitude (Point A): Enter the north–south value of your first place, from −90 to 90. You can use decimal degrees (34.0522), degrees and minutes (34°03.13'N), or DMS (34°03'08"N).
Longitude (Point A): Enter the east–west value of your first place, from −180 to 180. South and West values are negative, so use a minus sign or the letter W.
Latitude (Point B): Enter the north–south value of your second place, from −90 to 90, in any of the same formats.
Longitude (Point B): Enter the east–west value of your second place, from −180 to 180.
Coordinate output format: Pick how you want the coordinates shown in the results: decimal degrees, degrees plus minutes, or degrees, minutes, and seconds.
Calculate Distance button: Click it to get your great-circle distance, bearings, midpoint, and step-by-step solution.
Swap Points button: Click it to trade Point A and Point B. This flips the direction of travel and updates the bearings.
Clear button: Click it to wipe the results and bring back the example coordinates.
Coordinate format converter: Pick latitude or longitude, then type a value in any one box. The other two boxes change to match, so you can switch between DMS and decimal degrees fast. For plain unit swaps like kilometers to miles, the Unit Converter Calculator and Metric Conversion Calculator can help.
Latitude and Longitude Distance: What It Means
Every spot on Earth has two numbers that act like an address: latitude and longitude. Latitude tells you how far north or south you are from the equator, from −90° to 90°. Longitude tells you how far east or west you are from the Prime Meridian, from −180° to 180°. Give any two points these numbers, and you can measure the exact distance between them.
Great-Circle Distance
Earth is round, so the shortest path between two places is not a straight line on a flat map. It is a curve that follows the surface of the globe. That curve is called a great-circle path. Pilots and ship captains use it because it saves fuel and time. On a flat world map the path may look bent, but it really is the shortest way. This is the same idea behind our As The Crow Flies Distance Calculator and Air Miles Calculator.
The Haversine Formula
The haversine formula is the common math used to find great-circle distance. It treats Earth as a perfect ball with a radius of about 6,371 km. It finds the angle between the two points as seen from the center of Earth, then multiplies that angle by the radius. The answer is very close to the truth — usually within about 0.3%. If you need flat-plane geometry instead, the Distance Calculator handles straight lines on a grid, and the Pythagorean Theorem Calculator shows where that formula comes from.
Sphere vs. Ellipsoid
Earth is not a perfect ball. It bulges a bit at the equator and is a little flat at the poles. Maps and GPS use a better shape called the WGS-84 ellipsoid. Distances on the ellipsoid are found with the Vincenty formula. For most trips the two answers differ by only a few kilometers, but the ellipsoid answer is the more exact one. You can measure that gap with the Percent Difference Calculator or the Percent Error Calculator.
Bearing and Midpoint
Bearing is the compass direction you travel, given in degrees from 0° (north) going clockwise. On a long great-circle route the bearing keeps changing, so there is a starting bearing at the first point and a different final bearing when you arrive. Our Angle Calculator is handy if you want to work with those degrees on their own. The midpoint is the halfway spot along that curved path — not the plain average of the two sets of numbers, which is what the flat-plane Midpoint Calculator gives you.
Coordinate Formats
Coordinates can be written three ways, and they all mean the same place:
- Decimal degrees (DD): 34.0522°, −118.2437°
- Degrees and decimal minutes (DM): 34°03.13'N, 118°14.62'W
- Degrees, minutes, seconds (DMS): 34°03'08"N, 118°14'37"W
One degree has 60 minutes, and one minute has 60 seconds. Letters show the side of the globe: N and E are positive, while S and W are negative. So 118°W is the same as −118°. The same 60-based split shows up in time math, which is why the Decimal To Minutes Calculator and Minutes To Decimal Calculator feel so familiar.
Units and Handy Facts
Distance can be shown in kilometers, miles, or nautical miles. One nautical mile equals about 1.852 km and matches one minute of latitude, which is why sailors and pilots like it. One degree of latitude is always about 111 km. One degree of longitude is also about 111 km at the equator, but it shrinks toward the poles until it reaches zero. To move between metric and imperial lengths, see the Meters to Feet Calculator or the Cm To Inches Calculator.
Where This Is Used
Great-circle distance is used for flight planning, shipping routes, hiking and GPS apps, radio and antenna aiming, delivery zones, and school science projects. Pair it with the Flight Time Calculator to turn a distance into hours in the air, the Speed Distance Time Calculator for any speed-based estimate, or the Shipping Calculator and Freight Calculator when cargo is involved.
Keep in mind that it measures the direct path over the surface. Real driving or flying distance is longer because roads bend, and planes must follow air routes and dodge weather. For road trips, the Travel Distance Calculator, Drive Time Calculator, Mileage Calculator, and Trip Cost Calculator give a much closer picture, and the Fuel Cost Calculator turns those miles into dollars.