Toolstia / Distance and midpoint calculator
Distance and midpoint calculator
Enter two points as coordinates and get the straight-line distance between them, the midpoint, the change in each coordinate and, for points in a plane, the slope and direction angle.
The distance is the straight line between two points, from the Pythagorean theorem: the square root of the sum of the squared differences in each coordinate. The midpoint is the average of the coordinates. Slope and direction are given for points in a plane.
How it works
- Type point A and point B with commas between the coordinates.
- Use two numbers for a plane or three for 3D space.
- Read the results.
Distance formula
The square root of the sum of the squared differences in each coordinate, which comes from the Pythagorean theorem.
Midpoint
The average of the two points in every coordinate.
Slope and direction
The slope is the change in y over the change in x. A vertical line has no slope. The direction is the angle of the line from the x axis.
3D points
With three coordinates the distance and midpoint work the same way. Slope and direction are not shown.
Questions
Can I use negative or decimal numbers?
Yes. Everything happens in your browser, and nothing you enter is sent anywhere.
Do both points need the same dimension?
Yes, both 2D or both 3D.
What is the unit?
The same unit as your coordinates, so the tool never needs to know.