The Distance Calculator finds straight-line distance between two points in the plane or in space. Horizontal and vertical separations form legs of a right triangle whose hypotenuse is the distance. The same pattern extends to a third dimension with dz squared added under the root. The page redraws the segment with dashed rise and run legs.
The reference pair (0, 0) and (3, 4) reproduces the 3-4-5 triangle distance 5. Related pages cover the Pythagorean Theorem Calculator on pure side lengths, the Slope Calculator for rise over run, and the Midpoint Calculator for the segment center.
Calculate the distance between two points
Distance is always non-negative. The Distance Calculator subtracts coordinates in the same order for each axis before squaring so sign errors cancel. Units follow the coordinate system: if x and y are in kilometers, distance is in kilometers. Enter two points in 2D, or include z coordinates for space distance.
The diagram draws the horizontal and vertical legs as dashed segments forming a right angle at the corner of the bounding rectangle. Ordered pairs may sit in any quadrant; squared differences remove the effect of negative coordinates.
Identical points yield distance zero. Very large coordinates can stress floating display precision; exact integer fixtures such as 3-4-5 remain exact under the square root when the sum of squares is a perfect square.
Apply the distance formula
The distance formula is the Pythagorean theorem with dx and dy as legs. Squaring before the root removes sign dependence on quadrant. The Distance Calculator expands that formula with the entered coordinates.
d = sqrt((x2 - x1)^2 + (y2 - y1)^2)
For (0, 0) and (3, 4):
d = sqrt(9 + 16) = sqrt(25) = 5
For (1, 2) and (4, 8), the same formula gives sqrt(9 + 36) = sqrt(45) approx 6.71, which matches the slope-page companion pair without replacing that page's gradient focus.
Order of the two points does not matter because each difference is squared. Switching (3, 4) and (0, 0) still yields 5. Manhattan distance |dx| + |dy| is a different metric used on grid paths; this page returns Euclidean straight-line distance only.
Calculate distance in three dimensions
Add the squared z difference under the same root when both points include a z coordinate. This is the space diagonal of a box with edge lengths absolute dx, dy and dz. The Distance Calculator extends the 2D formula without changing the 2D path when z is omitted.
d = sqrt((x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2)
Example (0, 0, 0) to (1, 2, 2):
d = sqrt(1 + 4 + 4) = sqrt(9) = 3
Example (0, 0, 0) to (3, 4, 12):
d = sqrt(9 + 16 + 144) = sqrt(169) = 13
That 3-4-12-13 pattern mirrors planar Pythagorean triples with a third leg. A rectangular prism space diagonal uses the same root; see the Rectangular Prism Calculator when the edges are box dimensions rather than arbitrary point coordinates.
Solve for points (0,0) and (3,4)
Substitute into the 2D formula for the classic 3-4-5 distance. Rise is 4, run is 3, hypotenuse is 5. 1. Differences
dx = 3 - 0 = 3
dy = 4 - 0 = 4
2. Distance
d = sqrt(3^2 + 4^2) = 5
3. Related slope (cross-check only)
m = 4 / 3
4. Midpoint (cross-check only)
((0+3)/2, (0+4)/2) = (1.5, 2)
Slope and midpoint are reported on their own calculators with fuller equation and endpoint-recovery sections. This page stops at distance once the hypotenuse is known.
Classroom grids often place one point at the origin to make dx and dy equal to the second point's coordinates. That is convenient but not required. Translating both points by the same vector leaves distance unchanged, which is why only differences appear in the formula.
When coordinates come from a map with a scale, convert map measurements to ground units before reporting distance. A segment that measures 3 cm and 4 cm on a 1:100000 map is not a ground distance of 5 cm; scale conversion comes first, then the distance formula in ground units.
Understand distance as the Pythagorean theorem
Plot two points and form a right triangle using horizontal and vertical grid lines. The distance is hypotenuse c while legs are absolute dx and dy. That picture is why distance and Pythagoras pages cross-link without duplicating every triple table.
On the Pythagorean Theorem Calculator the inputs are side lengths a, b, c without coordinates. On the Distance Calculator the inputs are coordinates and the engine forms a and b as absolute differences. Both return the same numeric relation c = sqrt(a^2 + b^2).
Slope uses the same legs but divides them. Midpoint averages the endpoints. Keeping those three outputs on three URLs matches the outline cannibalisation plan for the two-point cluster.
Frequently asked questions
What is the distance formula?
Distance is d = sqrt((x2-x1)^2 + (y2-y1)^2). For (0, 0) and (3, 4), d = 5.
Does order of points matter?
No. Squaring differences removes sign, so swapping the points leaves distance unchanged.
How is 3D distance found?
Add (z2-z1)^2 under the root: d = sqrt(dx^2 + dy^2 + dz^2).
Is this the same as Pythagoras?
Yes. Distance is the Pythagorean theorem applied to coordinate differences as legs.
How does distance differ from slope?
Distance combines rise and run under a square root. Slope divides rise by run. Use the Slope Calculator for gradient and line equation.
How does distance differ from midpoint?
Midpoint averages coordinates. Distance measures separation. Use the Midpoint Calculator for the center point.
What units does the Distance Calculator use?
Distance uses the same length unit as the coordinates. Mixing units on different axes makes the Euclidean combination meaningless until units match.
Can distance be zero?
Yes, when both points are identical. Otherwise the result is positive.
What is the distance from (0,0) to (3,4)?
The distance is 5. That pair is the reference 3-4-5 fixture on this page.
Does the Distance Calculator use degrees?
No. Distance is a length. Angles of the segment belong on the Slope Calculator via arctan of rise over run.
Can I enter negative coordinates?
Yes. Squared differences handle any quadrant. From (-3, -4) to (0, 0) the distance is still 5.
What is a 3D example with a clean integer?
From (0, 0, 0) to (1, 2, 2) the distance is 3. From (0, 0, 0) to (3, 4, 12) the distance is 13.
Is Manhattan distance available?
No. This page returns Euclidean distance only. Manhattan distance would be |dx| + |dy| on a grid path.
Summary
Distance Calculator returns Euclidean distance between two points in 2D or 3D from coordinate differences, with substituted arithmetic and a labelled rise-run figure. Worked numbers match (0, 0) to (3, 4): distance 5. Use the Pythagorean Theorem Calculator for side-length inputs and the Slope or Midpoint calculators for the other two-point outputs.