Free Online Calculator

Distance Calculator

Find the distance between two points or two places.

Last updated: Free, no sign-up Private — runs in your browser

Quick answer: the distance formula

d = √((x₂ − x₁)² + (y₂ − y₁)²). The distance from (1, 2) to (4, 6) is 5.

Overview of the Distance Calculator

This page has two distance tools. The first finds the straight-line (Euclidean), Manhattan and Chebyshev distance between two points in 2-D or 3-D, with the midpoint, slope and angle. The second finds the great-circle distance between two places from their latitude and longitude using the haversine formula, with the initial bearing.

The Cartesian formula is the Pythagorean theorem in coordinates — see the Pythagorean Theorem Calculator. For the line through the points use the Slope Calculator. For road trips try the Mileage Calculator and Speed Calculator.

How We Calculate

The calculator applies the standard method step by step.

  1. Subtract the coordinates to get Δx, Δy (and Δz).
  2. Euclidean distance = √(Δx² + Δy² + Δz²); Manhattan = |Δx| + |Δy| + |Δz|; Chebyshev = the largest of them.
  3. Geographic: haversine a = sin²(Δφ/2) + cos φ₁ cos φ₂ sin²(Δλ/2); distance = 2R asin √a with R = 6,371 km.
  4. Bearing = atan2(sin Δλ cos φ₂, cos φ₁ sin φ₂ − sin φ₁ cos φ₂ cos Δλ).
d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²)
Worked example — distance calculator
ItemValue
Euclidean (straight-line) distance5
Manhattan (taxicab) distance7
Chebyshev distance4
Δx, Δy3, 4
Midpoint(2.5, 4)
Slope1.3333333333
Angle of the line53.13010235°
Distance between two points
PointsDistance
(1,2) to (4,6)5
(0,0) to (3,4)5
(−2,5) to (4,−3)10
(0,0) to (5,12)13
(1,1) to (7,9)10

Distance Calculator — Frequently Asked Questions

What is the distance formula?

d = √((x₂ − x₁)² + (y₂ − y₁)²). It is the Pythagorean theorem applied to coordinates.

How do I find the distance between two points in 3-D?

Add the squared difference in z: d = √(Δx² + Δy² + Δz²).

What is Manhattan distance?

The distance you would travel along a grid, adding the horizontal and vertical differences: |Δx| + |Δy|.

How is the distance between two cities calculated?

With the haversine formula, which finds the shortest path over the Earth's surface (the great-circle distance).

Is great-circle distance the same as road distance?

No. It is the straight-line 'as the crow flies' distance; roads are usually 10–30% longer.

How do I find a midpoint?

Average the coordinates: ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2).

How is the distance calculator calculated?

It uses the standard method: d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²) The full working and a worked example are shown on this page.

How accurate is this calculator?

Decimal results use standard double-precision arithmetic (about 15–16 significant digits). Tools that work with whole numbers — big numbers, factors, bases, combinations — use exact integer arithmetic, so no digits are lost.

Can I use it for homework or exams?

Yes for checking your work and learning the method. The steps and formula are shown so you can understand the answer, but follow your teacher's rules about calculators in exams.

Is my data stored?

No. Everything is calculated in your browser and nothing you enter is uploaded or saved.

More Free Calculators You May Need

Need a custom calculator or tool on your website?

Our team designs and develops fast, SEO-ready websites and web tools. Tell us what you need.

Call Us WhatsApp

Get a Free Quote

Tell us a bit about your project — we'll get back to you shortly.

1 + 9 =
Call WhatsApp