Distance Calculator – Find Distance Between Two Points Instantly

Calculate distances between points with multiple methods, units, and advanced features.

Distance Calculator

Select calculation method and input locations

📍 Coordinates
🏙️ Cities
📫 Addresses
🗺️ Route
📊 Batch
📈 Matrix
Point A
Point B
From City
To City
From Address
To Address
Start Point
Via Point
End Point
CSV
JSON
Lines
Haversine
Spherical Law
Vincenty
Equirectangular
Kilometers
Miles
Meters
Feet
Nautical Miles
Yards
6371 km
3959 mi
6378137 m
Custom
Haversine: d = 2R × arcsin(√(sin²(Δφ/2) + cos φ₁ × cos φ₂ × sin²(Δλ/2)))

Distance Results

KML
GPX
CSV
JSON
Print
-
Distance
-
Bearing
-
Method
-
Units

Recent Calculations

What is Distance Calculation?

Distance is a numerical measurement of how far apart objects or points are. In geography and navigation, distance calculation between coordinates is essential for mapping, routing, and location-based services.

Our professional distance calculator supports multiple calculation methods, units, and advanced features for accurate distance measurements.

Key Concepts:

  • Straight-line Distance: Shortest distance between two points (as the crow flies)
  • Great-circle Distance: Shortest path between two points on a sphere
  • Driving Distance: Distance following actual roads and paths
  • Bearing/Azimuth: Direction from one point to another
  • Elevation: Height above sea level affecting distance calculations

Why is Distance Calculation Important?

  • Navigation: GPS systems, route planning, and turn-by-turn directions
  • Logistics: Shipping, delivery routes, and supply chain optimization
  • Geography: Mapping, surveying, and geographic information systems
  • Sports: Race courses, running routes, and fitness tracking
  • Real Estate: Property measurements and proximity calculations

Distance Calculation Methods

Different methods for calculating distances based on accuracy requirements and use cases:

Haversine Formula

Most common method for calculating great-circle distances between two points on a sphere.

a = sin²(Δφ/2) + cos φ₁ × cos φ₂ × sin²(Δλ/2)
c = 2 × atan2(√a, √(1−a))
d = R × c

Accuracy: High (spherical Earth)

Use: GPS, navigation, mapping

Spherical Law of Cosines

Simpler formula for shorter distances, less accurate for very short distances.

d = acos(sin φ₁ × sin φ₂ +
cos φ₁ × cos φ₂ × cos Δλ) × R

Accuracy: Medium

Use: Quick calculations, approximations

Vincenty Formula

Most accurate method accounting for Earth's ellipsoidal shape.

Complex iterative solution
Accounts for Earth flattening

Accuracy: Very High (ellipsoidal Earth)

Use: Surveying, precise measurements

Equirectangular Approximation

Fast approximation assuming Earth as flat plane.

x = Δλ × cos((φ₁+φ₂)/2)
y = Δφ
d = R × √(x² + y²)

Accuracy: Low (short distances only)

Use: Quick estimates, small areas

Manhattan Distance

Distance measured along axes at right angles (grid-based).

d = |x₂ - x₁| + |y₂ - y₁|

Accuracy: Grid-based

Use: City blocks, grid navigation

Euclidean Distance

Straight-line distance in Cartesian coordinates.

d = √((x₂ - x₁)² + (y₂ - y₁)²)

Accuracy: Flat plane

Use: Local maps, small areas

Distance Calculation Formulas

Complete reference of distance formulas for various calculation methods:

Haversine Formula

a = sin²(Δφ/2) + cos φ₁ × cos φ₂ × sin²(Δλ/2)
c = 2 × atan2(√a, √(1−a))
d = R × c
Where φ is latitude, λ is longitude, R is Earth's radius (6371 km). Most accurate for spherical Earth calculations.

Vincenty Formula

