# Distance Between Points Calculator

Enter the x, y, and z coordinates of any two points of a line to calculate the distance between those two points. If you’re only calculating the distance in the 2 dimensional plane, leave the z coordinates blank.

## Distance Formula

The distance between two points on the x and y plane is calculated through the following formula:

D = √[(x₂ – x₁)² + (y₂ – y₁)²]

Where (x1,y1) and (x2,y2) are the points on the coordinate plane and D is distance. With a z coordinate present, the formula changes to.

D = √[ ( X2-X1)^2 + (Y2-Y1)^2) + (Z2-Z1)^2)

## How to calculate distance

Using the above equation or calculator is not the only way to calculate the distance between two points, especially if you don’t initially have both of the coordinates. Sometimes you need to first calculate the end point. This can be done through a few methods, the first being linear interpolation. Linear interpolation uses the slope of a line, the initial point, and either the x or y coordinate of the final point. Visit our interpolation calculator or slope calculator for more information.

Another backwards way of calculating the distance between two points is through using the midpoint. Sometimes only the initial point and the midpoint are given. In this case, you first need to calculate the distance between the initial and midpoint, and then multiply the result by 2. For more information on the midpoint, visit the midpoint calculator.

The last way you might calculate the distance between points is through the use of the unit vector of that line. Typically a unit vector is calculated through the original coordinates, and the magnitude of that line. What you may not know is that the magnitude is another word for distance, so if you have the magnitude, you already have the distance. The learn more about this, visit our unit vector calculator.