The familiar 3–4–5 distance
From (0, 0) to (3, 4), Δx = 3, Δy = 4, distance = 5, and midpoint = (1.5, 2). Squared distance is 25.
Measure the Euclidean distance between two Cartesian points in a plane or in three-dimensional space. The calculator also reports the midpoint, signed coordinate differences, and squared distance. Its diagram shows the XY projection with the same scale on both displayed axes.
Changing the unit relabels the numbers. Convert measurements to one common unit before entering them.
Coordinates can be negative or zero and must lie between −1,000,000,000 and 1,000,000,000. Use the same linear scale on all axes. Latitude and longitude need a geographic distance formula.
| Measurement | Value |
|---|---|
| Euclidean distance | 5 units |
| Midpoint | (1.5, 2) |
| Δx | 3 units |
| Δy | 4 units |
| Squared distance | 25 units² |
Formula: d = √[(x₂ − x₁)² + (y₂ − y₁)²]
Cartesian coordinates must use the same linear unit on every axis. The plot shows the XY projection; a 3D distance can exceed its plotted length.
Results use full floating-point precision internally and display up to 10 significant digits. Angles are in degrees.
Calculations run locally in your browser. Measurement values are not sent to a calculation service. The downloadable text contains your selected inputs and computed results.
Choose 2D points or 3D points.
Enter each coordinate, including zero and negative values where appropriate.
Use one consistent linear unit and the same scale on every coordinate axis.
Review distance and midpoint, then copy or download the point definitions and results.
From (0, 0) to (3, 4), Δx = 3, Δy = 4, distance = 5, and midpoint = (1.5, 2). Squared distance is 25.
From (−2, 5) to (4, −3), the differences are 6 and −8. Distance is 10 and midpoint is (1, 1). Signs affect direction but disappear when the differences are squared.
From (0, 0, 0) to (2, 3, 6), squared distance is 4 + 9 + 36 = 49, so distance is 7. The XY projection is only √13, approximately 3.605551275.
For each axis, subtract the first point’s coordinate from the second. In 2D, distance is √(Δx² + Δy²); 3D adds Δz² inside the square root. Reversing the point order changes the signs of the differences but leaves the final distance unchanged.
The midpoint lies halfway along the straight segment. Its x-coordinate is (x₁ + x₂)/2, with the same averaging rule for y and, in 3D, z. This differs from the distance calculation: midpoint uses coordinate sums, while distance uses differences. Coincident points have zero distance and their shared position as the midpoint.
A browser diagram has two displayed dimensions. The tool plots x and y with equal scales and uses dashed component legs to illustrate horizontal and vertical differences. In 3D mode it does not draw a perspective model; two spatial points with identical x and y can overlap on the plot while having nonzero distance along z.
This formula describes flat Cartesian space with matching linear units on each axis. Geographic latitude and longitude are angles on Earth and cannot be substituted directly for x and y to obtain ground distance. Likewise, pixels from axes with different physical scales must first be converted to a common linear scale.
Yes. Coordinates are positions relative to an origin, so zero and negative entries are valid. Each coordinate is bounded to ±10⁹.
Distance and all differences are zero. The midpoint is the same point. This is a valid input, unlike a zero-length side in a shape calculator.
No. It gives the straight-line segment length in Cartesian space, without roads, obstacles, or travel constraints.
The plot omits the z difference. Adding Δz² can only increase or preserve the full distance relative to its XY projection.