EN
My tools

Distance Formula Calculator (Distance & Midpoint)

Find the distance between two points in 2D or 3D, in exact radical form (√45 = 3√5) and as a decimal, plus the midpoint and every substitution step.

Distance
6.708204
Exact form
√45 = 3√5
Midpoint
(4, 3.5)
Squared distance
45
Δx
6
Δy
3
Steps
d = √((7 − 1)² + (5 − 2)²) = √(36 + 9) = √45 = 3√5 ≈ 6.708203932
Manhattan (taxicab) distance
9
sum of |Δ| along each axis
My tools →
Advertisement

The distance formula is the Pythagorean theorem applied to coordinates: the horizontal and vertical gaps between two points are the legs of a right triangle, and the distance is its hypotenuse. This calculator works in 2D or 3D, gives the answer in simplified radical form (such as 3√5) as well as a decimal, and also finds the midpoint, with each substitution written out.

How to use this tool

  1. Enter the x and y coordinates of both points.
  2. For 3D, also enter both z values; leave them empty for a flat plane.
  3. Read the distance, its exact radical form and the midpoint.
  4. Follow the steps line to see each subtraction and square.

Formula

d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²) · midpoint M = ((x₁ + x₂)/2, (y₁ + y₂)/2, (z₁ + z₂)/2)

Leave out the z terms in 2D. The radical is simplified by taking square factors out of the square root: √45 = √(9 × 5) = 3√5. Decimal coordinates are scaled to whole numbers first, so (0.1, 0.1) gives √2/10 exactly.

Example

From (1, 2) to (7, 5), the gaps are 6 and 3, so d = √(36 + 9) = √45 = 3√5 ≈ 6.7082. The midpoint is (4, 3.5). In 3D, from (1, 2, 3) to (4, 6, 15) the gaps 3, 4 and 12 give d = √169 = 13.

Frequently asked questions

Does the order of the points matter?

No. Each difference is squared, so (x₂ − x₁)² equals (x₁ − x₂)² and the distance is the same either way.

How do I find the slope as well?

Slope is rise over run: (y₂ − y₁) ÷ (x₂ − x₁). For (1, 2) and (7, 5) that is 3 ÷ 6 = 0.5.

What is the Manhattan distance?

It is the distance along a grid, moving only along the axes: |Δx| + |Δy| (+ |Δz|). It is used for city-block routes, grid games and some data-analysis methods.

Last updated:

Cite or embed this tool
APA

kakaoCalc. (2026, November 9). Distance Formula Calculator (Distance & Midpoint). https://kakao.mobile/tools/distance-formula-calculator/

MLA

“Distance Formula Calculator (Distance & Midpoint).” kakaoCalc, 9 Nov. 2026, kakao.mobile/tools/distance-formula-calculator/.

Paste this code into your page. The widget runs in your visitors' browsers, shows no ads and keeps a link back to this page. Embedding terms

Advertisement