Distance Between Two Lines Calculator
Enter two 2D lines in standard form to find their minimum distance. Nonparallel lines intersect, so their minimum distance is zero.
Written and checked by TheToolNet Editorial Team · Last reviewed: September 20, 2026 · Editorial method
Calculate line-to-line distance
Use A₁x + B₁y + C₁ = 0 and A₂x + B₂y + C₂ = 0.
Why coefficients must be normalized
The equations x − y = 0 and 2x − 2y − 6 = 0 use differently scaled normal vectors. Dividing each constant by its normal's length puts both equations on a comparable scale before measuring their separation.
Intersecting versus parallel lines
If A₁B₂ − A₂B₁ is nonzero, the lines meet and the minimum distance is zero. For parallel lines, the calculator aligns the normal directions and subtracts normalized constants. For point-to-point geometry, use the distance between two points calculator.