Iterative solution for ellipsoid
Accounts for Earth flattening (1/298.257)
Accuracy: ±1 mm
Most accurate method for geodetic distances on WGS84 ellipsoid. Used in professional surveying.

Great Circle Distance

d = R × acos(sin φ₁ sin φ₂ +
cos φ₁ cos φ₂ cos Δλ)
Shortest distance between two points on a sphere. Used in aviation and maritime navigation.

Bearing/Azimuth

θ = atan2(sin Δλ × cos φ₂,
cos φ₁ × sin φ₂ − sin φ₁ × cos φ₂ × cos Δλ)
Calculates initial bearing (direction) from point A to point B. Essential for navigation.

Midpoint Calculation

Bₓ = cos φ₂ × cos Δλ
Bᵧ = cos φ₂ × sin Δλ
φₘ = atan2(sin φ₁ + sin φ₂, √((cos φ₁ + Bₓ)² + Bᵧ²))
λₘ = λ₁ + atan2(Bᵧ, cos φ₁ + Bₓ)
Calculates the midpoint between two coordinates on a sphere. Useful for route planning.

Destination Point

φ₂ = asin(sin φ₁ × cos δ +
cos φ₁ × sin δ × cos θ)
λ₂ = λ₁ + atan2(sin θ × sin δ × cos φ₁,
cos δ − sin φ₁ × sin φ₂)
Calculates destination point given start point, bearing, and distance. Essential for navigation.

Unit Conversion Factors

Length Units:
1 kilometer (km) = 0.621371 miles (mi)
1 mile = 1.60934 kilometers
1 nautical mile (nmi) = 1.852 kilometers
1 meter (m) = 3.28084 feet (ft)
1 foot = 0.3048 meters
1 yard (yd) = 0.9144 meters

Earth Measurements:
Equatorial radius: 6,378.137 km
Polar radius: 6,356.752 km
Mean radius: 6,371.009 km
Flattening: 1/298.257223563

Real-World Applications of Distance Calculation

Distance calculations are essential in numerous fields and everyday situations:

Navigation & Transportation

  • GPS navigation systems and route planning
  • Airline flight path calculations
  • Shipping and maritime navigation
  • Public transportation routing
  • Ride-sharing and delivery services

Logistics & Supply Chain

  • Delivery route optimization
  • Warehouse location planning
  • Supply chain network design
  • Fleet management and tracking
  • Last-mile delivery optimization

Geography & GIS

  • Geographic Information Systems (GIS)
  • Cartography and map making
  • Land surveying and property boundaries
  • Environmental monitoring
  • Urban planning and development

Sports & Fitness

  • Running and cycling route planning
  • Race course measurement
  • Fitness tracking and activity monitoring
  • Golf course design
  • Sports field measurements

Real Estate & Property

  • Property boundary measurements
  • Proximity to amenities analysis
  • Land area calculations
  • Zoning and development planning
  • Property valuation based on location

Emergency Services

  • Emergency response routing
  • Ambulance and fire station placement
  • Disaster response planning
  • Search and rescue operations
  • Evacuation route planning

Solved Distance Calculation Examples

Step-by-step solutions to common distance problems:

