Distance Calculator

Calculate distance between points in 2D and 3D coordinate systems. Free, fast, accurate — no signup, mobile-friendly, wo

Distance Type

Point 1 (x₁, y₁)

Point 2 (x₂, y₂)

📐 Formula

√[(x₂-x₁)² + (y₂-y₁)²]

Distance Results

Distance

5.000000

coordinate units

Midpoint

(1.500, 2.000)

Angle

53.13° from positive x-axis

📋 Step-by-Step Solution

1Given points: P₁(0, 0) and P₂(3, 4)
2Δx = x₂ - x₁ = 3 - 0 = 3
3Δy = y₂ - y₁ = 4 - 0 = 4
4Distance = √[(Δx)² + (Δy)²]
5Distance = √[3² + 4²] = √[9 + 16] = √25 = 5.000000

How it works

A distance calculator finds the straight-line distance between two points on a plane using the Pythagorean theorem applied to their coordinate differences. For travel, the related relationship distance = speed × time applies.

Distance between two points

d = √[ (x₂ − x₁)² + (y₂ − y₁)² ]
(x₁, y₁)
first point
(x₂, y₂)
second point

Worked example

  • Point A (1, 2)
  • Point B (4, 6)
  1. Δx = 3, Δy = 4
  2. d = √(3² + 4²) = √25

Distance = 5 units.

Good to know

  • It's the Pythagorean theorem with the coordinate differences as the legs.
  • For points on Earth, the great-circle (haversine) distance accounts for curvature.
  • For travel time, rearrange distance = speed × time.

Can't find the exact calculator you need?

Describe it in one sentence — get a working, math-verified calculator in seconds. Free, no signup.

Build your own calculator

Related Calculators

Frequently Asked Questions

How do I calculate the distance between two points?

Use the distance formula, which comes from the Pythagorean theorem: d = √((x₂−x₁)² + (y₂−y₁)²). The horizontal and vertical separations form the legs of a right triangle, and the distance is the hypotenuse.

How does the formula extend to 3D?

Add the third coordinate inside the square root: d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²). The same pattern continues to any number of dimensions, which is how distance is computed in physics and machine learning alike.

Can I use this for locations on Earth?

Not directly — latitude and longitude lie on a sphere, so straight-line coordinate math understates real separation. Great-circle distance via the haversine formula is the standard for geographic points; the planar formula is only acceptable over very short distances.

What units does the result use?

Whatever units the coordinates are in: meters in, meters out. Just ensure both axes use the same unit — mixing feet on one axis with meters on the other produces a meaningless result.