Distance Calculator

Enter two coordinate points to compute Euclidean distance, midpoint and slope in 2D or 3D — or switch to Speed-Distance-Time mode to solve for any one of the three variables.

How to use this calculator

  1. For coordinate distance: enter x₁, y₁, x₂, y₂ and get the Euclidean distance, midpoint, and slope.
  2. For 3D distance: switch to '3D Coordinates' and add z₁, z₂.
  3. For Speed-Distance-Time: select which variable to solve for and enter the other two.

Formula & method

Euclidean Distance & Speed-Distance-Time Formulas

d = √((x₂−x₁)² + (y₂−y₁)²) · Midpoint = ((x₁+x₂)/2, (y₁+y₂)/2) · Speed = Distance / Time

In 3D, add (z₂-z₁)² under the square root. Speed × Time = Distance.

Example

Points (0, 0) and (3, 4): d = √(9 + 16) = 5. Midpoint = (1.5, 2). Slope = 4/3 ≈ 1.33.

Key insights

How to interpret your result

Slope

Slope m = Δy / Δx gives the rate of rise per unit of horizontal run. A slope of 0 is horizontal; an undefined slope is vertical.

Midpoint

The midpoint divides the segment exactly in half — useful for bisecting lines in geometry and finding centre coordinates in mapping.

Frequently asked questions

What is Euclidean distance?
The straight-line distance between two points, computed using the Pythagorean theorem. In 2D: d = √((Δx)² + (Δy)²).
How do I calculate distance from speed and time?
Distance = Speed × Time. Ensure consistent units (e.g. km/h × hours = km).
What is the midpoint formula?
Midpoint = ((x₁+x₂)/2, (y₁+y₂)/2). It gives the coordinates of the point exactly halfway between two points.

Related calculators

See all math calculators · Explore all online calculators