Skip to content
Math & Stats

Distance Formula Calculator

Calculate the distance between two points, the midpoint, and the horizontal and vertical change using the distance formula d = √((x₂−x₁)² + (y₂−y₁)²).

Distance Formula Calculator

Method

How this calculator works

The distance between two points is d = √((x₂−x₁)² + (y₂−y₁)²), derived from the Pythagorean theorem. The midpoint is ((x₁+x₂)/2, (y₁+y₂)/2).

  1. Enter the coordinates of the first point (x₁, y₁).
  2. Enter the coordinates of the second point (x₂, y₂).
  3. Click Calculate to find the straight-line distance, the midpoint, and the horizontal (Δx) and vertical (Δy) change.

Examples

Worked examples

Real numbers, end-to-end results.

Distance from (1, 2) to (4, 6)

d = 5.0000

Δx = 3, Δy = 4, so d = √(9 + 16) = √25 = 5.

Midpoint of (1, 2) and (4, 6)

(2.5, 4)

Average each coordinate: (1+4)/2 = 2.5 and (2+6)/2 = 4.

Use cases

When to use it

  • Solving coordinate geometry homework and exam problems.
  • Finding the length of a line segment on a graph.
  • Measuring straight-line distance between map coordinates.
  • Computing displacement in physics between two positions.

FAQ

Frequently asked questions

What is the distance formula?
The distance formula finds the straight-line distance between two points (x₁, y₁) and (x₂, y₂) on a coordinate plane: d = √((x₂−x₁)² + (y₂−y₁)²). It is derived directly from the Pythagorean theorem.
How is the distance formula related to the Pythagorean theorem?
The horizontal change (Δx) and vertical change (Δy) between two points form the two legs of a right triangle. The distance between the points is the hypotenuse, so d² = Δx² + Δy², which gives the distance formula when you take the square root.
Does the order of the points matter?
No. Because the differences are squared, (x₂−x₁)² equals (x₁−x₂)². You get the same distance whether you start from the first point or the second, so the order is irrelevant.
What is the midpoint of two points?
The midpoint is the point exactly halfway between the two given points. It is found by averaging the coordinates: M = ((x₁+x₂)/2, (y₁+y₂)/2).
Can the distance be negative?
No. Distance is always zero or positive because it comes from a square root of squared values. If the two points are identical, the distance is 0.