Distance Formula Derivation
The distance formula comes directly from the Pythagorean theorem. Given two points (x₁, y₁) and (x₂, y₂), the horizontal distance is Δx = x₂−x₁ and vertical distance is Δy = y₂−y₁. These form the legs of a right triangle, with the hypotenuse being the straight-line distance.
| Metric | Formula | Notes |
| Euclidean (2D) | d = √((x₂−x₁)²+(y₂−y₁)²) | Straight-line, from Pythagorean theorem |
| Euclidean (3D) | d = √(Δx²+Δy²+Δz²) | Extended to 3 dimensions |
| Manhattan | d = |x₂−x₁|+|y₂−y₁| | Sum of absolute differences, "city block" |
| Chebyshev | d = max(|Δx|, |Δy|) | Maximum of absolute differences |
| Midpoint | M = ((x₁+x₂)/2, (y₁+y₂)/2) | Center point of the segment |
| Slope | m = (y₂−y₁)/(x₂−x₁) | Direction of line between points |
How to Use This Calculator
1
Enter Point 1 Coordinates
Type the x and y values for the first point (x₁, y₁).
2
Enter Point 2 Coordinates
Type the x and y values for the second point (x₂, y₂).
3
View Distance and Midpoint
The Euclidean distance and midpoint coordinates are calculated and shown with steps.
Distance Metrics Comparison
| Metric | Formula | Use Case |
| Euclidean | √(Δx²+Δy²) | Straight-line distance |
| Manhattan | |Δx|+|Δy| | City-block grid distance |
| Chebyshev | max(|Δx|,|Δy|) | Chessboard king moves |
| Haversine | 2r·arcsin(…) | Great-circle distance on a sphere |
Key Terms
- Euclidean Distance
- The straight-line distance between two points in a plane, derived from the Pythagorean theorem.
- Midpoint
- The point exactly halfway between two given points.
- Coordinate Plane
- A two-dimensional plane defined by a horizontal x-axis and a vertical y-axis.
- Delta (Δ)
- The change or difference between two values, such as Δx = x₂ − x₁.
- Origin
- The point (0, 0) where the x-axis and y-axis intersect.
Real-World Examples
Example 1
Map Grid Distance
(2, 3) to (8, 11)
d = 10 units — using √(36 + 64)
Example 2
Diagonal of a Rectangle
(0, 0) to (5, 12)
d = 13 units — a 5-12-13 Pythagorean triple
Distance Calculations in Mathematics and Beyond
From Pythagoras to GPS
The distance formula is a direct application of the Pythagorean theorem to coordinate geometry. In two dimensions, the horizontal and vertical differences between two points form the legs of a right triangle, and the hypotenuse is the straight-line distance. GPS systems extend this concept to three-dimensional ellipsoidal coordinates to pinpoint locations on Earth.
Choosing the Right Distance Metric
Euclidean distance works for straight-line problems, but real-world applications often require alternatives. Manhattan distance models city-block travel where you can only move along grid lines. The Haversine formula accounts for Earth's curvature when calculating distances between cities. Choosing the correct metric is critical in navigation, machine learning clustering, and logistics optimization.