Skip to content
Toolcroft

Distance Formula Calculator - 2D and 3D Distance Between Two Points

Math Calculators

Calculate the distance between two points in 2D or 3D space using the distance formula. Shows the substituted formula with step-by-step work.

Point 1

Point 2

Distance

5

Δx
3
Δy
4
Midpoint
(1.5, 2)
Formula: d = √(3² + 4²) = √25 ≈ 5

How to use this tool

  1. Choose 2D or 3D. Select whether you want to calculate distance in a 2D plane or 3D space.
  2. Enter the coordinates. Type the x, y (and z) coordinates for both points.
  3. Read the result. The distance, formula, midpoint, and component differences are shown instantly.

Distance formula in 2D

The distance between two points (x₁, y₁) and (x₂, y₂) in a plane is: d = √((x₂ − x₁)² + (y₂ − y₁)²). This is the Pythagorean theorem applied to the horizontal and vertical differences.

Distance formula in 3D

In three-dimensional space, add the z-axis difference: d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²). This extends naturally from the 2D formula.

Midpoint formula

The midpoint between two points is the average of their coordinates: M = ((x₁+x₂)/2, (y₁+y₂)/2) in 2D, with (z₁+z₂)/2 added in 3D.

Frequently asked questions

What is the distance formula?

The 2D distance formula is d = √((x₂−x₁)² + (y₂−y₁)²), derived from the Pythagorean theorem. The 3D version adds a third term: d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²).

What is Euclidean distance?

Euclidean distance is the straight-line (shortest) distance between two points. It is what this calculator computes.

How do I find the midpoint?

The midpoint in 2D is ((x₁+x₂)/2, (y₁+y₂)/2). In 3D, add (z₁+z₂)/2 for the z coordinate.

Browse all math calculators