Result
Result reflects the current submitted inputs.
- Risk A
- Reviewed 2026-05-26
- 1 sources
- Coordinates are interpreted as Cartesian points in the same unit system.
- The result is straight-line planar distance, not travel or geographic surface distance.
- Intermediate values are not rounded; raw outputs are rounded to 10 decimal places for stability.
Accuracy notes
- Risk level
- A
- Reviewed
- 2026-05-26
- Sources
- 1
- Primary result
- Distance
Formula logic is kept in a pure calculator module with fixtures, source notes, and page-visible assumptions.
What the result means
The result is the straight-line (Euclidean) distance, the shortest path between the points. It is independent of order: distance from A to B equals distance from B to A.
Use the result this way
- Start with Distance, then use supporting outputs for context.
- Verify First point x, First point y, and Second point x before copying the result.
- Check the formula, example, and assumptions before reusing the answer.
User job
How to use this calculator
Use Distance Calculator when you need distance, then use horizontal change and vertical change to check the context for quick number work, classwork, spreadsheet checks, and explaining a calculation to someone else.
Best for
- Checking the core numeric relationship
- Comparing the main result with supporting outputs
- Reviewing a default example before entering your own first point x and first point y.
Check before relying
- Confirm sign, decimal, percent, and rounding assumptions before copying the number.
- Coordinates are interpreted as Cartesian points in the same unit system.
- The result is straight-line planar distance, not travel or geographic surface distance.
- Source context: OpenStax, reviewed 2026-06-18.
Next useful step
- Pythagorean Theorem CalculatorUse next when your task shifts from Distance Calculator to Pythagorean Theorem Calculator.
- Right Triangle CalculatorUse next when your task shifts from Distance Calculator to Right Triangle Calculator.
- Slope CalculatorUse next when your task shifts from Distance Calculator to Slope Calculator.
Formula
2D distance: d = sqrt((x2 - x1)^2 + (y2 - y1)^2). 3D distance: d = sqrt((x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2). This is the Pythagorean theorem applied to coordinate differences. The result is always non-negative.
- The distance formula comes from the Pythagorean theorem: the segment between two points is the hypotenuse of a right triangle with legs (x2-x1) and (y2-y1).
- In 3D, add the z difference squared inside the square root.
- Distance is always non-negative; the squaring step removes any sign.
- For points on Earth (latitude/longitude), use the haversine formula instead, since the Earth's curvature makes straight-line distance through the planet wrong.
- Other distance metrics exist (Manhattan, Chebyshev) but the unqualified 'distance' usually means Euclidean.
Inputs
Enter the (x, y) of point 1 and point 2. For 3D add z. The calculator subtracts coordinates, squares each difference, sums them, and takes the square root.
Example
Distance from (1, 2) to (4, 6): d = sqrt((4-1)^2 + (6-2)^2) = sqrt(9 + 16) = sqrt(25) = 5. In 3D from (0, 0, 0) to (3, 4, 12): sqrt(9 + 16 + 144) = sqrt(169) = 13.
FAQ
What is the distance formula?
The distance between two points (x1, y1) and (x2, y2) is sqrt((x2-x1)^2 + (y2-y1)^2). In 3D add (z2-z1)^2 inside the square root.
How do you find the distance between two points?
Subtract the x-coordinates and y-coordinates, square each, add them, take the square root. Between (1,2) and (4,6): sqrt(3^2 + 4^2) = 5.
What is the 3D distance formula?
d = sqrt((x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2). It extends the 2D formula by adding the squared z difference.
Does the order of points matter?
No. Because each difference is squared, swapping the points gives the same distance. Distance from A to B equals distance from B to A.
Why is the distance formula based on the Pythagorean theorem?
Drawing the horizontal and vertical differences forms a right triangle. The straight line between the two points is the hypotenuse, so c^2 = a^2 + b^2 gives the squared distance.
What should I verify before using distance calculator?
Verify first point x, first point y, and second point x, the displayed formula, and the worked example before copying the result into another document or decision.
Sources
Last reviewed: 2026-05-26
- academicReviewed 2026-06-18Algebra and Trigonometry 2e, Section 2.5: The Distance and Midpoint FormulasOpenStax. Derivation of the distance formula from the Pythagorean theorem.
Disclaimer
Results are Euclidean (straight-line) distances in a flat coordinate system. For locations on Earth, use a great-circle (haversine) calculator instead.