3D Distance Calculator
Compute Euclidean distance between two 3D points.
Ponto 1
Ponto 2
d = —
3D distance: d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²)
To measure the straight-line distance between two points in three-dimensional space, use d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²). It's the Pythagorean theorem stretched to three dimensions, nothing more. Take (0, 0, 0) and (3, 4, 12): you get √(9 + 16 + 144) = √169 = 13. Other metrics exist too. The Manhattan distance, |Δx| + |Δy| + |Δz|, comes from taxi-cab geometry, while the Chebyshev distance, max(|Δx|, |Δy|, |Δz|), counts moves the way a chess king does. On a sphere you want the great-circle (orthodromic) length, which the haversine formula handles. And in special relativity the equivalent quantity is the space-time interval s² = −c²Δt² + Δx² + Δy² + Δz², where the time term carries the opposite sign.
Applications
It shows up in CAD and 3D modelling, where you measure between vertices and reference points. GPS uses it in ECEF coordinates before projecting down to latitude/longitude. Molecular modelling leans on it because atom-to-atom distances drive bond forces and energy in molecular dynamics. Then there's VR/AR (occlusion, collision detection, culling), animation and game engines doing proximity tests, robotics path planning, and astronomy measuring the gap between stellar coordinates.
FAQ
Does the order of the points matter? No. Squaring the differences erases the sign, so swapping the two points leaves the answer untouched: d(P, Q) = d(Q, P).
What if I have more than three dimensions? Nothing changes in principle: d = √Σ(xᵢ − yᵢ)². That same Euclidean (L2) norm holds for as many dimensions as you need.
When should I prefer Manhattan or Chebyshev distance? Reach for Manhattan when movement only happens along the axes, such as city grids or certain ML regularisers. Chebyshev fits cases where a diagonal step costs exactly as much as a straight one, like a chess king or pixel neighbourhoods in an image.
Related Tools
Rent Adjustment Calculator
Compute annual rent adjustment by IGP-M or IPCA accumulated in the last 12 months (manually configurable).
Pregnancy Calculator
Compute estimated due date (EDD), gestational age and trimester from the last menstrual period (LMP).
Fertile Period Calculator
Compute fertile window and ovulation day from the first day of the last cycle and the average cycle length.