Euclidean Distance Calculator

The Straight Line Between Two Points

Euclidean distance is what most people mean by "distance" without thinking about it — the length of the direct, as-the-crow-flies line connecting two points on a plane. It's the 2D case of the Pythagorean theorem applied directly to coordinate geometry, and it's the default distance metric in nearly every field that works with spatial or vector data.

The Formula

d = √((x2−x1)² + (y2−y1)²)

The horizontal and vertical differences between the two points form the two legs of a right triangle, and the straight-line distance is that triangle's hypotenuse.

Where Euclidean Distance Is Used

  • Machine learning — the default distance metric (L2 norm) for clustering algorithms like k-means and nearest-neighbor classification.
  • Computer graphics and game development — collision detection and object proximity checks.
  • GIS and mapping — direct-line distance between two projected map coordinates.
  • Physics — displacement between two positions in a coordinate system.
Worked example
Point 1Point 2Euclidean Distance
(1, 2)(4, 6)5

How to Use This Calculator

  1. Enter X1 and Y1 for the first point.
  2. Enter X2 and Y2 for the second point.
  3. Select Calculate to see the straight-line distance.

Related Calculations

For grid-restricted distance, see the Manhattan Distance Calculator. Need the point exactly halfway between the two? See the Midpoint Calculator.