Travel calculators

Lat Long Distance Calculator

Updated Aug 20, 2026 By Jehan Wadia
Rate Formulas
Point A
Accepted range −90 to 90. Decimal, degrees + minutes, or DMS.
Accepted range −180 to 180. Decimal, degrees + minutes, or DMS.
Point B
Accepted range −90 to 90. Decimal, degrees + minutes, or DMS.
Accepted range −180 to 180. Decimal, degrees + minutes, or DMS.

Example values are pre-filled (Los Angeles → New York City) — Point A in decimal degrees, Point B in DMS — to show the accepted formats. Edit any field to use your own coordinates. Compass suffixes N, S, E and W are accepted; S and W are treated as negative.


Great-circle results

Coordinate output format
Distance — kilometres
km
Distance — miles
mi
Distance — nautical miles
NM

Bearings & midpoint
Initial bearing (A → B)
Final bearing (arriving at B)
Great-circle midpoint
Central angle
WGS-84 ellipsoidal distance
Coordinates used in this calculation
Point A
Point A (decimal)
Point B
Point B (decimal)
Distance in each unit — spherical vs. ellipsoidal model
Map — straight-line (great-circle) path

Step-by-Step Solution

Coordinate format converter (DMS ↔ decimal degrees)

Coordinate axis
Signed decimal, e.g. −118.2437
Degrees, decimal minutes, hemisphere
Degrees, minutes, seconds, hemisphere

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.


Formulas used

Haversine term a
a = \sin^2\!\left(\frac{\Delta\varphi}{2}\right) + \cos\varphi_1 \cos\varphi_2 \sin^2\!\left(\frac{\Delta\lambda}{2}\right)
Central angle
c = 2\,\mathrm{atan2}\!\left(\sqrt{a},\ \sqrt{1-a}\right)
Great-circle distance
d = R\,c, \qquad R = 6371.0088\ \text{km}
Unit conversions of distance
d_{mi} = d_{km} \times 0.621371192, \qquad d_{NM} = d_{km} \times 0.539956803
Initial bearing (A to B)
\theta_i = \mathrm{atan2}\!\left(\sin\Delta\lambda \cos\varphi_2,\ \cos\varphi_1 \sin\varphi_2 - \sin\varphi_1 \cos\varphi_2 \cos\Delta\lambda\right) \bmod 360^\circ
Final bearing (arriving at B)
\theta_f = \left(\theta_{B \to A} + 180^\circ\right) \bmod 360^\circ
Great-circle midpoint
\varphi_m = \mathrm{atan2}\!\left(\sin\varphi_1 + \sin\varphi_2,\ \sqrt{(\cos\varphi_1 + B_x)^2 + B_y^2}\right), \quad \lambda_m = \lambda_1 + \mathrm{atan2}\!\left(B_y,\ \cos\varphi_1 + B_x\right), \quad B_x = \cos\varphi_2 \cos\Delta\lambda,\ B_y = \cos\varphi_2 \sin\Delta\lambda
Coordinate conversion: DMS to decimal degrees
D_{dec} = \pm\left(d + \frac{m}{60} + \frac{s}{3600}\right)

Frequently asked questions

Where do I find the latitude and longitude of a place?

The easiest way is an online map. Right-click a spot in Google Maps and the coordinates pop up, ready to copy. Phone GPS apps, weather sites, and airport or port listings also show them. Copy the two numbers into the Point A or Point B boxes.

Do I have to type the degree symbol?

No. You can just use spaces. All of these work for the same place:

  • 34.0522
  • 34 3 8 N
  • 34°03'08"N

The calculator reads degrees, then minutes, then seconds, in that order.

Can I paste both numbers into one box?

No. Latitude goes in the latitude box and longitude goes in the longitude box. If you paste something like 34.0522, -118.2437 into one field, you will see a format error.

When do I use a minus sign?

Use a minus sign for places south of the equator or west of the Prime Meridian. So Sydney's latitude is −33.87 and Los Angeles' longitude is −118.24. You can skip the minus if you add the letter instead: 33.87S or 118.24W means the same thing.

Why is my answer smaller than the distance on Google Maps?

This tool measures the direct path over the curve of the Earth. Roads bend around hills, lakes, and towns, so driving is always longer. Flights are longer too, because planes follow set air routes.

Why does the line on the map look curved?

Flat maps stretch the round Earth to fit a rectangle. That stretching bends the shortest path into an arc, mostly on long east–west trips. The curved line really is the shortest route.

Does swapping Point A and Point B change the distance?

No. The distance stays the same. But the bearings change, because you are now heading the other way. Swap Points is handy for checking the return heading.

Why are there two bearings instead of one?

On a long route the compass heading slowly shifts as you go. The initial bearing is the heading when you leave Point A. The final bearing is the heading as you reach Point B. On short trips the two numbers are almost equal.

What is the central angle in the results?

It is the angle between your two points measured from the center of the Earth. Multiply that angle (in radians) by Earth's radius and you get the distance. It is the key step in the haversine math.

What Earth radius does the calculator use?

It uses 6,371.0088 km, the mean radius of the Earth. This is the standard value for haversine distance and keeps the answer within about 0.3% of the true surface distance.

Why is the WGS-84 number a bit different from the main answer?

The main answer treats Earth as a perfect ball. The WGS-84 number treats it as a slightly squashed shape, which is closer to reality. On most trips the gap is well under half a percent. Use the WGS-84 value when you need the most exact figure.

Does the distance include hills or altitude?

No. It measures across the surface at sea level. Climbing a mountain or flying at 35,000 feet adds a tiny bit of extra length, but it is far too small to matter for most trips.

Why do results show only 4 numbers?

Answers are rounded to 4 significant figures, like 3,936 km. That is more precision than the model itself can promise, so extra digits would be false accuracy. The Copy button copies that same rounded value.

Is it accurate for very short distances?

Yes. For a few kilometers the answer is accurate to a few meters. Just remember your input needs enough decimal places. Four decimals in decimal degrees is about 11 meters of precision.

What happens if the two points are on exact opposite sides of Earth?

The great-circle distance still works and comes out near 20,000 km. The WGS-84 line may say it is not available, because that formula cannot settle on an answer for near-opposite points.

Can I put the same coordinates in both points?

Yes. The distance will be 0 and the midpoint will match your point. It is a quick way to test that you typed a coordinate correctly.

Why is the midpoint not the average of my two coordinates?

Because the path is a curve, not a straight line. The true halfway point sits on that curve, so it can be far from the plain average, especially on long trips near the poles.

The map did not load. Are my results still good?

Yes. The map is only a picture. If the tile map fails, a simple grid sketch shows instead. All distances, bearings, and the midpoint are still correct.

Do I have to press Calculate every time?

No. Results refresh on their own about a second after you stop typing. Press Calculate Distance if you want them right away or if a value looks stale.

Why does it say my latitude is out of range?

Latitude only goes from −90 to 90, and longitude from −180 to 180. If you get this message, you likely swapped the two. A number like 118 belongs in the longitude box.

Can I turn this distance into a flight time?

Yes. Divide the distance by cruise speed, or use a Flight Time Calculator for a quicker estimate. Add extra time for taxi, climb, and descent.

Why are nautical miles included?

Sailors and pilots use them because one nautical mile equals one minute of latitude. That makes chart work simple. One nautical mile is about 1.852 km or 1.151 miles.