Skip to main content
Calkulon
Natrag na vodiče
3 min read6 Steps

How to Calculate Great-Circle Distance: A Step-by-Step Haversine Guide

Calculate distance between GPS coordinates manually

Preskočite matematiku — koristite kalkulator

Upute korak po korak

1

Gather Your Inputs

First, identify the latitude and longitude of the two points in degrees. For example, let's calculate the distance between New York City (latitude: 40.7128° N, longitude: 74.0060° W) and Los Angeles (latitude: 34.0522° N, longitude: 118.2437° W). Convert these values to radians for the formula.

2

Convert Degrees to Radians

Using the conversion formula, convert the degrees to radians. For New York City: latitude = \(40.7128 imes rac{\pi}{180}\) and longitude = \(-74.0060 imes rac{\pi}{180}\). For Los Angeles: latitude = \(34.0522 imes rac{\pi}{180}\) and longitude = \(-118.2437 imes rac{\pi}{180}\). Calculate these values: New York City (latitude: approximately 0.7101 radians, longitude: approximately -1.2915 radians), Los Angeles (latitude: approximately 0.5937 radians, longitude: approximately -2.0644 radians).

3

Apply the Haversine Formula

Next, plug in the values into the Haversine formula. Calculate the differences in latitude and longitude, then apply the formula step by step. For simplicity, let's proceed with the example using the converted values for New York City and Los Angeles.

4

Perform the Calculation

Substitute the values into the formula: \(\phi_1 = 0.7101\), \(\phi_2 = 0.5937\), \(\lambda_1 = -1.2915\), \(\lambda_2 = -2.0644\), and \(R = 6371\) km. Calculate the distance using the formula, which involves finding the sine and cosine of the latitude and longitude differences, then applying the arcsin function to find the angle, and finally multiplying by the Earth's radius to find the distance in kilometers.

5

Calculate the Distance in Miles

To convert the distance from kilometers to miles, divide the distance in kilometers by 1.60934. This step gives you the distance in both kilometers and miles for convenience.

6

Avoid Common Mistakes and Use the Calculator for Convenience

Common mistakes include incorrect conversion from degrees to radians and miscalculating the sine and cosine values. For convenience and accuracy, use an online Haversine calculator when possible, especially for multiple or complex calculations. However, understanding the manual process helps in appreciating the simplicity and power of the Haversine formula.

Introduction to Great-Circle Distance Calculation

The Haversine formula is used to calculate the great-circle distance between two points on a sphere, such as the Earth, given their longitudes and latitudes. This guide will walk you through the steps to perform this calculation manually.

Understanding the Haversine Formula

The Haversine formula is: [d = 2 imes \arcsin\left(\sqrt{\sin^2\left( rac{\phi_2 - \phi_1}{2} ight) + \cos(\phi_1) \cos(\phi_2) \sin^2\left( rac{\lambda_2 - \lambda_1}{2} ight)} ight) imes R] where:

  • (d) is the distance between the two points,
  • (\phi_1) and (\phi_2) are the latitudes of the two points in radians,
  • (\lambda_1) and (\lambda_2) are the longitudes of the two points in radians,
  • (R) is the radius of the Earth (approximately 6371 kilometers or 3959 miles).

Converting Degrees to Radians

Before applying the formula, convert degrees to radians using the formula: ( ext{radians} = ext{degrees} imes rac{\pi}{180}).

Step-by-Step Calculation

Spremni za izračun?

Preskočite ručni rad i ostvarite trenutne rezultate.

Otvori kalkulator

Postavke

PrivatnostUvjetiO nama© 2026 Calkulon