# Distance Between Two Points Calculator

URL: https://hifreetools.com/calculators/distance-between-points-calculator

> Compute the straight-line distance and the midpoint between any two points in the coordinate plane, with the full distance-formula arithmetic shown for each result.

## Quick answer

The distance between two points is d = √((x2−x1)² + (y2−y1)²), the length of the straight line joining them. For the points (0,0) and (3,4): d = √(3² + 4²) = √(9 + 16) = √25 = 5, and the midpoint is ((0+3)/2, (0+4)/2) = (1.5, 2).

## Formula

- Distance (Euclidean): d = √((x₂ − x₁)² + (y₂ − y₁)²)
- Midpoint: M = ((x₁ + x₂) / 2, (y₁ + y₂) / 2)

## Examples

- Classic 3-4-5 right triangle: (x₁,y₁) = (0,0), (x₂,y₂) = (3,4) → d = 5, midpoint = (1.5, 2)
- Two arbitrary points: (x₁,y₁) = (1,2), (x₂,y₂) = (4,6) → d = 5, midpoint = (2.5, 4)
- Points in different quadrants (negatives): (x₁,y₁) = (−2,−3), (x₂,y₂) = (4,5) → d = 10, midpoint = (1, 1)
- Vertical segment (same x): (x₁,y₁) = (2,3), (x₂,y₂) = (2,9) → d = 6, midpoint = (2, 6)

## FAQ

**What is the distance formula?**
It is d = √((x₂ − x₁)² + (y₂ − y₁)²). It gives the straight-line distance between two points in the plane and comes directly from the Pythagorean theorem, treating the horizontal and vertical gaps as the two legs of a right triangle.

**Does the order of the two points matter?**
No. Because the differences are squared, (x₂ − x₁)² equals (x₁ − x₂)², so swapping which point is first gives the same distance. The midpoint is also unaffected, since addition is commutative.

**How do I find the midpoint between two points?**
Average the x-coordinates and average the y-coordinates: M = ((x₁ + x₂)/2, (y₁ + y₂)/2). For (0,0) and (3,4) the midpoint is (1.5, 2). The midpoint always lies exactly halfway along the segment.

**Can I use negative coordinates?**
Yes. Just substitute the signed values and be careful with subtraction: 4 − (−2) = 6. The formula works in every quadrant, and the resulting distance is always zero or positive.

**Why is the distance formula the same as the Pythagorean theorem?**
Draw a right triangle whose horizontal leg is |x₂ − x₁| and whose vertical leg is |y₂ − y₁|. The segment between the points is the hypotenuse, so by a² + b² = c² the distance is √((x₂−x₁)² + (y₂−y₁)²).

**Does this work for 3-D points or latitude/longitude?**
This calculator is for 2-D Cartesian points. For 3-D you add a (z₂ − z₁)² term inside the square root. Latitude/longitude needs the great-circle (haversine) formula because the Earth is curved, not flat.


## Sources

- [Wikipedia — Distance (Euclidean distance)](https://en.wikipedia.org/wiki/Euclidean_distance)
- [Wikipedia — Midpoint](https://en.wikipedia.org/wiki/Midpoint)
- [Wikipedia — Pythagorean theorem](https://en.wikipedia.org/wiki/Pythagorean_theorem)

Runs in the browser; nothing is uploaded. Cite as: HIFreeTools, "Distance Between Two Points Calculator", https://hifreetools.com/calculators/distance-between-points-calculator
