download.fan

Distance Formula Calculator

Find the distance between two points in 2D or 3D with the distance formula, plus the midpoint. Free distance and midpoint calculator.

Point 1 (x₁, y₁)
Point 2 (x₂, y₂)
Distance
5
Midpoint
(2.5, 4)
Formula
√((x₂−x₁)² + (y₂−y₁)²)

Pythagoras on a grid

The distance formula is the Pythagorean theorem applied to coordinates: the horizontal and vertical gaps between two points are the two shorter sides of a right triangle, and the distance is its hypotenuse, d = √((x₂ − x₁)² + (y₂ − y₁)²). In three dimensions, add (z₂ − z₁)² under the root. The midpoint is simply the average of each coordinate.

How to use it

  1. 1

    Choose 2D or 3D

    Use 3D for points with a z coordinate.

  2. 2

    Enter both points

    Negative numbers and decimals work.

  3. 3

    Read the distance

    Plus the midpoint between the two points.

Frequently asked questions

What is the distance between (1, 2) and (4, 6)?

√((4 − 1)² + (6 − 2)²) = √(9 + 16) = √25 = 5.

How do I find the midpoint?

Average the coordinates: ((x₁ + x₂)/2, (y₁ + y₂)/2). For (1, 2) and (4, 6) it's (2.5, 4).

Does the order of the points matter?

No. The differences are squared, so the distance is the same either way.

Is anything sent to a server?

No. Everything is calculated in your browser, and nothing you type is stored or sent anywhere.

Math calculators

Related tools