Points
Point 1
Point 2
Euclidean Distance
Enter two points above

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.

MetricFormulaNotes
Euclidean (2D)d = √((x₂−x₁)²+(y₂−y₁)²)Straight-line, from Pythagorean theorem
Euclidean (3D)d = √(Δx²+Δy²+Δz²)Extended to 3 dimensions
Manhattand = |x₂−x₁|+|y₂−y₁|Sum of absolute differences, "city block"
Chebyshevd = max(|Δx|, |Δy|)Maximum of absolute differences
MidpointM = ((x₁+x₂)/2, (y₁+y₂)/2)Center point of the segment
Slopem = (y₂−y₁)/(x₂−x₁)Direction of line between points

Classic 3-4-5

Points (0,0) and (3,4): d = √(9+16) = √25 = 5. Manhattan = 3+4 = 7. Chebyshev = max(3,4) = 4. Midpoint = (1.5, 2).

Navigation

You walk 30 blocks east and 40 blocks north. Euclidean distance from start = √(30²+40²) = √2500 = 50 blocks. Manhattan (city grid) distance = 70 blocks.

3D Space

Points (1,2,3) and (4,6,3): d = √((4-1)²+(6-2)²+(3-3)²) = √(9+16+0) = √25 = 5. The z components cancel out here.

Screen Pixels

Click at (100,200) and (400,600) on screen. Euclidean pixel distance = √(300²+400²) = √(90000+160000) = √250000 = 500 pixels.

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.

Formula & Methodology

Distance Formula

d = √((x₂−x₁)² + (y₂−y₁)²)

Derived from the Pythagorean theorem applied to the coordinate plane.

Midpoint Formula

M = ((x₁+x₂)/2, (y₁+y₂)/2)

The midpoint is the average of the x-coordinates and the average of the y-coordinates.

3D Distance

d = √(Δx² + Δy² + Δz²)

Extend the formula with a z-component for three-dimensional space.

Distance Metrics Comparison

MetricFormulaUse Case
Euclidean√(Δx²+Δy²)Straight-line distance
Manhattan|Δx|+|Δy|City-block grid distance
Chebyshevmax(|Δx|,|Δy|)Chessboard king moves
Haversine2r·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.