Distance Calculator (Two Points)
Find the straight-line distance between two points in a plane or in space. Enter the coordinates and the calculator applies the distance formula, gives the exact simplified radical form, and adds the midpoint, slope and angle of the line. Example: the distance from (1, 2) to (7, 10) is √(36 + 64) = √100 = 10.
Show steps
How to use the Distance Calculator (Two Points)
- Choose 2D for points on a plane or 3D for points in space.
- Enter the coordinates of both points. Negative numbers and decimals are fine.
- Press Calculate to see the distance, its exact radical form, the midpoint and, in 2D, the slope, angle and line equation.
- Open Show steps to see each difference and the square root.
Formula and method
2D: d = √((x₂ − x₁)² + (y₂ − y₁)²)
3D: d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²)
This is the Pythagorean theorem applied to the horizontal and vertical changes between the points.
Example: (1, 2) and (7, 10). Δx = 6, Δy = 8, so d = √(36 + 64) = √100 = 10. Another: (0, 0, 0) to (1, 2, 2) gives √(1 + 4 + 4) = 3.
How the distance formula works
Draw a right triangle with the segment between the points as the hypotenuse. The legs are the horizontal and vertical differences. The Pythagorean theorem then gives the length. In 3D, add the third difference under the root. Order does not matter, because the differences are squared.
Exact radical form
When the coordinates are whole numbers the distance is often an irrational number. The exact form pulls out perfect squares: √72 = 6√2. The exact form is preferred in algebra classes; the decimal is better for real measurements.
| Points | Distance squared | Exact distance |
|---|---|---|
| (0, 0) to (3, 4) | 25 | 5 |
| (1, 1) to (4, 5) | 25 | 5 |
| (0, 0) to (6, 6) | 72 | 6√2 |
| (2, 3) to (5, 7) | 25 | 5 |
| (−1, 4) to (5, −2) | 72 | 6√2 |
Midpoint and slope
The midpoint is the average of the coordinates. The slope is the change in y divided by the change in x; a vertical line has no slope. The midpoint calculator can also work backward to find a missing endpoint.
Worked example in 3D
A drone flies from (2, 1, 0) to (8, 9, 24) metres. Δx = 6, Δy = 8, Δz = 24, so d = √(36 + 64 + 576) = √676 = 26 m.
Distance vs map distance
This formula gives straight-line (Euclidean) distance on a flat plane. It does not apply to latitude and longitude over long distances, where the Earth’s curvature matters. Use a great-circle (haversine) method for that. For city blocks, Manhattan distance |Δx| + |Δy| is more realistic.
Distance from a point to a line
Different formula: for the line ax + by + c = 0 and point (x₀, y₀), distance = |ax₀ + by₀ + c| / √(a² + b²). The tool here finds point-to-point distance only.
Common mistakes
Forgetting to square the differences, forgetting the square root at the end, and adding instead of subtracting when a coordinate is negative. The order of subtraction does not matter, because squaring removes the sign. For (−3, 2) and (1, −1), Δx = 1 − (−3) = 4.
Accuracy and limits
The decimal answer is accurate to six decimals. Exact forms are only shown when all coordinates are integers.
Frequently asked questions
How do you find the distance between two points?
Subtract the coordinates, square each difference, add them and take the square root.
What is the distance formula in 3D?
d = √(Δx² + Δy² + Δz²).
Can the distance be negative?
No. The square root of a sum of squares is never negative.
Does the order of the points matter?
No. Swapping the points gives the same distance.
How do I find the distance on a map?
For short distances a flat formula works. For long distances use latitude and longitude with a great-circle formula.
Sources
Related calculators
Related to This Article
More math articles
- A Guided, Timed Response
- How do You Simplify Radicals with Fractions?
- Washington SBAC Fifth-Grade Math: 49 Free Printable Worksheets, Chapter by Chapter
- The Best Grade 3 ELA Practice Tests for Maine Students
- Foreign and defense policy
- NES Essential Academic Skills Math Flashcards
- Family
- 49 Free Illinois IAR Grade 3 Math Worksheets — Print, Practice, and Check the Answer Key
- The Best Grade 8 ELA Practice Tests for Colorado Students
- Climate and the Greenhouse Effect



What people say about "Distance Calculator Between Two Points (2D and 3D) With Steps"?
No one replied yet.