Calculate distance between two points

Calculating the distance between two points in the coordinate system


On this page the distance between two points in the coordinate system is calculated. To do this, enter the X / Y coordinates of the two points A and B. It doesn't matter which point is first and which is second. The result will be the same.


Distance calculater

 Input
PointA   (x, y)
Point B   (x, y)
Decimal places
 Results
Distance A,B (c)
Distance X (b)
Distance Y (a)
Angle α

Formula for distance between two points


To find the distance between two points, use the distance formula. In the formula, x and y stand for the position on a coordinate plane.

\(d=\sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}\)

In the graphic above, the two elements a and b form the legs of a right triangle. The following Pythagorean theorem can therefore be used to calculate the distance c.

\( \displaystyle c=\sqrt{a^2 + b^2}\)

The values for a and b are calculated from the distance between the x and y coordinates


Distance of the Y coordinates


\(\displaystyle a=y_2-y_1\)

Distance of the X coordinates


\(\displaystyle b= x_2-x_1\)

If that is summed up in one formula, the distance formula above results for calculating the distance between the points.


Calculate the angle to the X axis


\(\displaystyle α=asin\left(\frac{a}{c}\right) \) \(\displaystyle = asin\left(\frac{y_2-y_1}{\sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}}\right)\)
\(\displaystyle α=acos\left(\frac{b}{c}\right) \) \(\displaystyle = acos\left(\frac{x_2-x_1}{\sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}}\right)\)

More graphics functions

Angle of two lines
Angle of two vectors
Center of a straight line
Distance of two points
Distance of a point and a line
Rise over Run
Slope of a line
Straight line equation
Circular arc
Helix
Koch snowflake



Is this page helpful?            
Thank you for your feedback!

Sorry about that

How can we improve it?