Free online calculator

Distance Calculator

Calculate distance between two points using 2D coordinates, 3D coordinates, GPS latitude and longitude, or an interactive world map. Get clear distance results in kilometers, miles, meters, feet, and nautical miles.

Distance Between Two PointsGPS DistanceMap Distance2D & 3D

Calculate Distance Between Two Points

Use this distance calculator to calculate the distance between two points in a 2D coordinate system, 3D space, between GPS coordinates, or on a world map. Choose the method that matches the information you have.

Tip: For a map or GPS location, use straight-line geographic distance. For 2D or 3D coordinates, the calculator uses Euclidean distance.

Distance Between Two Points Calculator

Enter X and Y coordinates to calculate the straight-line distance between two points on a 2D plane.

3D Distance Between Two Points

Use X, Y and Z coordinates to find the straight-line distance between points in three-dimensional space.

GPS Distance Calculator

Enter the latitude and longitude of two locations to calculate GPS distance using the Haversine formula.

Map Distance Calculator

Click the world map to add waypoints and calculate map distance. Drag markers to fine-tune them. The tool calculates the total great-circle distance across the points you add.

    Map data © OpenStreetMap contributors. This tool measures geographic/straight-line distance, not driving distance.
    Distance between two points on a coordinate planeA coordinate plane with Point A and Point B connected by a straight distance line.Point A (x₁, y₁)Point B (x₂, y₂)Straight-line distanceΔx = x₂ − x₁
    Illustration: the 2D distance between two points is the length of the straight line joining them.

    Distance Between Two Points

    The 2D distance between two coordinate points is calculated with the Euclidean distance formula. This is useful in geometry, coordinate systems, graphics, engineering, surveying, and mathematics.

    2D example: For A(2, 3) and B(8, 10), the distance is √((8−2)² + (10−3)²) = √85 ≈ 9.22 units.

    Formula: d = √[(x₂ − x₁)² + (y₂ − y₁)²]

    GPS Distance Calculator

    For two places on Earth, latitude and longitude identify their positions. This calculator uses the Haversine formula to estimate the shortest great-circle distance over the Earth’s surface. It is often described as straight-line, aerial, or “as the crow flies” distance.

    Important: GPS/geographic distance is not the same as driving distance. Road distance requires a routing service and depends on the available road network.
    GPS latitude and longitude distance illustrationA globe with two location points and an arc representing great-circle distance.Point APoint BHaversine great-circle distance
    Illustration: latitude/longitude distance follows a great-circle path on a spherical model of Earth.

    Map Distance Calculator

    Use the interactive map to place two or more waypoints anywhere in the world. The total is calculated from each segment and updates as you add or move points. This is useful for comparing locations, planning approximate paths, measuring geographic distance, and checking distances between cities.

    • Add multiple points, not just two.
    • Drag markers to fine-tune their positions.
    • Switch between km, miles, metres, feet, and nautical miles.
    • Copy or share the current result.

    World Map Distance Calculator

    Need to calculate distance on a world map? Add two or more locations to the interactive map above to measure the geographic distance between them. This is useful for comparing cities, checking approximate air distance, and measuring a multi-point path.

    Map distance example: Select Point A and Point B on the map. The calculator draws the line between them and reports the great-circle distance for the selected points.

    This is geographic or straight-line distance, not driving or road distance.

    Map distance calculator multi-point pathThree points on a simplified world map connected by segments with a total distance.ABCMulti-point map distanceTotal = A→B + B→C
    Illustration: a map measurement can be extended beyond two locations to estimate a multi-point geographic path.

    2D, 3D, GPS and Map Distance: What’s the Difference?

    CalculatorBest forMethod
    2D DistanceCoordinate geometry and flat-plane problemsEuclidean distance
    3D DistancePoints with X, Y and Z coordinates3D Euclidean distance
    GPS / Lat-LongTwo locations on EarthHaversine great-circle distance
    Map DistanceTwo or more points on a world mapGreat-circle distance per segment

    Which Distance Calculator Should You Use?

    Choose the calculator based on the type of points you have:

    • 2D Distance: X and Y coordinates on a flat plane.
    • 3D Distance: X, Y and Z coordinates.
    • GPS Distance: latitude and longitude for two locations.
    • Map Distance: locations selected directly on the world map.

    How to Calculate Distance Between Two Points

    1. Choose the calculation type: 2D, 3D, GPS/latitude-longitude, or map.
    2. Enter the required coordinates or place points on the map.
    3. Select the output unit when available.
    4. Click Calculate Distance and review the result, conversions, formula, and related information.

    Distance Units

    The calculator can express geographic results in several common units.

    UnitUseful for
    Kilometers (km)General geographic and travel-distance estimates
    Miles (mi)Everyday and road-distance comparisons
    Metres (m)Short-distance and technical measurements
    Feet (ft)Property, building and US customary measurements
    Nautical miles (nm)Marine and aviation contexts

    Frequently Asked Questions

    How do I calculate the distance between two points?

    For 2D coordinates, use the Euclidean distance formula. For latitude/longitude coordinates, use a geographic-distance formula such as Haversine. The calculator above handles both.

    What is a GPS distance calculator?

    A GPS distance calculator uses latitude and longitude coordinates to estimate the geographic distance between two locations.

    What is the Haversine formula?

    The Haversine formula estimates great-circle distance between two points given their latitudes and longitudes on a spherical Earth model.

    Does the map calculator show driving distance?

    No. The map mode on this page measures geographic/straight-line distance between the points you select. Driving distance needs road-routing data.

    Can I calculate distance in miles and kilometers?

    Yes. Geographic/map results can be viewed in kilometers, miles, metres, feet, and nautical miles.

    Can I measure more than two points on the map?

    Yes. Add multiple waypoints to see segment distances and the cumulative total.

    Related Calculators

    Replace these example URLs with the exact URLs of your existing calculator pages if your slugs differ.

    About This Distance Calculator

    This 5iTech Distance Calculator combines coordinate geometry, geographic distance and interactive map measurement in one browser-based tool. Calculations are performed in your browser; map tiles are loaded from OpenStreetMap when Map Distance mode is used.

    For map display, OpenStreetMap data is provided under its applicable terms and attribution requirements.