Skip to content

Distance Calculator

Measure the straight-line distance between two points on a plane, in space, or on Earth.

Distance

10

Δx
6
Δy
8
Midpoint
(4, 6)

How it was calculated

  1. d = √((x₂ - x₁)² + (y₂ - y₁)²)
  2. d = √((7 - 1)² + (10 - 2)²)
  3. d = √(36 + 64) = √100
  4. d = 10

Calculations run on this device and your inputs are not uploaded. A share link puts your inputs in the URL, so anyone with the link can read them.

More Math Calculators

All calculators

How the distance calculator works

In a plane, the distance between two points comes from the Pythagorean theorem: d = √((x₂ - x₁)² + (y₂ - y₁)²). In 3D, add the z difference squared under the root.

On Earth, the shortest path between two latitude/longitude points follows a great circle. The haversine formula gives it on a sphere of radius 6,371 km; Vincenty's formula refines it on the slightly flattened WGS-84 ellipsoid (accurate to about 0.5 mm) and is used for the main answer.

Enter coordinates in decimal degrees, with south latitudes and west longitudes negative (New York is 40.7128, -74.0060).

Using and checking your result

Published by JustYourCalculator. Check the units and assumptions above, and compare a known example before relying on the output. Calculations use browser arithmetic and may round displayed values.

Share links may contain your input values. Anyone with the URL can read them; avoid sharing sensitive personal or financial information.

Frequently asked questions

Subtract the coordinates, square the differences, add them, and take the square root. From (1, 2) to (7, 10): √(36 + 64) = √100 = 10.

About 5,585 km (3,470 miles) in a straight line over the Earth's surface.

Decimal = degrees + minutes / 60 + seconds / 3600, negative for south or west.

Yes. Every calculator is free with no sign-up. Clearly labeled ads keep it that way.

Calculations run in your browser. Share links put inputs in the URL, which can be read by anyone you send it to and is sent to the hosting server when opened. Avoid sharing sensitive numbers. Currency conversion requests public exchange rates.

Results follow the formulas and assumptions shown, with normal rounding and numerical limits. Taxes, rates and health guidance can change, so treat these as estimates and confirm important decisions with a qualified professional.