3D Lines Closest Points Calculator
Calculate shortest separation and a pair of closest points on two infinite three-dimensional lines.
YOUR CALCULATION
Result
—
Calculation steps
Work through one step at a time or reveal the complete calculation. The steps use your current inputs.
How to calculate
Treat lines as infinite, allowing either signed line parameter rather than clamping to segments.
Solve orthogonality of the connecting segment to both directions; distance=|closest point1−closest point2|
Worked example
The x-axis and line(0,1,1)+t(0,1,0) have shortest distance1.
Assumptions and input details
Coordinate values share one length unit, and directions use any consistent nonzero scale. Nearly parallel directions within relative determinant1e−12 use the parallel-line branch. No finite segment endpoints or moving-object time.
Using this calculator
Can I enter my own problem?
Yes. Replace the example values with your own inputs. The result, calculation steps, tables and applicable diagrams update from those inputs. Blank or invalid values clear the result; example values are never silently substituted for missing inputs.
Are the results exact?
Results use floating-point arithmetic and displayed rounding. Read the formula, assumptions and any stated data precision before interpreting the result.
Is my input uploaded?
The calculation runs in your browser. No account, file upload or external AI service is required. Inputs are not saved between page reloads.
Project a point onto a finite line segment, find its nearest point and compare the infinite-line distance.
Find the earliest minimum separation of two points moving at constant 2D velocities within a chosen future interval.
Enter two three-component vectors to calculate their sum, difference, dot product, cross product, magnitudes and angle, with an XY-projection diagram.
Reserved advertising space.