Math Tools

Distance Calculator

Calculate the distance between two points in 2D or 3D coordinates. Get distance, deltas, and midpoint instantly.

Point 1

Point 2

Distance

5.00 units

Δx3.00
Δy4.00
Midpoint(1.50, 2.00)
Formulad = √((x₂-x₁)² + (y₂-y₁)²)

What is the Distance Calculator?

Distance between two points is the length of the shortest line connecting them. In 2D, you need x and y coordinates. In 3D, add a z coordinate. The calculator uses the Euclidean distance formula to find the exact distance.

How it works

Select 2D or 3D mode. Enter the x, y (and z if 3D) coordinates for Point 1. Enter the coordinates for Point 2. The calculator instantly computes the distance using the distance formula and displays deltas and midpoint.

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

Euclidean distance finds the straight-line distance between points. Square the difference in each coordinate, sum them, then take the square root. In 3D, include the z-component in the sum.

Examples

InputResultNotes
2D: Point 1 (0, 0), Point 2 (3, 4)5 units√((3−0)² + (4−0)²) = √(9 + 16) = √25 = 5; this is a classic 3-4-5 triangle
2D: Point 1 (1, 2), Point 2 (4, 6)5 units√((4−1)² + (6−2)²) = √(9 + 16) = √25 = 5
3D: Point 1 (0, 0, 0), Point 2 (1, 2, 2)3 units√((1−0)² + (2−0)² + (2−0)²) = √(1 + 4 + 4) = √9 = 3

How to use the Distance Calculator

  1. Open the distance calculator and choose your dimension mode: 2D or 3D
  2. Enter the x and y coordinates for Point 1 (and z if using 3D mode)
  3. Enter the x and y coordinates for Point 2 (and z if using 3D mode)
  4. The calculator displays distance, component deltas (Δx, Δy, Δz), and midpoint
  5. The formula bar shows which equation was applied

Benefits

  • Instant calculations using the Euclidean distance formula
  • Toggle between 2D and 3D modes with one click
  • Shows deltas (component differences) for coordinate analysis
  • Computes midpoint between two points automatically
  • Works with negative, decimal, and whole number coordinates

Tips & common mistakes

Common mistakes

  • Confusing 2D and 3D mode — ensure you select the right dimension for your points
  • Entering radius instead of coordinates — the calculator needs actual point values, not distances
  • Forgetting to negate negative coordinates — a point at (−3, 4) is different from (3, 4)
  • Mixing coordinate order — enter x first, then y (and z for 3D)

Tips

  • The classic 3-4-5 right triangle works: points (0,0) and (3,4) are 5 units apart
  • The midpoint formula is: ((x₁+x₂)/2, (y₁+y₂)/2) — the calculator does this for you
  • Deltas (Δx, Δy, Δz) are useful for navigation and offset calculations
  • The calculator handles decimals; enter 2.5 or −1.75 if your coordinates are fractional

Frequently asked questions

What is the difference between 2D and 3D distance?

2D uses x and y coordinates on a flat plane. 3D adds a z coordinate for depth. The formula is the same principle, just with an extra term in the square root.

Can I use negative coordinates?

Yes. Negative values are treated like positive ones in the distance formula. A point at (−5, 3) is treated as a valid coordinate.

What is the midpoint?

The midpoint is the point exactly halfway between two given points. In 2D, it is ((x₁+x₂)/2, (y₁+y₂)/2).

Does the calculator support decimal coordinates?

Yes. You can enter 1.5, 3.75, or any decimal value. The calculator computes with full precision.

What units does the distance use?

The distance is in the same unit as your coordinates. If your coordinates are in meters, distance is in meters. If in feet, distance is in feet.

Is this the Pythagorean theorem?

Yes, the 2D distance formula is an application of the Pythagorean theorem. The distance is the hypotenuse of a right triangle formed by Δx and Δy.

Related tools

FreeToolz Editorial Team · Last reviewed July 2026

Reviewed for accuracy. Results are estimates for general information and are not professional (medical, financial or legal) advice.