Coordinate Distance Calculator
Enter two Cartesian points to find their distance, midpoint, coordinate changes and direction. Choose a shared input unit and compare output lengths.
YOUR CALCULATION
Result
—
Calculation steps
Work through one step at a time or reveal the complete calculation. The steps use your current inputs.
How to calculate
Subtract A from B to get the horizontal and vertical changes. Apply the Pythagorean theorem to those changes. Average each coordinate for the midpoint and use atan2 for direction from positive x.
d=√[(x₂−x₁)²+(y₂−y₁)²]; midpoint=((x₁+x₂)/2,(y₁+y₂)/2); direction=atan2(Δy,Δx)
Worked example
A=(1,2) m and B=(4,6) m give Δx=3 m, Δy=4 m and distance 5 m. Their midpoint is (2.5,4) m. The direction from positive x is about 53.1301024°.
Assumptions and input details
These are planar Cartesian coordinates in one shared length unit, not latitude/longitude, a map projection or geographic bearings. Negative coordinates are valid. Direction is counterclockwise from +x, approximately −180° to +180°; it is undefined for identical points. A vertical segment has undefined slope. The diagram uses equal horizontal and vertical scales and includes the origin.
Unit definitions
Unit selection is independent of language. Each selector contains only units for its physical quantity. Calculations use defined base units internally.
Choose from 23 length definitions, including explicitly labelled regional measures. Area conversions square the length factor; geometric volumes cube it.
Regional measures are not interchangeable merely because their names look similar. This is a documented selection, not a claim to include every historical unit.
NIST measurement tables · Japanese traditional units · Mainland China and Hong Kong unit distinctions
Using this calculator
Can I enter my own problem?
Yes. Replace the example values with your own inputs. The result, calculation steps, tables and applicable diagrams update from those inputs. Blank or invalid values clear the result; example values are never silently substituted for missing inputs.
Are the results exact?
Results use floating-point arithmetic and displayed rounding. Read the formula, assumptions and any stated data precision before interpreting the result.
Is my input uploaded?
The calculation runs in your browser. No account, file upload or external AI service is required. Inputs are not saved between page reloads.
Find the diagonal of a right triangle or rectangle. Mix length units and compare 21 unit conversions with a triangle diagram.
Find percent grade and angle from rise and horizontal run, or solve a missing rise or run. Mix length units and inspect a labelled elevation diagram.
Enter two three-component vectors to calculate their sum, difference, dot product, cross product, magnitudes and angle, with an XY-projection diagram.
Reserved advertising space.