Flight Distance Calculator
The shortest path between two points on a sphere is an arc of a great circle, a circle whose center is the center of the Earth. This calculator takes the latitude and longitude of a start point and an end point, applies the haversine formula to find the length of that arc, and reports it in nautical miles, kilometers and statute miles together with the true course at departure.
Great-circle distance is the natural baseline for any route. It shows why long flights curve toward the poles on a flat map, and it gives a lower bound against which the distance of a real route, with its airways, waypoints and procedures, can be compared.
How to use this calculator
- Enter Start latitude in decimal degrees, north positive and south negative.
- Enter Start longitude in decimal degrees, east positive and west negative.
- Enter End latitude and End longitude in the same way.
- Read the great-circle distance and the initial true course.
Coordinates must be decimal degrees, not degrees and minutes. To convert, divide the minutes by 60 and add them to the degrees: 40° 30′ becomes 40.5. Western longitudes and southern latitudes carry a minus sign, so 75° W is entered as −75. Latitude is accepted from −90 to 90 and longitude from −180 to 180. A missing minus sign is the usual cause of a result that is thousands of miles out.
Formula
a = sin²(Δφ ÷ 2) + cos φ1 × cos φ2 × sin²(Δλ ÷ 2)
d = 2 × R × asin(√a)
initial course = atan2( sin Δλ × cos φ2 , cos φ1 × sin φ2 − sin φ1 × cos φ2 × cos Δλ )
What the variables mean
- φ1, φ2
- latitude of the start and end points (north positive)
- λ1, λ2
- longitude of the start and end points (east positive)
- Δφ, Δλ
- differences in latitude and longitude
- R
- mean Earth radius, 6 371.0088 km
- d
- great-circle distance
Worked example
These example values are illustrative round numbers, not data for any particular aircraft. Select "Fill in the example" in the calculator to load them.
Inputs
- Start latitude: 40°
- Start longitude: −75°
- End latitude: 34°
- End longitude: −118°
Working
- Δφ = −6.0000°, Δλ = −43.0000°.
- a = sin²(Δφ ÷ 2) + cos φ1 × cos φ2 × sin²(Δλ ÷ 2) = 0.088045.
- Central angle = 2 × asin(√a) = 0.602520 rad.
- d = 6 371.0088 km × 0.602520 = 3,838.7 km = 2,072.7 NM.
Result
- Great-circle distance: 2,072.7 NM (3,838.7 km · 2,385.2 mi)
- Initial true course: 273.9° (The course changes along a great circle)
Reading the result
Great-circle distance is shown in nautical miles, with kilometers and statute miles beside it. It is the surface distance along the arc, not the length of a published route. Initial true course is the direction, relative to true north, in which the arc leaves the start point. The note beside it is a reminder that the course changes continuously along a great circle unless the route runs along a meridian or the equator, so this value applies only at the first point. If both points are identical, the distance is zero and the course is reported as not defined.
Assumptions and limitations
- The Earth is modelled as a sphere with a mean radius of 6,371.0088 km; on the real ellipsoid the distance can differ by up to about 0.5%.
- The distance is measured along the surface, so cruising altitude adds nothing to it.
- The path is a single unbroken great-circle arc with no waypoints, airways, departure or arrival procedures.
- Airspace restrictions, terrain and weather deviations that lengthen real routes are not considered.
- The course given is a true course at the start point only; it is not a magnetic course and not a constant heading for the route.
- For two points exactly opposite each other on the globe every direction is equally short, so the course shown is only one of many.
Common mistakes
- Typing degrees and minutes as if they were a decimal, such as 40.30 for 40° 30′.
- Leaving out the minus sign for a western longitude or a southern latitude.
- Swapping latitude and longitude between the two fields.
- Flying or plotting the initial course as a constant heading for the whole route, which describes a rhumb line and ends up somewhere else.
- Treating the great-circle distance as the distance a real flight will cover.
- Reading the statute-mile figure as nautical miles when feeding the distance into a time or fuel calculation.
References
- National Institute of Standards and Technology, Guide for the Use of the International System of Units (SI), Special Publication 811.
- Federal Aviation Administration, Pilot's Handbook of Aeronautical Knowledge (FAA-H-8083-25).
These public sources explain the formulas and definitions used here. Citing them does not mean they have reviewed, endorsed or certified AviationCalc.
Related calculators
Flight Time Calculator
Time en route from distance and ground speed, in hours and minutes.
Flight Speed and Distance
Nautical Miles to Kilometers Calculator
Convert nautical miles to kilometers, statute miles, meters and feet, in either direction.
Aviation Units and Conversions
Ground Speed Calculator
Find ground speed from true airspeed, course and wind using the wind triangle.
Flight Speed and Distance
True Heading and Magnetic Heading Calculator
Convert between true, magnetic and compass headings with variation and deviation.
Aviation Navigation
Guides that explain this calculation
Aviation Units and Conversions
Aviation Distance Units Explained
Nautical miles, statute miles, kilometers, feet and meters each have an exact definition. See where each is used and how to convert without errors.
Aviation Units and Conversions
Nautical Miles vs Statute Miles
A nautical mile is exactly 1,852 m and about one minute of latitude; a statute mile is 1,609.344 m. See why aviation uses one and how to convert.
Flight Speed and Distance
How Pilots Calculate Flight Time
Flight time is distance divided by ground speed. See how to convert decimal hours, why headwinds cost more than tailwinds return, and how to work leg by leg.