Example 1: New York to Los Angeles
Calculate the great-circle distance between New York (40.7128°N, 74.0060°W) and Los Angeles (34.0522°N, 118.2437°W).
1. Convert to radians: φ₁ = 40.7128° × π/180 = 0.7102
2. φ₂ = 34.0522° × π/180 = 0.5944, Δφ = 0.1158
3. λ₁ = -74.0060° × π/180 = -1.2915
4. λ₂ = -118.2437° × π/180 = -2.0634, Δλ = 0.7719
5. Apply Haversine: d = 3935.7 km (2445.5 mi)
Distance: 3935.7 km (2445.5 mi)
Example 2: London to Paris
Calculate distance between London (51.5074°N, 0.1278°W) and Paris (48.8566°N, 2.3522°E).
1. Convert coordinates to radians
2. φ₁ = 0.8988, φ₂ = 0.8525, Δφ = 0.0463
3. λ₁ = -0.0022, λ₂ = 0.0411, Δλ = 0.0433
4. Apply Haversine formula
5. Result: d = 343.6 km (213.5 mi)
Distance: 343.6 km (213.5 mi)
Example 3: Tokyo to Sydney
Calculate great-circle distance between Tokyo (35.6762°N, 139.6503°E) and Sydney (33.8688°S, 151.2093°E).
1. Note: Sydney is in Southern Hemisphere
2. φ₁ = 0.6225 (Tokyo), φ₂ = -0.5911 (Sydney)
3. Δφ = 1.2136 radians
4. λ₁ = 2.4371, λ₂ = 2.6390, Δλ = 0.2019
5. Result: d = 7828.4 km (4864.7 mi)
Distance: 7828.4 km (4864.7 mi)
Example 4: Bearing Calculation
Calculate initial bearing from New York to London.
1. Use bearing formula: θ = atan2(sin Δλ × cos φ₂, cos φ₁ × sin φ₂ − sin φ₁ × cos φ₂ × cos Δλ)
2. Convert result from radians to degrees
3. Adjust to compass bearing (0-360°)
4. Result: θ = 51.4° (NE direction)
Bearing: 51.4° (Northeast)
Example 5: Midpoint Calculation
Find midpoint between San Francisco (37.7749°N, 122.4194°W) and Chicago (41.8781°N, 87.6298°W).
1. Convert to radians
2. Apply midpoint formulas
3. Calculate intermediate values
4. Convert back to degrees
5. Result: 39.8265°N, 105.0246°W
Midpoint: 39.8265°N, 105.0246°W
Example 6: Destination Point
Starting from Paris (48.8566°N, 2.3522°E), travel 1000 km at bearing 45°. Find destination.
1. Convert distance to angular distance: δ = d/R
2. δ = 1000/6371 = 0.1570 radians
3. Apply destination point formulas
4. Convert results to degrees
5. Result: 56.234°N, 12.567°E
Destination: 56.234°N, 12.567°E

Distance Calculation Practice Problems

Test your understanding with these practice problems:

Problem 1: Calculate distance between Madrid (40.4168°N, 3.7038°W) and Rome (41.9028°N, 12.4964°E).

Solution:

Using Haversine formula:

φ₁ = 40.4168° = 0.7053 rad

φ₂ = 41.9028° = 0.7313 rad

Δφ = 0.0260 rad

λ₁ = -3.7038° = -0.0646 rad

λ₂ = 12.4964° = 0.2181 rad

Δλ = 0.2827 rad

Result: d = 1365 km (848 mi)

Problem 2: Find bearing from Cairo (30.0444°N, 31.2357°E) to Dubai (25.2048°N, 55.2708°E).

Solution:

Using bearing formula:

θ = atan2(sin Δλ × cos φ₂, cos φ₁ × sin φ₂ − sin φ₁ × cos φ₂ × cos Δλ)

Convert to degrees: θ = 89.7°

Compass bearing: 89.7° (Almost due East)

Problem 3: Calculate midpoint between Beijing (39.9042°N, 116.4074°E) and Seoul (37.5665°N, 126.9780°E).

Solution:

Using midpoint formulas:

Intermediate calculations...

Result: 38.7354°N, 121.6927°E

Location: Yellow Sea, near Korean Peninsula

Problem 4: Starting from Singapore (1.3521°N, 103.8198°E), travel 2000 km at bearing 120°. Find destination.

Solution:

Angular distance: δ = 2000/6371 = 0.3140 rad

Bearing: 120° = 2.0944 rad

Apply destination formulas...

Result: 10.456°N, 115.234°E

Location: South China Sea

Problem 5: Convert 500 kilometers to miles, nautical miles, and feet.

Solution:

