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
Distance Between Two Points: find distance from x₁, y₁, x₂, y₂. Coordinate and algebra tools translate a mathematical relationship into a specific number, such as a root, midpoint, distance, or slope.
Formula
Distance = hypot(x₂-x₁,y₂-y₁)
Worked example
With x₁: 1, y₁: 2, x₂: 4, y₂: 6, distance is 5.
Calculation method
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.
For this distance between two points example, changing x₁ from 1 to 2 while keeping the other inputs fixed changes distance from 5 to 4.472136.
Reading distance
A coordinate result inherits the same coordinate system as its inputs. A slope describes change in y per unit change in x, including its sign. In the worked values on this page, x₁ 1, y₁ 2, x₂ 4, y₂ 6 produce distance 5.
Practical use
Use these calculations in graphing, geometry, interpolation, or checking an algebraic solution. The specific task here is to find distance from x₁, y₁, x₂, y₂.
Limits and common mistakes
Some expressions have restricted domains: a real square root requires a nonnegative radicand, and division by zero is undefined. Verify x₁ before interpreting distance; a value measured on another basis would answer a different question.
Why the relationship works
Coordinate results are tied to the chosen axes. Midpoints average corresponding coordinates; distance combines horizontal and vertical separation; slope compares vertical change with horizontal change; an intercept locates where a line crosses an axis. Reversing both endpoints leaves distance and slope unchanged, although reversing only one difference changes the sign. 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
For distance between two points, the fields labeled x₁, y₁, x₂, y₂ are the known quantities. The calculator solves for distance using Distance = hypot(x₂-x₁,y₂-y₁). Interpret the answer in the context of the entered equation or coordinate system. A root, signed slope, intercept, distance, and remainder have different meanings and different valid domains. When comparing two calculations, keep their units and input definitions identical.
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. This is a comparison of two particular cases. Repeat it near the values relevant to your task; do not assume that every formula changes at a constant rate.
Checks and limits
Keep all coordinates in the same coordinate system and unit scale. A vertical line has undefined slope because its horizontal change is zero. A midpoint belongs between the corresponding endpoint coordinates; a distance cannot be negative. The reported distance is 5 in the worked example. Keep its stated unit or counting convention when checking it against another calculation.
Inputs
- x₁
- y₁
- x₂
- y₂