Start typing to discover tools…
Coordinate Geometry Tool

Distance Formula Calculator

Calculate the straight-line distance between two coordinate points. Choose 2D or 3D mode, enter your coordinates, and view the formula, substitution, and final result instantly.

Enter Point Coordinates

Negative values and decimal coordinates are supported.

A First Point
B Second Point
Please enter a valid number in every required coordinate field.
Calculation Result
Distance Between Points
5
Formula used d = √[(x₂ − x₁)² + (y₂ − y₁)²]
Substitution d = √[(4 − 1)² + (6 − 2)²]
Simplified calculation d = √(9 + 16) = √25
The result represents the shortest straight-line distance between the two entered points.

What Is a Distance Formula Calculator?

A Distance Formula Calculator finds the straight-line distance between two points using their coordinates. It is commonly used in coordinate geometry, mathematics, engineering, computer graphics, mapping, physics, and data analysis.

Instead of manually subtracting coordinates, squaring the differences, adding them, and finding the square root, this calculator performs every step automatically and displays the complete calculation.

Distance Formula for Two-Dimensional Points

For two points A(x₁, y₁) and B(x₂, y₂), the 2D distance formula is:

2D Distance Formula
d = √[(x₂ − x₁)² + (y₂ − y₁)²]

This formula is based on the Pythagorean theorem. The horizontal coordinate difference and vertical coordinate difference form two sides of a right triangle. The distance between the points is its hypotenuse.

Distance Formula for Three-Dimensional Points

For points A(x₁, y₁, z₁) and B(x₂, y₂, z₂), use the following formula:

3D Distance Formula
d = √[(x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²]

How to Use the Distance Formula Calculator

1

Select a Mode

Choose 2D for x and y coordinates or 3D when a z-coordinate is also required.

2

Enter Point A

Add the coordinates of your first point in the Point A input fields.

3

Enter Point B

Add the coordinates of the second point. Decimals and negative numbers are accepted.

4

Calculate

Click the calculate button to view the distance, formula, and calculation steps.

Distance Formula Example

Find the distance between A(1, 2) and B(4, 6)

Substitute the coordinates into the two-dimensional distance formula:

d = √[(4 − 1)² + (6 − 2)²]
d = √[3² + 4²]
d = √[9 + 16]
d = √25
d = 5 units

Where Is the Distance Formula Used?

  • Finding the length of a line segment on a coordinate plane.
  • Measuring movement between locations in games and applications.
  • Calculating distances in computer graphics and animation.
  • Analyzing spatial information in maps and geographic systems.
  • Solving coordinate geometry and mathematics problems.
  • Measuring displacement in physics and engineering calculations.

Frequently Asked Questions

It calculates the shortest straight-line distance between two coordinate points in a two-dimensional or three-dimensional space.

Yes. The calculator supports positive numbers, negative numbers, zero, and decimal coordinate values.

A 2D point uses x and y coordinates. A 3D point includes an additional z-coordinate to represent depth or height.

Coordinate differences are squared before being added. Squared values are non-negative, so the final square root cannot produce a negative distance.

When both points have the same coordinates, every coordinate difference is zero. Therefore, the distance between them is zero.

Yes. In two dimensions, the differences between the x and y coordinates form the legs of a right triangle. The distance is the triangle's hypotenuse.