Distance Calculator tool

Distance Calculator

Distance between two points depends on how you model the surface.

What is a distance calculator?

A distance calculator finds the straight-line gap between two points. In 2D Cartesian mode, coordinates are treated as kilometres on a flat plane and distance uses the Pythagorean theorem. In latitude and longitude mode, it uses the Haversine formula on a sphere with Earth radius 6371 km. Results show kilometres and miles.

How to use the Distance Calculator

  1. Pick 2D Cartesian or Latitude and longitude.
  2. Enter both points in the fields shown.
  3. Use decimal degrees for lat and long.
  4. Read distance in km and miles.
  5. Stay in one mode for each run.

About this calculator

Distance between two points depends on how you model the surface. On a flat map or graph paper, the straight line follows the Pythagorean theorem — enter x and y in kilometres and get the Euclidean gap. On Earth, two GPS coordinates connect along a great circle; the Haversine formula estimates that arc using the mean Earth radius of 6,371 km.

Use 2D mode for homework coordinate geometry, CAD layouts, or game maps where units are already in kilometres. Use lat/long mode for city-to-city hops (Delhi to Mumbai), flight planning rough checks, or verifying map pin spacing. Output shows both kilometres and miles.

Haversine treats Earth as a sphere, so results differ slightly from geodesy-grade tools on very long routes. For classroom and travel estimates it is accurate enough. Pair with the [[pythagorean]] calculator for right-triangle distance, the [[slope]] calculator for line steepness between points, and the [[speed]] calculator to turn distance into travel time.

How the math works

d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
  • RR: Earth radius — 6,371 km
  • φφ: Latitude
  • λλ: Longitude

Worked examples

Delhi to Mumbai — crow flies

Lat/long: Delhi (28.61°N, 77.21°E) to Mumbai (19.08°N, 72.88°E).

• Haversine: ~1,148 km (~713 mi) • Typical flight: 2 h; road: ~1,400 km, 18+ h

3-4-5 triangle on a grid

Points (0,0) and (3,4) km apart.

• d = √(9 + 16) = 5 km • Classic Pythagorean triple — use the pythagorean calculator to verify.

Common uses

  • City-to-city great-circle distance from GPS coordinates
  • Coordinate geometry homework — distance between two (x, y) points
  • Rough flight or road-trip length checks before booking
  • Survey and mapping — verify spacing between grid points
  • Game or CAD layouts using a flat kilometre grid

Frequently asked questions

What is the distance between Delhi and Mumbai by coordinates?

Delhi (28.6139° N, 77.2090° E) to Mumbai (19.0760° N, 72.8777° E) is about 1,148 km (713 miles) as the crow flies. Road and rail distances are longer because they follow curves and terrain.

When should I use 2D Cartesian instead of lat/long?

Use 2D when both points sit on the same flat grid with consistent units — graph paper, floor plans, or simple maps. Use lat/long when you have GPS degrees for real-world locations on Earth.

How accurate is the Haversine formula?

Haversine assumes a perfect sphere. For most city and regional distances the error stays under 0.5% compared with WGS-84 ellipsoid models. Very long polar routes can differ more.

Why are my 2D coordinates in kilometres?

The calculator treats x and y as kilometres so the Euclidean result maps directly to km and miles output. If your grid uses metres, divide by 1,000 before entering, or scale the result accordingly.

Does this give driving or walking distance?

No — both modes return straight-line distance. Driving distance follows roads and is always longer. Use this for as-the-crow-flies checks; use a maps app for turn-by-turn route length.

Deep dive

Euclidean vs Haversine

Flat plane vs curved Earth.

Great-circle routes

Why flights look curved on flat maps.

Related calculators

Maintained by J Jaya Prakash · Last updated: October 2026