Haversine Distance Calculator

Calculate the distance between two points on the Earth given their longitude and latitude in decimal degrees.

Input Parameters

Calculation Results

Calculation Formula

d = 2 × R × arcsin(√[sin²(Δlat/2) + cos(lat1) × cos(lat2) × sin²(Δlon/2)])

Where:
d = distance between points
R = Earth's radius (mean radius = 6,371 km = 3,959 miles)
Δlat = latitude2 - latitude1
Δlon = longitude2 - longitude1

Haversine Distance Calculator Calculator Usage Guide

Learn how to use the Haversine Distance Calculator and understand its mathematical principles

How to Use This Calculator

  1. Enter the latitude and longitude for the first location in decimal degrees.
  2. Click the "Calculate" button to compute the distance to a second location.
  3. For the second location, you will be prompted to enter its latitude and longitude.
  4. The calculator will display the distance between the two points in kilometers or miles.
  5. You can switch between kilometers and miles using the radio buttons.

The Haversine Formula

The Haversine formula calculates the shortest distance between two points on the Earth's surface, assuming it's a perfect sphere. The formula is:

d = 2 × R × arcsin(√[sin²(Δlat/2) + cos(lat1) × cos(lat2) × sin²(Δlon/2)])

Where:

  • d = distance between the two points
  • R = Earth's radius (mean radius = 6,371 km = 3,959 miles)
  • lat1, lat2 = latitude of the first and second points in radians
  • lon1, lon2 = longitude of the first and second points in radians
  • Δlat = difference in latitude
  • Δlon = difference in longitude

Example

Let's calculate the distance between New York (40.7128° N, -74.0060° W) and London (51.5074° N, -0.1278° W).

Input 1: Latitude 1 = 40.7128, Longitude 1 = -74.0060

Input 2: Latitude 2 = 51.5074, Longitude 2 = -0.1278

Click "Calculate" to get the distance of approximately 5574 km (3449 miles).

Usage Tips

  • Enter coordinates in decimal degrees, not degrees-minutes-seconds format.
  • The calculator uses the mean radius of Earth (6371 km), but actual distances may vary slightly due to Earth's oblate spheroid shape.
  • This calculator is useful for geographic distance calculations, navigation, and mapping applications.