Home
My IP
GPS
Find Me
Your Location
4️⃣IPv4:
📍...
6️⃣IPv6:
🌍...
🏢...
📌...

Distance Calculator

Calculate the great-circle distance between any two points on Earth

Enter city names for autocomplete or coordinates in decimal degrees format: lat, lng

Popular Distance Lookups

FromToDistance
New YorkLondon5,570 km (3,461 mi)
Los AngelesTokyo8,815 km (5,477 mi)
SydneyDubai12,052 km (7,489 mi)
ParisNew York5,837 km (3,627 mi)
LondonSingapore10,847 km (6,740 mi)
ChicagoMexico City2,782 km (1,729 mi)

Understanding Distance Calculation

What Is Great-Circle Distance?

The great-circle distance is the shortest distance between any two points on the surface of a sphere, measured along the surface of that sphere rather than through its interior. Imagine stretching a string taut between two cities on a globe — the path that string follows is the great-circle route. This is also commonly called "as the crow flies" distance because it represents the most direct path, unobstructed by roads, terrain, or political borders.

Great-circle distance matters because Earth is roughly spherical. On a flat map (especially one using the common Mercator projection), straight lines between distant points are misleading. A straight line on a Mercator map from New York to Tokyo appears to go due west across the Pacific, but the actual shortest flight path curves north over Alaska. Airlines, shipping companies, and telecommunications providers all use great-circle routing to minimize fuel costs, travel time, and cable lengths. Understanding this concept is essential for anyone working with geographic data at a global scale.

The Haversine Formula Explained

The Haversine formula is the standard method for computing great-circle distance between two points specified by their latitude and longitude. It works by calculating the central angle between two points on a sphere and multiplying by the sphere's radius. The name "haversine" comes from "half versed sine," a trigonometric function that was historically important for numerical stability when computing with logarithm tables.

The formula is expressed as: a = sin²(Δlat/2) + cos(lat&sub1;) × cos(lat&sub2;) × sin²(Δlng/2), then c = 2 × atan2(√a, √(1-a)), and finally d = R × c, where R is Earth's mean radius (6,371 km). This calculator implements the Haversine formula entirely in your browser — no data is sent to any server. The computation is instantaneous and works offline once the page has loaded.

For most practical applications, the Haversine formula is accurate to within 0.3% because it models Earth as a perfect sphere. Earth is actually an oblate spheroid — slightly flattened at the poles — so for precision-critical applications (such as surveying or geodetic measurements), the Vincenty formula or Karney's method on the WGS84 ellipsoid would be more appropriate. However, for travel planning, logistics, flight estimation, and general reference, the Haversine formula provides more than sufficient accuracy.

Great-Circle Distance vs. Driving Distance

It is important to understand that great-circle distance and driving distance are fundamentally different measurements. Great-circle distance represents the shortest possible path over Earth's surface — essentially a straight line on a globe. Driving distance, by contrast, follows the actual road network, which must navigate around mountains, rivers, lakes, private property, and national borders.

Driving distance is typically 20% to 40% longer than great-circle distance, though the ratio varies enormously depending on geography. In flat, well-connected regions like the US Midwest, driving distance might be only 15% longer. In mountainous terrain like the Alps or Himalayas, or in regions with sparse road networks like central Africa, driving distance can be two or three times the straight-line distance. For sea crossings, driving distance may be effectively infinite (you need a ferry or tunnel), while the great-circle distance could be quite short.

Use Cases for Distance Calculation

Aviation: Airlines plan flight routes based on great-circle distance to minimize fuel consumption and flight time. Air traffic control uses these calculations for spacing, and frequent flyers estimate mileage earnings from great-circle distances between airports.

Maritime Shipping: Cargo vessels follow great-circle routes across oceans, adjusted for weather, currents, ice, and political boundaries. Container shipping companies calculate transit times and fuel costs based on nautical mile distances between ports.

Travel Planning: Travelers use distance calculators to compare destinations, estimate flight durations, and understand time zone differences. A rough rule of thumb: commercial jets travel about 800-900 km/h, so dividing the great-circle distance by 850 gives an approximate flight time in hours.

Logistics and Supply Chain: Warehouse placement, delivery radius calculations, and last-mile logistics all depend on distance computation. Companies often use a combination of great-circle distance for initial filtering and road distance for final routing decisions.

Telecommunications: Signal propagation, satellite coverage areas, and undersea cable routing all require accurate distance calculations. The speed of light through fiber optic cable introduces approximately 5 microseconds of latency per kilometer, making distance a direct factor in network performance.

Understanding Bearing

The initial bearing (or forward azimuth) tells you which compass direction to face at point A in order to travel the shortest path to point B. It is measured in degrees clockwise from true north: 0° means due north, 90° means due east, 180° means due south, and 270° means due west. Because great-circle routes curve relative to lines of longitude, the bearing continuously changes as you travel. The initial bearing shown by this calculator is the heading at the departure point only — a navigator would need to continuously adjust course along the route.

Frequently Asked Questions

What is the Haversine formula?

The Haversine formula calculates the great-circle distance between two points on a sphere given their latitude and longitude. It uses the formula: a = sin²(Δlat/2) + cos(lat1) × cos(lat2) × sin²(Δlng/2), then d = 2R × arcsin(√a), where R is Earth's radius (6,371 km). It is accurate to within 0.3% for most applications.

What is the difference between great-circle distance and driving distance?

Great-circle distance is the shortest path between two points on Earth's surface — the 'as the crow flies' distance. Driving distance follows roads and is typically 20-40% longer depending on terrain and road network density.

How accurate is this distance calculator?

This calculator uses the Haversine formula which treats Earth as a perfect sphere. The maximum error is about 0.3% compared to the WGS84 ellipsoid model. For a 10,000 km distance, the error would be at most 30 km — more than sufficient for travel planning and general reference.

What is a nautical mile and why is it used?

A nautical mile equals exactly 1,852 meters (1.15078 statute miles). It corresponds to approximately one minute of latitude, which makes it naturally tied to the coordinate system used in navigation. Nautical miles are the standard unit in maritime and aviation contexts.

Does this calculator account for Earth's ellipsoidal shape?

No — the Haversine formula models Earth as a sphere with radius 6,371 km. For sub-meter geodetic precision, you would need the Vincenty formula or Karney's method which use the WGS84 ellipsoid. For distances between cities, travel planning, and general estimation, the spherical model is more than adequate.

Related Tools