What this calculator does
Distance on a coordinate plane is the length of the straight segment that joins two points. It is not walking distance, because it ignores streets, walls, and one-way signs. The formula treats the horizontal and vertical gaps as the legs of a right triangle, so the distance is the hypotenuse. This page explains the inputs, shows the midpoint, and works through three examples with mixed signs and a vertical line.
How to use it
- Enter x1 and y1 for the first point.
- Enter x2 and y2 for the second point.
- Read the distance, midpoint, dx, and dy.
- Confirm that the unit matches your coordinates, such as feet or meters.
- Swap the two points to check that distance and midpoint stay the same.
How it works
Example calculations
Example 1: (1, 2) to (4, 6)
dx is 3 and dy is 4, so the distance is sqrt(9 + 16) = 5. The midpoint is (2.5, 4).
Example 2: (-2, 5) to (3, -1)
dx is 5 and dy is -6, so the distance is sqrt(25 + 36) = sqrt(61), about 7.81. The midpoint is (0.5, 2).
Example 3: (0, 0) to (0, 8)
dx is 0 and dy is 8, so the distance is 8. The midpoint is (0, 4). There is no horizontal change, so dx adds nothing under the square root.
What the result means
Distance is always zero or positive. A result of zero means both points are the same point. The midpoint sits exactly halfway along the segment, which helps when you need a center, a split point, or a symmetry check. dx and dy are signed, unlike distance, and they describe direction: a positive dx moves right along the x-axis, and a positive dy moves up along the y-axis. The formula assumes a flat plane with equal spacing on both axes. Maps and GPS are different, because latitude and longitude are angles on a curved surface and a degree of longitude shrinks toward the poles. For short spans at one location a flat estimate may be close, but use a mapping or geodesic tool when accuracy across a region matters.
Common mistakes
- Mixing up x and y when reading the coordinates.
- Reporting distance in square units, which describe area rather than length.
- Treating dx or dy alone as the distance instead of the hypotenuse.
- Using latitude and longitude as if they were flat x and y values.
- Rounding each gap before squaring, which adds error to the total.
Assumptions and limits
- Both points lie on a flat, two-dimensional plane.
- The same unit is used for both x and y.
- The axes have equal scale with no stretching or distortion.
- Coordinates may be positive, negative, or zero.
- Displayed results are rounded, usually to two decimal places.
Frequently asked questions
Can the distance be negative?
No. Both gaps are squared, so the value under the square root is positive or zero, and the root itself is never negative.
Does the order of the points matter?
No. Swapping the points flips the signs of dx and dy, but the squares are unchanged and the midpoint is the same.
How do I find the distance from a point to the origin?
Use (0, 0) as one point. For (3, 4), the distance is sqrt(9 + 16) = 5.
Can I use this for three-dimensional points?
No, this page covers two dimensions. A 3D version would add a third gap, dz, under the same square root.
Why is my GPS distance different?
GPS coordinates are angles on a sphere or ellipsoid. This formula treats coordinates as flat distances, so results drift over long spans and at high latitudes.
What does dx mean?
It is x2 minus x1, the horizontal change between the points. Its sign shows whether the second point sits to the right or the left.
Sources
2026 update
How to use the professional output
This page is not just a formula box. The result is designed to be checked, compared, and taken away.
- Professional worksheet. The result includes the inputs used, the method and scope, and a one-variable sensitivity check for finance calculators.
- A/B scenarios. Save two input sets in the browser and compare the primary, secondary, and breakdown figures side by side.
- Print / PDF and CSV. Print a branded worksheet, or export the year-by-year table when the calculator produces one.
The formulas and assumptions above still govern the number. The worksheet makes the estimate auditable; it does not make it a lender quote, tax return, or personalized advice.
Go deeper
