Distance Formula Calculator

Calculate the distance between two points (x₁,y₁) and (x₂,y₂) using the distance formula. Also find the midpoint, slope of the line segment, and equation of the line.

∑ Algebra📐 d = √((x₂-x₁)² + (y₂-y₁)²)🔢 Math
Point 1 x₁
Point 1 y₁
Point 2 x₂
Point 2 y₂
Please enter valid values.

Formula & Reference

VariableSymbolFormulaUnits
Distance Formula Calculatord = √((x₂-x₁)² + (y₂-y₁)²)units

Step-by-Step Examples

Example 1
Two Points

(1,2) and (4,6).

  • dx=3, dy=4
  • d=√(9+16)=√25=5
  • Midpoint: (2.5, 4)
  • Slope: 4/3
✓ d = 5
Example 2
Origin to Point

(0,0) to (3,4).

  • d=√(9+16)=5
  • Classic 3-4-5 right triangle
✓ d = 5 (3-4-5 triangle)
Example 3
Negative Coords

(−2,−3) to (4,5).

  • dx=6, dy=8
  • d=√(36+64)=√100=10
✓ d = 10

Real-World Applications

Common Mistakes to Avoid

⚠️
Not squaring before adding

d = √((x2−x1)² + (y2−y1)²). Both differences must be squared before adding under the radical.

⚠️
Negative distance

Distance is always non-negative. If you get a negative value, check your arithmetic — the square root ensures positive results.

⚠️
Confusing distance with displacement

Distance is the magnitude between two points. Displacement is directional. Distance formula gives scalar distance, not direction.

Frequently Asked Questions

What is the distance formula?
Derived from the Pythagorean theorem. The difference in x and y form legs of a right triangle; the distance is the hypotenuse.
How is it related to Pythagorean theorem?
d² = (x₂−x₁)² + (y₂−y₁)² is exactly a² + b² = c², where a=Δx and b=Δy.
What is the midpoint formula?
Midpoint = ((x₁+x₂)/2, (y₁+y₂)/2). The average of the x-coordinates and the average of the y-coordinates.
How do I find distance in 3D?
d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²). Same principle extended to three dimensions.
What is Manhattan distance?
|x₂−x₁| + |y₂−y₁|. Used in city block navigation and some machine learning algorithms (L1 norm vs L2 norm).

Related Math Calculators

Formula Explorer connections

Interpretation: This relationship connects dimensions, coordinates, angles or trigonometric ratios to a geometric measurement. Assumption: Use a consistent angle mode and length unit, identify the intended shape or coordinate system, and verify that the supplied dimensions form valid geometry.

Double Angle Formula Calculator →Heron's Formula Calculator →Inverse Trigonometric Functions Calculator →Math Formula Explorer →