Distance Calculator (Coordinates)
Calculate the Euclidean distance between two points in 2D or 3D coordinate space.
- X Contribution (Δx²)9 · 36%
- Y Contribution (Δy²)16 · 64%
Squared, the x and y differences add up to 25 — the square root of that total is the straight-line distance, 5.
ƒShow your work
d = √[(x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²]
- 1Δx = 3 − 0 = 3
- 2Δy = 4 − 0 = 4
- 3d = √(Δx² + Δy²) = √25 = 5
About the Distance Calculator (Coordinates)
This finds the straight-line ('as the crow flies') distance between two points, whether they're plotted on a flat 2D graph or floating in 3D space. It's one of the most direct applications of the Pythagorean theorem you'll meet in geometry class — instead of one right triangle, it's really just stacking the theorem across however many dimensions you're working in.
Students hit it in coordinate geometry proving shapes or finding perimeters from vertex coordinates, while outside the classroom the identical math underlies GPS distance calculations, game and graphics programming (how far apart are two objects in a scene), and physics problems involving displacement between two positions.
Adding a third coordinate (z) extends the exact same idea into 3D without changing the underlying logic — it's the same formula with one more squared difference added under the square root.
How it’s calculated
The formula is d = √[(x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²]. Each squared difference measures how far apart the two points are along one axis; adding them together and taking the square root combines those separate axis-by-axis differences into one overall straight-line distance — exactly the Pythagorean theorem, generalized past two dimensions.
Squaring each difference before adding is what makes the direction of the difference (positive or negative) not matter — a negative Δx contributes the same squared value as a positive one of the same size, since distance itself is never negative.
In 2D, leaving z at zero for both points collapses this back to the familiar two-dimensional distance formula, since the z-term simply becomes zero and drops out of the sum.
Frequently asked questions
How do you find the distance between two points?
Subtract the x-coordinates and square the result, do the same for y (and z, if working in 3D), add all the squared differences together, and take the square root of that sum.
Does this work for 3D coordinates too?
Yes — leave the z-coordinates at 0 for a purely 2D distance, or fill them in for a genuine 3D straight-line distance; the same formula covers both cases.
What's the difference between this and the slope calculator?
Distance tells you how far apart two points are in a straight line. Slope tells you the steepness and direction of the line connecting them — you can have two points that are very far apart with a shallow slope, or close together with a steep one; the two measurements answer different questions.
Why is the result always positive?
Distance is a magnitude, not a direction — squaring each coordinate difference eliminates any negative signs before the square root is taken, so the result can never come out negative.
Related calculators
Powered by GetCalculator.online