Beginner

Distance Calculator — Between Two Points (2D)

Enter the coordinates of two points to get the Euclidean straight-line distance, Manhattan (taxicab) distance, midpoint, and the angle of the connecting line segment.
Euclidean distance
5

Straight-line distance between the two points — d = √(Δx² + Δy²)

Δx (x₂ − x₁)
3
Δy (y₂ − y₁)
4
Midpoint
(1.5, 2)
Manhattan (taxicab) distance
7
Angle of line
53.13 °
Step by step
  1. 1

    Horizontal difference Δx = x₂ − x₁

    3 − 0 = 3
  2. 2

    Vertical difference Δy = y₂ − y₁

    4 − 0 = 4
  3. 3

    Sum of squares Δx² + Δy²

    3² + 4² = 25
  4. 4

    Euclidean distance = √(Δx² + Δy²)

    √(25) = 5
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Euclidean distance = √((x₂−x₁)² + (y₂−y₁)²) — the straight-line gap from Pythagoras. Manhattan distance = |x₂−x₁| + |y₂−y₁| — grid-travel distance. Midpoint = ((x₁+x₂)/2, (y₁+y₂)/2). Default example: points (0,0) and (3,4) give Euclidean distance 5 (the classic 3-4-5 right triangle). Works for any real coordinates in consistent units.

Formula
d = √((x₂ − x₁)² + (y₂ − y₁)²) • Manhattan = |x₂ − x₁| + |y₂ − y₁|
How this is calculated

The Euclidean distance formula comes directly from the Pythagorean theorem applied to a right triangle formed by the horizontal and vertical separations Δx = x₂ − x₁ and Δy = y₂ − y₁. Taking the hypotenuse of that triangle gives d = √(Δx² + Δy²). The formula works for any pair of real-number coordinates and returns a non-negative result; d = 0 only when both points are identical.

The Manhattan (taxicab) distance |Δx| + |Δy| counts the total travel along axis-aligned steps, mimicking how a taxi must navigate a city grid where diagonal movement is not allowed. It is always greater than or equal to the Euclidean distance (equality only when one of Δx or Δy is zero, i.e. the points share a row or column).

The midpoint is the arithmetic mean of the coordinates: ((x₁+x₂)/2, (y₁+y₂)/2). The angle is the direction of the line segment from point 1 to point 2, measured in degrees counter-clockwise from the positive x-axis, computed with atan2(Δy, Δx). All four results are purely geometric and make no assumptions about units — they work whether coordinates are in metres, pixels, latitude-longitude degrees, or any other consistent unit.

Frequently asked questions

d = √((x₂ − x₁)² + (y₂ − y₁)²). It is the Pythagorean theorem applied to the horizontal and vertical gaps between two points. For three dimensions, add a third term: √(Δx² + Δy² + Δz²).

Euclidean distance is the straight-line (as-the-crow-flies) distance — the shortest possible path. Manhattan distance is the sum of the absolute differences in each coordinate, representing travel along a rectangular grid without diagonal moves. Euclidean ≤ Manhattan always.

For small distances, treating latitude and longitude as flat Cartesian coordinates gives a rough approximation, but for accuracy you need the haversine formula, which accounts for the curvature of the Earth. At the equator, 1° ≈ 111 km; the formula is only valid for flat (locally planar) geometry.

Also known as

distance between two points calculator
euclidean distance formula
coordinate distance calculator
distance formula xy calculator
manhattan taxicab distance
two point distance formula
straight line distance calculator

APA

TG we-Calculate Editorial Team. (2026). Distance Calculator — Between Two Points (2D) [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/distance-calculator

Chicago

TG we-Calculate Editorial Team. "Distance Calculator — Between Two Points (2D)." TG we-Calculate. 2026. https://we-calculate.com/calculator/distance-calculator.

IEEE

TG we-Calculate Editorial Team, "Distance Calculator — Between Two Points (2D)," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/distance-calculator

BibTeX

@misc{wecalculate_distance_calculator, title = {Distance Calculator — Between Two Points (2D)}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/distance-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?