3D Distance Calculator
Find the distance between two 3D coordinates.
Result
How it is calculated
The straight-line distance between points (x1, y1, z1) and (x2, y2, z2) in three-dimensional space is d = √((x2 − x1)² + (y2 − y1)² + (z2 − z1)²). It extends the Pythagorean theorem by one more axis: the difference along each axis is squared, the three squares are added and the square root is taken.
Coordinates may be negative or decimal, and swapping the two points gives the same answer because the differences are squared. All six values must be filled in. The result takes the unit of your coordinates (the tool has no units of its own) and is displayed with two decimals. It measures the direct line, not a path along surfaces or curves.
Worked example
Find the distance between (1, 2, 3) and (4, 6, 15). The differences are 4 − 1 = 3, 6 − 2 = 4 and 15 − 3 = 12. Their squares are 9, 16 and 144, which sum to 169. The square root of 169 is 13.00.
Common mistakes
- Leaving out the z-axis difference, which gives the 2D distance instead; here that would be 5 rather than 13.
- Mixing units between axes, such as x and y in metres and z in centimetres.
- Forgetting to take the square root and reporting the sum of squares.
- Using longitude, latitude and altitude as x, y, z; degrees are not equal-length units, so the result is not a real distance.
About this calculator
This calculator finds the straight-line distance between two points in 3D space using the extended Pythagorean theorem, d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²), the 3D generalization of the standard 2D distance formula.
It's used in game development and 3D graphics to check collision distances or line-of-sight, in engineering and CAD work to measure distances between components in a model, and in physics and astronomy problems that place objects by (x, y, z) coordinates. Because it works with any consistent unit (meters, pixels, light-years), the same formula scales from a robotics simulation to plotting star positions.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
Do not feed latitude and longitude into this tool. A degree of longitude shrinks toward the poles, so raw degrees are not equal lengths and the answer is meaningless. Use coordinates measured in one unit along three perpendicular axes. A quick plausibility test: the answer must be at least as large as the biggest single-axis difference and no larger than the three differences added together. Which field are you working in: games, CAD or something else?