math5 min read•Updated 2026-10-09•By celculator Team

Distance Formula Guide: 2D, 3D & Coordinate Planes

Distance formula d = √((x₂−x₁)² + (y₂−y₁)²). Complete guide with 2D coordinates, 3D vectors, midpoint formula, and worked examples for every case.

Distance formula diagram showing two points on coordinate plane with formula

Distance Formula — Direct Answer

The distance formula is d = √((x₂−x₁)² + (y₂−y₁)²). It finds the straight-line distance between two points on a coordinate plane. For points (3, 4) and (7, 8): d = √(16 + 16) = 5.66 units. The formula derives from the Pythagorean theorem.

→ Calculate distance between points with our free calculator

How to Use the Distance Formula

The formula is a rearranged Pythagorean theorem applied to coordinate deltas.

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

Where:

  • (x₁, y₁) = first point
  • (x₂, y₂) = second point
  • d = distance between them

How to identify the coordinates

Every coordinate pair follows the format (x, y). The x is horizontal, y is vertical.

Example: Point A = (2, 3), Point B = (8, 11)

How to calculate delta x and delta y

Δx = x₂ − x₁
Δy = y₂ − y₁

Example: (2, 3) to (8, 11):

  • Δx = 8 − 2 = 6
  • Δy = 11 − 3 = 8

How to apply the formula

Example: (2, 3) to (8, 11)

  • Δx = 6, Δx² = 36
  • Δy = 8, Δy² = 64
  • Sum = 100
  • d = √100 = 10 units

Example: (0, 0) to (3, 4)

  • Δx = 3, Δx² = 9
  • Δy = 4, Δy² = 16
  • Sum = 25
  • d = √25 = 5 units (classic 3-4-5 triangle)

Distance Formula Chart by Point Coordinates

Point 1 Point 2 Δx Δy Distance
(0, 0) (3, 4) 3 4 5.00
(0, 0) (6, 8) 6 8 10.00
(0, 0) (5, 12) 5 12 13.00
(1, 2) (4, 6) 3 4 5.00
(2, 3) (8, 11) 6 8 10.00
(1, 1) (10, 10) 9 9 12.73
(−2, 3) (4, −5) 6 −8 10.00
(0, 0) (1, 1) 1 1 1.41

3D distance examples

Point 1 Point 2 Distance
(0, 0, 0) (2, 3, 6) 7.00
(1, 2, 3) (4, 6, 3) 5.00
(0, 0, 0) (1, 1, 1) 1.73

Distance Formula Applications

Construction layout

Distance between two stakes on a plot:

  • Stake A at (0, 0)
  • Stake B at (30, 40)
  • Distance = √(900 + 1,600) = 50 ft

GPS coordinates (approximate)

For small distances, convert latitude/longitude to feet and use the formula. For large distances, use the Haversine formula.

Video game graphics

Every 3D game engine uses the distance formula to detect collisions.

Physics vectors

Force magnitude, velocity, and displacement all use this formula.

Common Distance Formula Mistakes

Mistake 1: Wrong sign on negative coordinates

(−3)² = 9, not −9. Squaring always produces positive values.

Fix: Square the delta, not the raw coordinate. Always positive.

Mistake 2: Forgetting the square root

Many people calculate Δx² + Δy² and stop. The answer is the square root.

Fix: Final step is √. Without it, you have d², not d.

Mistake 3: Using the slope formula instead

Slope is (y₂−y₁)/(x₂−x₁) — a ratio, not a distance.

Fix: Slope gives steepness. Distance formula gives length.

Distance vs Midpoint vs Slope

Distance formula

  • Formula: d = √((x₂−x₁)² + (y₂−y₁)²)
  • Returns: Length between points
  • Unit: Same as coordinates

Midpoint formula

  • Formula: ((x₁+x₂)/2, (y₁+y₂)/2)
  • Returns: Center point
  • Use: Finding middle

Slope formula

  • Formula: m = (y₂−y₁)/(x₂−x₁)
  • Returns: Steepness
  • Use: Line direction

Distance Formula FAQ

What is the distance formula?

d = √((x₂−x₁)² + (y₂−y₁)²). It calculates the straight-line distance between two points on a coordinate plane.

How do you find the distance between two points?

Subtract the x-values, square; subtract the y-values, square; add both; take the square root.

What is the distance between (0, 0) and (3, 4)?

5 units. √(9 + 16) = √25 = 5.

Is the distance formula the same as the Pythagorean theorem?

Yes. The distance formula is the Pythagorean theorem applied to coordinate deltas.

What is the 3D distance formula?

d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²). Add the z-axis delta squared to the 2D formula.

Next Steps for Coordinate Math


Last updated October 2026. Works in any unit — just keep coordinates consistent.

Recommended Calculators for this Guide

→ coordinate distance Calculator→ triangle calculator Calculator→ math calculator Calculator

Related Engineering Field Manuals

View all 60 guides →
5 min read

Pythagorean Theorem in Construction: 3-4-5 Rule

Use the Pythagorean theorem for perfect square corners. The 3-4-5 rule squares any layout without a calculator. Full construction applications guide.

Read Manual
4 min read

Slope Calculator Guide: Rise Over Run & y = mx + b

Calculate slope with m = (y₂ − y₁) ÷ (x₂ − x₁). Full guide with rise over run, slope-intercept form y = mx + b, and grade percentage applications.

Read Manual
6 min read

Area of a Circle Formula: Radius, Diameter & Steps

Area of a circle = π × r². Full guide with radius, diameter, circumference conversions, sector formulas, and 5 worked examples for real construction.

Read Manual
Back to All 60 Field Manuals