Distance between two points: the Pythagorean formula off the page
The straight-line distance between two points on a flat plane is the same triangle you learned in school, just relabelled. The gap in x and the gap in y are the two legs of a right triangle; the distance you want is its hypotenuse.
The method
For points (x₁, y₁) and (x₂, y₂): distance = √((x₂ − x₁)² + (y₂ − y₁)²). Subtract the x's, subtract the y's, square both, add, take the square root. That's the whole formula — it's the Pythagorean theorem, with "distance" standing in for "hypotenuse."
A real example: (0, 0) to (3, 4)
- x-gap:
3 − 0 = 3. y-gap:4 − 0 = 4. - Square and add:
3² + 4² = 9 + 16 = 25. - Square root:
√25 = 5.
The distance is 5 — the 3-4-5 right triangle, the same one that shows up everywhere once you know to look for it.
A real example: (1, 2) to (4, 6)
x-gap 4 − 1 = 3, y-gap 6 − 2 = 4. Same legs as before, just shifted off the origin — √(3² + 4²) = √25 = 5. The distance formula only cares about the gaps between the points, not where they sit on the page; sliding both points the same amount changes neither gap.
A real example: negative coordinates — (−2, −3) to (4, 5)
x-gap: 4 − (−2) = 6. y-gap: 5 − (−3) = 8. Squaring erases the signs regardless: √(6² + 8²) = √(36 + 64) = √100 = 10. Negative coordinates cost nothing extra — subtracting a negative just flips to addition, and squaring makes the sign irrelevant either way.
The midpoint comes almost free
While you have both points, the midpoint is worth having too: average the x's and average the y's. For (0, 0) and (3, 4): midpoint = ((0+3)/2, (0+4)/2) = (1.5, 2). No square roots involved — it's a separate, simpler calculation that happens to use the same two points, useful for centring a label between two markers on a map or a chart.
Where this shows up
Anywhere positions are given as coordinates: figuring the length of a diagonal brace between two known points on a plan, the pixel distance between two elements on a screen, or the straight-line ("as the crow flies") distance between two map references before you convert those to real-world units. It's also exactly the formula behind how far apart two data points are on a scatter chart.
What this doesn't cover
This is straight-line distance on a flat plane, not travel distance. A road route, a hiking trail, or a flight path is longer than the straight line between its endpoints — often much longer. And on a large enough area (a country, a continent) "flat plane" itself stops being a good approximation, because the surface curves; genuine long-range geographic distance needs a formula that accounts for the Earth's curvature, not this one.
Run your own numbers
The free Distance Between Points calculator works out the distance and the midpoint together from any two coordinates, entirely on your device.