Key Points
- Formula: , after both equations have the same and .
- Slope form: for and , .
- Vertical lines and are apart.
- A line at a given distance always has two answers, one on each side.
How Far Apart Are Two Rails That Never Meet?
Rails run side by side for miles, and one fixed gap decides whether a train stays on. Measure it anywhere along a straight stretch, square across the track, and you get the same number.
- On standard-gauge track the gap is 1,435 mm between the inner faces of the rails, wherever you measure.
- Because the gap never changes, it has one value, and coordinate geometry finds it from the two equations alone.

What Is the Distance Between Two Parallel Lines?
The distance between two parallel lines is the perpendicular distance from any point on one line to the other line.
- Parallel lines keep a constant gap on a flat plane, so every point gives the same answer.
- It is a special case of the distance between two lines: crossing lines have distance 0, and lines in 3D can also be skew.
What Is the Formula for the Distance Between Two Parallel Lines?
Write both lines with identical coefficients of and , then divide the difference of the constants by .
- are the coefficients of and ; they must be the same in both equations.
- are the two constants, and is the scale factor of the equations.
Where does the formula come from?
- Pick any point on the first line, so .
- The distance of a point from a line to the second line is
- and vanish: every point gives the same answer, which confirms the constant gap.
How Do You Calculate the Distance Between Two Parallel Lines?
First check the lines are parallel, then use three steps. and are parallel and different when ; if all three ratios match, it is the same line.
- Make the coefficients of and identical; scale one line if you must.
- Read off and .
- Divide by to get .
Why Must the Coefficients Match Before You Use the Formula?
The formula compares the two constants, and constants on different scales cannot be compared.
- and are parallel, but the second is scaled by 2, so 5 and cannot be compared.
- Scale it to : .
- Dividing by is the other half: without it, scaling an equation would change the answer.
How Do You Find the Distance When Lines Are in Slope-Intercept Form?
For and (same slope ), divide the difference of the intercepts by :
This is the same formula: becomes , so , and .
Why it works: tilt the vertical gap
- At any , the lines are apart vertically, but that segment is slanted to them.
- The perpendicular, the vertical segment and the lower line form a right triangle with the vertical as hypotenuse.
- The angle between them has , so and .
- For and : gap 8, , so .
- The vertical gap is the distance only for horizontal lines, where .

In the coordinate lab above:
- Press "Parallel": and are apart.
- Drag both orange handles up one square: the distance grows to .
- Move only one handle and the lines cross: the distance is 0.
Try It Yourself
Use the coordinate lab to see Distance Between Two Parallel Lines at work: drag, change the numbers and watch what happens.
What Are the Properties of the Distance Between Two Parallel Lines?
The distance is constant, perpendicular, positive for distinct lines, and the same whichever line you call first.
- Constant and perpendicular: the same everywhere, never along a slant.
- Zero only for identical lines, when all three coefficients are in the same ratio.
- Order does not matter, because .
Edge cases and connections
- Vertical lines and : no slope, but , gives .
- Parallelogram area: a side along one line times . The distance is the height.
Examples of Distance Between Two Parallel Lines
Example 1
Find the distance between 3x + 4y + 7 = 0 and 3x + 4y − 3 = 0.
- The coefficients match: , , , .
- .
The distance is 2 units.
Example 2
Find the distance between x + 2y + 3 = 0 and 2x + 4y + 1 = 0.
- Grabbing the constants gives . Wrong: the coefficients and differ.
- Divide the second by 2: .
- .
The distance is units.
Example 3
Find the distance between x = −2 and x = 3.5.
- Vertical lines have no slope, so write and : , .
- .
The distance is 5.5 units, the horizontal gap.

Example 4
A line parallel to 6x − 8y + 1 = 0 passes through (2, 1). How far apart are the two lines?
- A parallel line is . Substitute (2, 1): , so .
- .
The lines are unit apart.
Example 5
Find the lines parallel to 3x − 4y + 2 = 0 at a distance of 3 from it.
- Any parallel line is .
- , so , giving or .
Two lines, and , one on each side: the absolute value produces both.

Where Do Students Trip Up on This?
Each slip skips one check from the method above.
Mistake 1: Using the formula before matching the coefficients
Where it slips in: The equations are multiples of each other, such as and .
Don't do this: Read and off equations whose and differ.
The correct way: Scale one equation until both share and , as in Example 2, before anything else.
Mistake 2: Stopping at the difference of the intercepts
Where it slips in: Slope form, remembering "subtract the c's" but not the denominator: 8 for and .
Don't do this: Report the vertical gap as the distance for a sloping line.
The correct way: Divide by . The vertical gap is the distance only for horizontal lines.
Mistake 3: Measuring between two chosen points
Where it slips in: Picking a point on each line and using the distance between two points.
Don't do this: Use on and on , and report .
The correct way: Two chosen points almost always give a slanted link, longer than the true gap of 2.

Where Is the Distance Between Parallel Lines Used?
"The fixed gap that keeps things from touching."
The constant-gap idea runs through anything built on parallel guides.
- Railways. The 1,435 mm gauge is checked square across the track; a slanted measure reads larger.
- Roads. Lane width is the perpendicular gap between markings, even on a road running diagonally across a map grid.
- Circuit boards. Parallel copper tracks need a minimum spacing so signals do not jump across.
- Manufacturing. A part passes if its edge stays between two parallel tolerance lines.

In 3D, the same reasoning gives the distance between parallel planes.
Conclusion
- The distance between two parallel lines is , the constant perpendicular gap.
- Check the lines are parallel, then match and before reading the constants.
- In slope form use , the vertical gap times ; lines at a given distance come in pairs.
Read More
- Slope of Parallel Lines
- Properties of Parallel Lines
- Equation of a Line
- Distance Formula
- Parallel Lines Cut by a Transversal
Research Behind This Article
- OpenStax, Precalculus 2e, Section 2.1: Linear Functions (parallel lines and slope). openstax.org
- Euclid, Elements, Book I (the parallel postulate and the properties of parallel lines), with commentary by D. E. Joyce, Clark University. mathcs.clarku.edu
- OpenStax, Calculus Volume 3, Section 2.5: Equations of Lines and Planes in Space (distances between parallel lines and planes). openstax.org
- Euclid, Elements, Book I, Proposition 47 (the right-triangle relation behind the slope-form derivation), with commentary by D. E. Joyce, Clark University. mathcs.clarku.edu
Quick Quiz: Check Yourself
Three levels, questions with figures, instant feedback with the reason.
Was this article helpful?
Your feedback helps us write better content
Frequently Asked Questions
Can the distance between two parallel lines be zero?
Does the formula for the distance between two parallel lines work in 3D?
What does a system of two parallel lines tell you?
