Distance Calculator

Distance Calculator calculator can be used to calculate the distance between two points on the Earth's surface.

Input Parameters

Calculation Results

Calculation Formula

Distance = 2 * R * arcsin(sqrt(sin^2((lat2 - lat1)/2) + cos(lat1) * cos(lat2) * sin^2((lon2 - lon1)/2)))

Where:
R = Earth's radius (mean radius = 6,371 km)
lat1 = Latitude of the first point
lon1 = Longitude of the first point
lat2 = Latitude of the second point
lon2 = Longitude of the second point

Result

Distance: 0 km

Distance Calculator Calculator Usage Guide

Learn how to use the Distance Calculator calculator and its working principles

How to Use the Distance Calculator

The Distance Calculator can be used to calculate the distance between two points on the Earth's surface. Follow these steps to use the calculator:

  1. Enter the latitude and longitude of the first point in degrees. For example, the latitude and longitude of New York City are 40.7128° N and -74.0060° W.
  2. Enter the latitude and longitude of the second point in degrees. For example, the latitude and longitude of Los Angeles are 34.0522° N and -118.2437° W.
  3. Click the "Calculate" button to compute the distance between the two points.
  4. The result will be displayed in kilometers. The calculator uses the Haversine formula to calculate the distance, which takes into account the Earth's curvature.

Haversine Formula

The Haversine formula is an equation that calculates the great-circle distance between two points on a sphere given their longitudes and latitudes. The formula is as follows:

Distance = 2 * R * arcsin(sqrt(sin^2((lat2 - lat1)/2) + cos(lat1) * cos(lat2) * sin^2((lon2 - lon1)/2)))

Where:

  • R = Earth's radius (mean radius = 6,371 km)
  • lat1 = Latitude of the first point
  • lon1 = Longitude of the first point
  • lat2 = Latitude of the second point
  • lon2 = Longitude of the second point