Distance Between Parallel Lines Calculator

Enter two parallel lines to find the distance between them.

An equation in x and y, such as y = 2x + 1 or 3x + 4y = 5.

A second equation in x and y.

Try

Result

You entered−2x+y=1∥−2x+y=−4-2x + y = 1 \quad \parallel \quad -2x + y = -4

5≈2.236068\displaystyle \sqrt{5} \approx 2.236068

Squared distance

5\displaystyle 5
Show the work
  1. Distance between parallel lines

    Parallel lines keep the same distance everywhere. With both lines written as Ax+By=CAx + By = C with the same A=−2A = -2 and B=1B = 1, the distance depends only on the constants C1C_1 and C2C_2.

    d=∣C1−C2∣A2+B2=∣1−(−4)∣(−2)2+12=55=5≈2.236068\begin{aligned} d &= \frac{\left|C_1 - C_2\right|}{\sqrt{A^2 + B^2}} \\ &= \frac{\left|1 - \left(-4\right)\right|}{\sqrt{\left(-2\right)^2 + 1^2}} \\ &= \frac{5}{\sqrt{5}} \\ &= \sqrt{5} \approx 2.236068 \end{aligned}
  2. Result

    So the parallel lines are 5≈2.236068\sqrt{5} \approx 2.236068 units apart.

Worked examples