Skip to content
Calculator Tools
Coordinate Geometry Calculators

Distance Between Two Points Calculator

Find the distance between two points (x₁, y₁) and (x₂, y₂) with the distance formula, step by step, in 2D or 3D.

Also known as distance formula calculator, coordinate distance calculator, distance between coordinates.

Enter values

Results update as you type.

Result

Distance

5

Δx
3
Δy
4
d² (squared distance)
25
Step-by-stepShow
  1. Δx = 5 − 2 = 3
  2. Δy = 7 − 3 = 4
  3. d = √(3² + 4²) = √25 = 5

About the Distance Between Two Points Calculator

The distance formula comes straight from the Pythagorean theorem: the horizontal and vertical gaps between two points are the legs of a right triangle, and the distance is its hypotenuse. Add a z-coordinate for 3D space.

Also known as: distance formula calculator, coordinate distance calculator, distance between coordinates, 2 point distance calculator, distance between points, distance formula.

How to use this calculator

  1. Enter x₁, y₁, x₂, y₂ and the other fields.
  2. The result updates instantly as you type — press Calculate (or Enter) at any time.
  3. Open “Step-by-step” to see how the answer was worked out.
  4. Use Copy result or Share to save the answer or send a link with your inputs.

Distance Between Two Points formula

d = √((x₂ − x₁)² + (y₂ − y₁)²)
(x₁, y₁)
= first point
(x₂, y₂)
= second point
d
= straight-line distance

Worked example

Using the values pre-filled in the calculator above:

  • x₁ = 2
  • y₁ = 3
  • x₂ = 5
  • y₂ = 7
  • z₁ (optional, 3D) = 0
  • z₂ (optional, 3D) = 0

the calculator returns:

  • Distance: 5
  • Δx: 3
  • Δy: 4
  • d² (squared distance): 25

Working

  1. Δx = 5 − 2 = 3
  2. Δy = 7 − 3 = 4
  3. d = √(3² + 4²) = √25 = 5

Frequently asked questions

What is the distance formula?

d = √((x₂ − x₁)² + (y₂ − y₁)²). For (2, 3) and (5, 7): √(3² + 4²) = √25 = 5.

Does the order of the points matter?

No. Squaring removes the sign, so the distance from A to B equals the distance from B to A.

How do I find distance in 3D?

Add the z-difference: d = √(Δx² + Δy² + Δz²). Enter z₁ and z₂ in the optional fields.