Distance Between Two Points Calculator
Enter x₁, y₁, x₂, y₂ to find distance. Distance = hypot(x₂-x₁,y₂-y₁).
How the result changes
Only x₁ changes; all other inputs stay at your current values. The line illustrates the formula across the shown range. This is not a forecast of real-world outcomes.
About this calculation
Coordinate distance is the straight-line separation between two points on compatible perpendicular axes. Use this distance between two points calculator to find distance from x₁, y₁, x₂, y₂.
Formula
Distance = hypot(x₂-x₁,y₂-y₁)
Worked example
With x₁: 1, y₁: 2, x₂: 4, y₂: 6, distance is 5.
How to calculate distance
The rule is Distance = hypot(x₂-x₁,y₂-y₁).
The horizontal and vertical coordinate differences form the legs of a right triangle. The distance is their Pythagorean hypotenuse.
In the distance between two points example, x₁ 1 produces distance 5. Entering 2 instead produces 4.472136.
Reading distance
The result is a nonnegative length, not a signed horizontal or vertical displacement. With x₁ 1, y₁ 2, x₂ 4, y₂ 6, the calculator returns distance 5.
Practical use
Measure a direct span between map or drawing coordinates rather than a route constrained to grid lines. Measure straight-line separation between coordinate points rather than the path along the axes.
Limits and common mistakes
The axes must share a meaningful unit scale for the Pythagorean length to represent physical distance. Verify x₁ before interpreting distance.
Why the relationship works
Horizontal and vertical separations form perpendicular legs of a right triangle. Combining their squares and taking the nonnegative root gives the direct endpoint distance. The distance between two points rule uses x₁, y₁, x₂, y₂ in Distance = hypot(x₂-x₁,y₂-y₁); read each symbol as the field named on this page.
Interpreting another set of values
The entered x₁, y₁, x₂, y₂ locate two endpoints on perpendicular axes. The rule Distance = hypot(x₂-x₁,y₂-y₁) returns distance for the direct straight path, not a route that follows grid lines.
For a second distance between two points check, keep the other default inputs fixed and change x₁ from 1 to 3. Distance changes from 5 to 4.123106. The changed coordinate alters one perpendicular leg, and the direct length follows from both legs together.
Checks and limits
The distance cannot be negative and is unchanged when endpoints are exchanged. It must be at least as large as either individual axis separation. The worked 5 is a nonnegative length if both axes share a distance unit. Axis coordinate signs do not make the distance negative.
Inputs
- x₁
- y₁
- x₂
- y₂