Distance Formula Calculator
Enter two points to get the exact distance, decimal value, and substitution steps.
Drag & drop or upload an image or PDF
Try an example
The distance formula comes from the Pythagorean theorem
The horizontal and vertical coordinate changes form the legs of a right triangle. The straight-line distance between the points is its hypotenuse.
Subtracting in either order gives the same distance because each difference is squared. Exact answers are often left as simplified radicals, with a decimal approximation added when useful.
How to use the distance formula calculator
Enter the problem as written
Type or paste the full expression. You can also upload a clear photo or PDF and check the extracted text before solving.
Read the working, not only the answer
Each transformation is separated and explained so you can compare it with your own method.
Ask about any step
Continue in the same solution to request another method, check a restriction, or ask why a rule applies.
Distance in the coordinate plane
Square the coordinate changes, add them, and take the nonnegative square root.
A reliable way to work through it
Find coordinate changes
Subtract the x-coordinates and y-coordinates in consistent pairs.
Square and add
Squaring makes both contributions nonnegative before they are combined.
Simplify the root
Factor out any perfect square and add a decimal only if the problem asks for one.
Worked example
Find the distance between (-2, 4) and (5, -1)
Substitute both ordered pairs.
Compute the coordinate changes.
Square and add.
The exact distance is √74, which is about 8.60 units.
Common mistakes to check
Forgetting parentheses around negatives
Write 5 - (-2) before simplifying so the sign change is clear.
Adding before squaring
Each coordinate difference is squared separately.
Rounding too early
Keep the radical exact until the last line, then round once.
Related calculators
Questions students ask
Can the calculator find 3D distance?
Yes. Enter points as (x, y, z). The formula adds the square of the z-coordinate difference.
Does the order of the two points matter?
No. Reversing both coordinate subtractions changes their signs, but squaring produces the same distance.
Will it simplify radical answers?
Yes. It gives an exact simplified radical when possible and can also provide a decimal approximation.
Is distance ever negative?
No. Geometric distance is always nonnegative because it is defined using squared changes and the principal square root.