How to find the distance between points

If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Enter 2 sets of coordinates in the x y-plane of the 2 dimensional Cartesian coordinate system, (X1, Y1) and (X2, Y2), to get the distance formula calculation for the 2 points and calculate distance between the 2 points.

Accepts positive or negative integers and decimals. (6 and/or 6.5)

Distance Formula:

The distance between two points is the length of the path connecting them. The shortest path distance is a straight line. In a 2 dimensional plane, the distance between points (X1, Y1) and (X2, Y2) is given by the Pythagorean theorem:

\( d = \sqrt {(x_{2} - x_{1})^2 + (y_{2} - y_{1})^2} \)

Calculate Distance

To calculate the distance between 2 points, (X1, Y1) and (X2, Y2), for example, (5, 6) and (-7,11), we plug our values into the distance formula:

Our distance between two points calculator can quickly find the distance between any two points confined to a two-dimensional plane.

Within this short text, we will cover:

  • How to find the distance between two points;
  • How to use the distance between two points formula; and
  • What is the shortest distance between two points.

Let's start!

Prefer watching rather than reading? Learn all you need in 90 seconds with this video we made for you:

What is distance? Distance between two points definition

In its simplest definition, the distance between two points in a 2D plane is the length of the line segment connecting them.

For example, if we put into a graph the points (0,4)(0, 4)(0,4) and (4,4)(4, 4)(4,4), draw a line between them, and measure this line segment's length, we would get 444 as a result.

This definition is derived from the Euclidean distance definition, and we can also define 1D, 3D, 4D, and any finite dimension Euclidean distance.

Of course, plotting and measuring lines anytime we want to find the distance between two points is not practical. That's where the distance between two points formula comes in.

Distance between two points formula

We can obtain the mathematical distance definition from the Euclidean distance formula for a two-dimensional plane:

d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_{2}-x_{1})^{2}+(y_{2}-y_{1})^{2}}d=(x2x1)2+(y2y1)2

where:

  • x1x_{1}x1 and y1y_{1}y1 are the coordinates of any of the two points;
  • x2x_{2}x2 and y2y_{2}y2 are the coordinates of the other point; and
  • ddd is the distance between them.

💡 This definition is what makes the shortest distance between two points on a two-dimensional plane always a line! Don't worry. We won't dwell deeper into math in this distance between two points calculator 😉.

How do you find the distance between two points?

To find the distance between two points, simply follow these steps:

  1. Find the XY coordinates of the first point (x₁, y₁). It doesn't matter which point we choose as long as we don't mix coordinates between them.
  2. Find the XY coordinates of the other point (x₂, y₂).
  3. Replace these values in the distance between two points formula: √[(x₂ - x₁)² + (y₂ - y₁)²].

Other useful tools

If you enjoyed this distance between two points calculator and want to learn more about other distance definitions, check any of our other distance calculation tools:

  • Distance;
  • 2D distance;
  • Length of a line segment;
  • Coordinate distance; and
  • Euclidean distance.

🙋 Give it a try! Type any two points' coordinates in the distance between two points calculator, and it will automatically output the distance between them.

FAQ

What is the shortest distance between two points?

The shortest distance between two points is a straight line connecting them. This definition only applies to flat surfaces or spaces. In a sphere, for example, the shortest distance between two points is an arc called great circle distance.

What is the distance between (5, 10) and (8, 9)?

3.16228. We can find the distance between points (5, 10) and (8, 9) by replacing them in the distance between two points formula: √[(8 - 5)² + (9 - 10)²] = 3.16228.

How do you find calculate distance?

To solve for distance use the formula for distance d = st, or distance equals speed times time. Rate and speed are similar since they both represent some distance per unit time like miles per hour or kilometers per hour.

How do you find the distance between A and B?

The distance between a and b on the real line is given by the formula |b - a|.