Shortest Distance Between Two Lines Calculator

Calculate the Shortest Distance

Line 1: Point P1 and Direction Vector V1

Please enter x1.
Please enter y1.
Please enter z1.
Please enter a1.
Please enter b1.
Please enter c1.

Line 2: Point P2 and Direction Vector V2

Please enter x2.
Please enter y2.
Please enter z2.
Please enter a2.
Please enter b2.
Please enter c2.

Easily determine the shortest distance between any two lines in three-dimensional space, whether they are skew or parallel. Our intuitive tool helps you solve complex 3D geometry problems quickly, providing accurate results for academic or professional use. Simply input the coordinates of a point on each line and their respective direction vectors to get started.

Formula:

The shortest distance (d) between two lines defined by points P1(x1, y1, z1) and P2(x2, y2, z2) and their respective direction vectors V1(a1, b1, c1) and V2(a2, b2, c2) is given by:

For Skew Lines:
d = | (P2 - P1) ⋅ (V1 × V2) | / | V1 × V2 |

For Parallel Lines:
d = | (P2 - P1) × V1 | / | V1 |

Where:
P1 and P2 are position vectors of points on Line 1 and Line 2.
V1 and V2 are direction vectors of Line 1 and Line 2.
denotes the vector dot product.
× denotes the vector cross product.
| | denotes the magnitude of a vector or the absolute value of a scalar.

Mathematics and Tools

1/4 Mile ET : Estimate Your Quarter Mile Elapsed Time

Go to Calculator

1x1 Matrix Multiplication

Go to Calculator

3D Distance : Find Distance Between Two Points in 3D Space

Go to Calculator

5x5 Matrix Multiplication

Go to Calculator

65th Percentile : Find the 65th Percentile Online

Go to Calculator

75th Percentile : Quickly Find Q3 for Your Dataset

Go to Calculator