keencalculator
  1. Home
  2. Geometry
  3. Distance Formula Calculator

Distance Formula Calculator

Find the straight-line distance between two points on a coordinate plane or in 3D space. The answer is given as a decimal and, when the coordinates are whole numbers, in simplest radical form such as 2√13.

Quick examples
Your numbers stay in your browser. Nothing is uploaded.
Distance5
Exact form
5
Δx
3
Δy
4
Δz
—

Saved setups

Save a set of inputs you reuse — your usual rate, your loan, your room sizes — and load it back in one tap.

    Your recent calculations

    Results you calculate here are kept on this device so you can come back to them.

      Formula

      2D: d = √((x₂ − x₁)² + (y₂ − y₁)²)
      3D: d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²)

      How to use it

      1. Choose 2D or 3D.
      2. Enter the coordinates of both points.
      3. Read the distance. The Δ values show how far apart the points are along each axis.

      Worked examples

      From (1, 2) to (4, 6): √(3² + 4²)

      Distance
      5
      Exact form
      5
      Δx
      3
      Δy
      4

      From (−2, 3) to (4, −1): √(36 + 16) = √52

      Distance
      7.2111
      Exact form
      2√13
      Δx
      6
      Δy
      -4

      In 3D from (1, 2, 3) to (4, 6, 15): √(9 + 16 + 144)

      Distance
      13
      Exact form
      13
      Δz
      12

      It is the Pythagorean theorem

      The horizontal and vertical gaps between the points are the legs of a right triangle, and the distance is its hypotenuse. From (1, 2) to (4, 6) the gaps are 3 and 4, so the distance is 5.

      Reading the exact form

      When the sum under the square root is not a perfect square, the exact answer is left as a radical with any square factors pulled out: √52 = √(4 × 13) = 2√13 ≈ 7.2111.

      Questions people ask

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

      √(3² + 4²) = √25 = 5.

      Does the order of the points matter?

      No. The differences are squared, so any negative sign disappears.

      What is the distance from (1, 2, 3) to (4, 6, 15)?

      √(3² + 4² + 12²) = √169 = 13.

      Related calculators