Math

Distance Calculator

Results

Enter values and calculate to see results.

Embed on your site

Any ezcalcs calculator can be embedded with one script tag. Copy the snippet below or use the homepage playground to preview and customize.

<!-- ezcalcs embed: distance-calculator — paste anywhere in the body -->
<script
  async
  src="https://ezcalcs.net/embed.js"
  data-calc="distance-calculator"
  data-theme="light"
  data-width="100%"
  data-height="640"
></script>

Enter two locations and get the straight line distance between them instantly. This free map distance calculator measures the distance between two points in miles, kilometers, or nautical miles. It uses the geographic coordinate system to compute great circle distance on a sphere, giving you a reliable estimate for flight planning, travel research, or simple curiosity.

Map Distance Calculator Tool

The calculator above lets you find the distance between any two places on Earth. Type in two addresses, cities, or coordinates. The tool plots both points on the map and returns the straight line distance in your chosen unit.

This is an air distance measurement (sometimes called "as the crow flies"). It does not account for driving routes, road conditions, or terrain. Use it when you need a quick approximate distance between two locations without mapping a full route.

Results update immediately. You can switch between miles, kilometers, and nautical miles without re-entering your locations.

How to Calculate Distance Between Two Addresses

Enter a City, Address, or Location

Start by typing a city name, street address, or any recognizable place into each input field. The tool autocompletes common locations so you can select the right one quickly.

You can mix formats. Enter a full street address in one field and just a city name in the other. The calculator resolves each to a point on the map and measures the distance between them.

A few tips for accurate results:

  • Include the state or country for common city names (Portland, OR vs. Portland, ME).
  • Use a street address when you need distance from a specific building or intersection.
  • Landmarks and airport codes often work too.

Calculate Distances Given Latitude and Longitude

If you already have coordinates, enter them directly. The calculator accepts latitude and longitude in decimal degrees (for example, 40.7128, -74.0060 for New York City).

This is useful when you're working with GPS data, flight plans, or geographic datasets. Paste your coordinate pair into the input field, and the tool will place the point on the map automatically.

Latitude ranges from -90 to 90. Longitude ranges from -180 to 180. Reversing them is a common mistake that produces wildly wrong results.

Distance on Map: Miles, Kilometers, and Nautical Miles

The calculator displays distance in three common units:

  • Miles (mi): Standard in the United States and United Kingdom for everyday travel.
  • Kilometers (km): Used in most other countries and in scientific contexts.
  • Nautical miles: Standard in aviation and maritime navigation. One nautical mile equals one minute of latitude.

Select the desired unit from the dropdown, and the result converts instantly. There is no need to re-run the calculation.

Quick conversions for reference:

  • 1 mile = 1.609 kilometers
  • 1 nautical mile = 1.852 kilometers
  • 1 nautical mile = 1.151 miles

These conversions are exact, so switching between units does not reduce accuracy.

Distance Between Two Cities or Airport Locations

Planning a flight or comparing travel options? Enter two cities or airport locations to see the air distance between them. This is the same straight line measurement airlines reference when listing flight distances.

Common uses:

  • Estimate flight distance between two airports before booking.
  • Compare distances between cities when choosing a destination.
  • Calculate mileage for frequent flyer programs that credit based on distance.

Keep in mind that actual flight paths are rarely a perfect straight line. Air traffic routing, wind patterns, and restricted airspace add distance. The calculator gives you the great circle distance, which is the shortest possible path over Earth's surface. Actual travel distance will be somewhat longer.

How the Haversine Formula Calculates Great Circle Distance on a Sphere

The calculator uses the Haversine formula to compute distance. This formula treats Earth as a sphere and finds the shortest path along its curved surface between two points. That path is called the great circle distance.

The math works by converting latitude and longitude into radians, then applying trigonometric functions to account for Earth's curvature. The result is far more accurate than measuring a flat map with a ruler, especially over long distances.

For most practical purposes, the Haversine formula is accurate to within about 0.5% of the true distance. Earth is not a perfect sphere (it bulges slightly at the equator), so extremely precise applications like surveying use more complex models. For travel planning, flight estimates, and general distance calculation, the Haversine result is more than sufficient.

Latitude and Longitude in the Geographic Coordinate System

Every point on Earth has a unique address in the geographic coordinate system. Latitude measures how far north or south a point is from the equator. Longitude measures how far east or west it is from the Prime Meridian.

Together, these two numbers pinpoint any location on the globe. The calculator converts city names and street addresses into latitude and longitude behind the scenes before running the distance computation.

Understanding coordinates helps when you're working with raw GPS data or need to verify that the tool placed your point correctly on the map.

Euclidean Distance vs. Great Circle Distance on Earth

Euclidean distance is the straight line between two points on a flat surface. It works well for short distances on a local map, like measuring across a parking lot.

Over longer distances, Earth's curvature matters. A flat line calculation would underestimate the actual surface distance between, say, New York and London by hundreds of miles. That's why this calculator uses great circle distance instead.

Think of it this way: stretch a string tightly across a globe between two pins. The string follows the curved surface. That curve is the great circle path, and it is always shorter than any other route along the surface.

Map Distance Calculator vs. Google Maps: What Makes This Tool Different

Google Maps is built for driving and walking directions. It calculates route distance along roads, including every turn and highway merge. That's perfect when you need door-to-door navigation.

This map distance calculator solves a different problem. It gives you the straight line (air) distance between two points. No route, no traffic, no turn-by-turn steps.

Here's when each tool fits best:

Use caseThis calculatorGoogle Maps
Air distance between citiesNot its focus
Flight distance estimate
Driving directions
Walking or cycling route
Nautical mile output
Quick distance, no account needed

Use this calculator when you need a fast, clean distance number without route details. Use Google Maps when you need to actually drive or walk somewhere.

Calculate Distance Between Two Points Using Different Base Units

Some projects require distance in meters, feet, or other base units beyond miles and kilometers. The calculator lets you select different output units so you can work in whichever measurement system your project demands.

Common scenarios:

  • Meters: Useful for scientific research, shorter geographic distances, and international data standards.
  • Feet: Sometimes needed for aviation altitudes or US construction references.
  • Nautical miles: Required for maritime and aviation charts.

Switching units does not re-run the calculation. The underlying distance is computed once, then converted mathematically. All conversions use standard, exact ratios.

If you need to compare distances along a running path or walk route, note that this tool measures air distance only. The actual path distance along roads, trails, or tracks will be longer due to curves and elevation changes.

Share Your Distance Calculator Page Results

After you calculate the distance between two locations, you can share your results. Copy the generated link to send the exact same measurement to a colleague, travel partner, or client.

Sharing is useful when you're coordinating travel plans, comparing destination options, or documenting distances for a report. The recipient sees the same two points on the map and the same distance output without re-entering anything.

No account or login is required to use or share this free distance calculator. Enter your locations, get your result, and pass it along.