About the Distance Formula Calculator
This free browser tool computes Euclidean distance between two Cartesian points in 2D or 3D. You enter coordinates for Point 1 and Point 2; results update instantly as you type, there is no calculate button. The tool shows the numeric distance, exact radical form, distance squared and the changes in x and y (Δx, Δy). It runs in your browser only; nothing is uploaded to a server after the page loads. You can copy results or create a share link that reopens the page with your numbers. Use consistent units for both points (for example both in metres or both in miles). Do not use this calculator for latitude/longitude long distances; use great-circle or ellipsoidal formulas for geographic coordinates.
How to use it
- 1Select Dimensions 2D or 3D.
- 2Enter Point 1 coordinates (x, y, [z]).
- 3Enter Point 2 coordinates (x, y, [z]).
- 4See Distance, Exact form, Distance squared, Δx and Δy update instantly.
Worked example
Points: P1 = (1, 2), P2 = (4, 6). Δx = 4 - 1 = 3. Δy = 6 - 2 = 4. Distance squared = 3^2 + 4^2 = 25. Exact form = sqrt(25). Distance = 5 (same units as inputs).
The formula
Distance d = sqrt((x2 - x1)^2 + (y2 - y1)^2)In 3D add (z2 - z1)^2 under the rootIt is Pythagoras: the changes in x and y are the two short sides of a right triangle and the distance is the hypotenuseSource: Euclidean distance - Wolfram MathWorldDistance between two points - Math Is Fun. Last checked 5 November 2026.
What it is good for
- Instant updates as you type, no calculate button.
- Shows exact radical form, numeric distance and distance squared.
- Runs in your browser only; nothing uploaded after the page loads.
- Not suitable for latitude/longitude great-circle distances; use haversine or ellipsoidal methods for geographic coordinates.
- Accepts standard ASCII digits with a dot (.) as the decimal separator; some locale formats may need conversion.
Questions people ask
What inputs does this calculator accept?
You enter coordinates for Point 1 and Point 2. Choose 2D or 3D, then provide x and y values and z if you picked 3D. Use the same units for both points.
What does Exact form mean here?
Exact form shows the result as a simplified square root or radical, for example sqrt(25) or 2*sqrt(5). The calculator also shows the decimal approximation next to it.
Why does the tool show Δx and Δy?
Δx and Δy are the differences x2-x1 and y2-y1. They are the two legs of a right triangle. The distance is the hypotenuse computed by Pythagoras.
Can I use this for GPS coordinates (latitude and longitude)?
No. Latitude and longitude need great-circle or ellipsoidal formulas because the Earth is curved. For geographic distances use the haversine formula or a geodesy library.
How do I copy or save a result?
Use the copy button to copy numeric or exact results. You can also create a share link that reopens the page with your input numbers in place.
What units does the calculator return?
The numeric result uses the same units you entered for coordinates. If you entered metres, the distance is in metres. Do not mix units between points.
Help keep every tool free
FreeToolr stays free because people help it grow. Share a tool you like, tell us what to build next, or support us on Ko-fi.