Skip to content
The Calculatorz
Coordinate geometry

Distance Between Two Points Calculator

Calculate straight-line distance, horizontal change, vertical change and midpoint between two Cartesian points.

All coordinates should use the same scale and unit. The result is Euclidean straight-line distance in a flat Cartesian plane.

Coordinates of the two points

Two points

How to use this calculator

Enter x and y for each point. Negative coordinates and decimals are supported. The calculator also reports the signed coordinate changes and midpoint.

Formula

Distance d = √[(x₂ − x₁)² + (y₂ − y₁)²]. Midpoint = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2).

Calculator credits

Calculator developmentJulia Edwards

Editorial supervision

Expert reviewIfrahMSc Mathematics

Published byThe Calculatorz

Last updated

Read how we research, test, review and correct our calculators in our editorial policy.

Frequently asked questions

Can coordinates be negative?

Yes. Cartesian coordinates may be positive, negative or zero.

Is this the same as map distance?

No. Geographic distance on Earth requires latitude, longitude and a spherical or ellipsoidal model.

Can the distance be zero?

Yes, when both entered points have identical coordinates.

Where does the distance formula come from?

It is the Pythagorean theorem: the horizontal and vertical differences between the points form the two legs of a right triangle, and the distance is the hypotenuse.

How do I find distance in three dimensions?

Add the squared z difference: d = √[(x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²].

What is the distance between (1, 2) and (4, 6)?

The horizontal change is 3 and the vertical change is 4, so the distance is √(3² + 4²) = √25 = 5 units. The midpoint is (2.5, 4).

References & methodology sources

These sources support the calculator’s formula, definitions, thresholds, units or result interpretation.

  1. Marecek, L., Anthony-Smith, M., & Honeycutt Mathis, A. (2020). Intermediate algebra 2e. OpenStax. View source
  2. Abramson, J. (2021). College algebra 2e. OpenStax. View source
  3. Abramson, J. (2021). Precalculus 2e. OpenStax. View source
  4. International Organization for Standardization. (2019). ISO 80000-2: Quantities and units—Part 2: Mathematics. View source
  5. Stewart, J., Clegg, D. K., & Watson, S. (2021). Calculus: Early transcendentals (9th ed.). Cengage. View source