This coordinate distance calculator finds straight-line distance and midpoint between two Cartesian points. Choose 2D or 3D to see an exact result, a decimal approximation and the coordinate working. It does not calculate latitude/longitude or driving distances.
How to find distance from coordinates
Pair the coordinates by axis, subtract B minus A, square each difference, add the squares and take the nonnegative square root. In 2D, d = √((x₂ − x₁)² + (y₂ − y₁)²). In 3D, d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²). These Euclidean distance formulas follow the Pythagorean theorem, as set out in MathWorld: Distance.
Choose 2D for x and y, or 3D to add z for both points. Enter signed integers or finite decimals, including zero where needed. Each field holds one coordinate; leave out brackets and coordinate separators.
A negative coordinate stays negative during subtraction. Squaring makes each contribution nonnegative. Swapping the complete points changes the signs of the differences but leaves the distance and midpoint unchanged. Open Calculation details to inspect the working.
The main distance is a decimal approximation with up to 12 significant digits in either mode. The exact result retains a fraction or square root, and midpoint coordinates remain exact fractions. Coincident points return distance 0 and their shared coordinates as the midpoint. Copy includes the displayed precision and working.
Check an exact and decimal distance
Choose 2D and load Signed coordinates, or enter A = (-2, 3) and B = (3, -2).
x difference: (3) − (-2) = 5.
y difference: (-2) − (3) = -5.
x square: (5)² = 25.
y square: (-5)² = 25.
Sum of squares: 25 + 25 = 50.
Exact distance: 5*sqrt(2), meaning 5 × √2 coordinate units. The decimal display is ≈ 7.07106781187. Both describe the same distance; keep the exact form when a problem asks for a radical answer.
Find the midpoint of the segment
Average each pair of matching coordinates. In the plane, M = ((x₁ + x₂)/2, (y₁ + y₂)/2). In space, append (z₁ + z₂)/2. MathWorld: Midpoint defines this point as dividing the segment into equal lengths.
For the worked points, the midpoint is (1/2, 1/2). x midpoint: ((-2) + (3)) / 2 = 1/2. y midpoint: ((3) + (-2)) / 2 = 1/2. Distance is a length; midpoint is a location, so read its coordinates in axis order.
Coordinate scale and calculator limits
Use perpendicular Cartesian axes with the same length scale. The result uses that shared coordinate unit. Convert unlike length units before entering values; this tool has no unit conversion selector. Latitude and longitude are angular coordinates on Earth, so entering them here does not give geographic distance. Driving routes also need a different method.
For finite n-dimensional Euclidean points, square each corresponding coordinate difference, sum over all axes and take the square root. MathWorld: Distance gives the general formula. This form accepts only 2D and 3D points, not arbitrary coordinate lists.
Each coordinate accepts at most 64 integer digits and 64 fractional digits, including leading zeros, within 256 raw characters. Signs and surrounding whitespace count toward the character limit. Fractions, expressions, scientific E notation, Infinity and NaN are unsupported. Excess digits are rejected, not truncated. Entered decimals are treated as exact values; the calculator does not infer measurement uncertainty.
Exact rational arithmetic preserves the coordinate differences, squares and midpoint before a decimal distance is formed. Small nonzero distances use scientific notation rather than displaying zero. Perfect-square distances reduce to exact fractions. Other distances remain exact radicals, but square factors may remain when the rationalized integer radicand exceeds 100000000. This is a simplification resource limit, not a limit on the mathematical identity.
The Slope Calculator finds signed rise over run and the line equation when direction is the question. If you know triangle sides or angles and need missing measurements, the Triangle Calculator solves that geometry instead of taking coordinate pairs.