Coordinate geometry
Distance between the points
Pythagoras applied to the horizontal and vertical differences.
Last updated
The Formula
d = sqrt((x2 - x1)^2 + (y2 - y1)^2)
Pythagoras applied to the horizontal and vertical differences.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| d | Distance | units | The length of the segment joining the two points. |
| x2 - x1 | Horizontal change | units | The run between the two points. |
| y2 - y1 | Vertical change | units | The rise between the two points. |
What Each Symbol Means
dunits
Distance
The length of the segment joining the two points.
x2 - x1units
Horizontal change
The run between the two points.
y2 - y1units
Vertical change
The rise between the two points.
See It Worked With Real Numbers
A formula on its own does not tell you which number goes where. The how to calculate a midpoint page applies this equation to a concrete case, shows every intermediate step, and names the mistakes that produce a wrong answer even when the algebra is right.
Where This Formula Appears
This equation is the working core of How To Calculate A Midpoint, filed under Math. Every number the guide produces comes from substituting into this one line.
Common Questions
What is the formula for Distance between the points?
The formula for Distance between the points is d = sqrt((x2 - x1)^2 + (y2 - y1)^2). Pythagoras applied to the horizontal and vertical differences.
What does each symbol in Distance between the points stand for?
d is distance; x2 - x1 is horizontal change; y2 - y1 is vertical change.
What units should I use with Distance between the points?
Substitute d in units, x2 - x1 in units, y2 - y1 in units. Convert every input to those units before you start, because the equation only returns the right answer when the units on both sides agree.
What is a common mistake when using Distance between the points?
Averaging an x with a y. Pair x with x and y with y. Mixing them produces a point that has nothing to do with either endpoint.