Skip to content

Distance & Midpoint Calculator

Enter two points to get the straight-line distance between them and the point exactly halfway. Distances that are not whole numbers are also given in simplest radical form, like 2√2.

How to use the distance & midpoint calculator

  1. Enter the coordinates of the first point (x₁, y₁).
  2. Enter the second point (x₂, y₂).
  3. Read the distance, the exact form and the midpoint.

Examples

(1, 2) and (4, 6)

Answer: distance 5, midpoint (2.5, 4)

(0, 0) and (2, 2)

Answer: distance 2√2, midpoint (1, 1)

Distance and midpoint formulas

For two points and :

Enter the two points, and the calculator gives the exact distance (simplified radical), the decimal, the midpoint and the slope between them, with steps.

Worked example

Points and .

Distance:

Midpoint:

Why the distance formula works

Draw a right triangle with horizontal leg and vertical leg . The distance is its hypotenuse, so this is just the Pythagorean theorem.

Finding an endpoint from the midpoint

If is the midpoint and one endpoint is , the other is .

In three dimensions

Common mistakes

  • Subtracting a negative: , not 2.
  • Forgetting to square before adding, or taking the square root of each term separately.
  • Averaging with for the midpoint. Average the -values together and the -values together.

Where you'll use it

Proving shapes are isosceles or parallelograms in coordinate geometry, finding a circle's radius and centre from a diameter's endpoints, and GPS-style "how far apart" problems on a grid.

In real life: meeting halfway

On a city map with a 1 km grid, your home is at and your friend's is at .

  • Straight-line distance: km.
  • Meeting point halfway: , which is 5 km from each of you.

If you have to walk along the streets of a grid, the distance is km instead. Mathematicians call this the taxicab distance. The straight-line distance is what a drone or a bird would fly.

Video games use the distance formula constantly to check whether a player is close enough to an object to interact with it.

Formulas

Practice problems

Try each one first, then open the answer to check your work.

  1. 1.Distance between and ?

    Show answer

    10.

  2. 2.Distance between and ?

    Show answer

    5.

  3. 3.Midpoint of and ?

    Show answer

    .

  4. 4.Distance between and , in exact form?

    Show answer

    .

  5. 5. is the midpoint and is one end. Find .

    Show answer

    .

Key terms

Distance
The length of the straight segment between two points.
Midpoint
The point exactly halfway along a segment.
Coordinates
An ordered pair giving a point's position.
Segment
Part of a line between two endpoints.
Bisector
A line that cuts something into two equal parts.

Frequently asked questions

Where does the distance formula come from?

It is the Pythagorean theorem. The horizontal and vertical gaps are the legs of a right triangle and the distance is the hypotenuse.

What is the midpoint formula?

Average the x-coordinates and average the y-coordinates: M = ((x₁ + x₂)/2, (y₁ + y₂)/2).

Does the order of the points matter?

No. Swapping them changes the signs inside the brackets, but squaring removes the difference, and the midpoint averages are the same.

How do I find the length of a diagonal of a shape on a grid?

Use the distance formula on its two endpoints.

How do I show a triangle is isosceles using coordinates?

Calculate all three side lengths with the distance formula. Two equal lengths means it's isosceles.

What is the perpendicular bisector?

The line through the midpoint at right angles to the segment. Every point on it is the same distance from both endpoints.