500 km = 500 × 0.621371 = 310.6855 miles

500 km = 500 ÷ 1.852 = 269.9784 nautical miles

500 km = 500 × 1000 × 3.28084 = 1,640,420 feet

How to Calculate Distance Step-by-Step

Follow this systematic approach to calculate distances accurately:

1

Gather Coordinates

Obtain latitude and longitude for both points in decimal degrees.

Point A: 40.7128°N, 74.0060°W
Point B: 34.0522°N, 118.2437°W
2

Convert to Radians

Convert all angles from degrees to radians: radians = degrees × π/180.

40.7128° × π/180 = 0.7102 rad
34.0522° × π/180 = 0.5944 rad
3

Calculate Differences

Compute differences in latitude (Δφ) and longitude (Δλ).

Δφ = 0.7102 - 0.5944 = 0.1158 rad
Δλ = 1.2915 - 2.0634 = 0.7719 rad
4

Apply Haversine Formula

Use the Haversine formula for spherical Earth calculations.

a = sin²(Δφ/2) + cos φ₁ × cos φ₂ × sin²(Δλ/2)
c = 2 × atan2(√a, √(1−a))
d = R × c
5

Calculate Distance

Multiply by Earth's radius (R = 6371 km for kilometers).

d = 6371 × 0.6178
= 3935.7 km
6

Convert Units

Convert to desired units if needed (miles, nautical miles, etc.).

3935.7 km × 0.621371
= 2445.5 miles

Pro Tips for Accurate Distance Calculations

  • Use correct Earth radius: 6371 km for kilometers, 3959 mi for miles
  • Consider Earth's shape: Use Vincenty formula for highest accuracy
  • Account for elevation: Significant elevation differences affect straight-line distance
  • Check coordinate format: Ensure consistent decimal degrees format
  • Verify hemisphere: Southern latitudes and western longitudes are negative

Frequently Asked Questions

Common questions about distance calculations, formulas, and real-world applications.

What is the most accurate distance calculation method?
The Vincenty formula is the most accurate because it accounts for Earth's ellipsoidal shape. However, the Haversine formula is widely used as it provides excellent accuracy with faster calculations for most applications.
How accurate are online distance calculators?
Most professional distance calculators are accurate within 0.5% when using advanced formulas like Haversine or Vincenty. Accuracy may vary depending on terrain, elevation, and calculation method.
What is the distance formula in coordinate geometry?
The distance formula is √[(x₂ − x₁)² + (y₂ − y₁)²]. It calculates the straight-line distance between two points on a coordinate plane.
What’s the difference between great-circle and rhumb line distance?
Great-circle distance is the shortest path between two points on a sphere. Rhumb line distance maintains a constant direction but is longer. Great-circle is more accurate for shortest routes.
How does elevation affect distance calculations?
Elevation impacts 3D distance calculations. When elevation differences are large, the actual distance becomes longer than the flat (2D) distance calculated on maps.
Can I calculate distance between multiple points?
Yes, advanced calculators allow multi-point calculations, enabling route planning, total distance measurement, and segment-by-segment analysis.
What units can be used for distance measurement?
Common units include kilometers (km), meters (m), miles (mi), feet (ft), yards (yd), and nautical miles (nmi). Most calculators support instant unit conversion.
How do I convert between different distance units?
Use conversion factors like 1 km = 0.621371 miles, 1 mile = 1.60934 km, and 1 meter = 3.28084 feet. Our calculator performs automatic unit conversion instantly.
What is straight-line distance?
Straight-line distance (also called “as-the-crow-flies”) is the shortest distance between two points without considering roads or terrain.
Can this calculator be used for navigation and travel planning?
Yes, it can estimate distances between cities and locations, making it useful for trip planning, logistics, and navigation when combined with route data.
Is this distance calculator free and reliable?
Yes, the calculator is completely free and provides fast, accurate, and reliable results using proven mathematical formulas and algorithms.