Below is a distance formula calculator, which computes the straight line (Euclidean) distance between two points. It works for 1 through 6 dimensions.
Distance Calculator
What is Euclidean distance?
The Euclidean distance or straight line distance is the length of the path between two points.
The formula is derived from the hypotenuse of a right triangle. If you drew two line segments from the points that met at a 90 degree angle, the opposite side (our distance) is called the hypotenuse.
Formula for Euclidean distance
The distance formula in two dimensions is:
Where:
- d: the distance between the two points (the hypotenuse)
- x1, y1: the x and y coordinates of point 1
- x2, y2: the x and y coordinates of point 2
Expand to three dimensions by adding the z-axis:
For 1 dimension, distance simplifies to a simple difference:
Example distance calculation
Say you have 2 points (x, y): (3, 8) and (-1, 5).
Those two points are 5 units apart.
Using the distance formula calculator
First, select how many dimensions to use in the Dimensions dropdown. For standard X/Y coordinates, leave it at 2.
Enter coordinates for both points in the Point 1 and Point 2 fields. The distance will calculate automatically.
