Distância entre Retas Paralelas
- Created by
- Renato Passos, Eng. de Software
- Reviewed by
- Renato Passos, Eng. de Software
Last updated: Apr 18, 2026
Formula
|c₂−c₁|/√(a²+b²)
About this calculator
This calculator determines the distance between two parallel lines in the Cartesian plane. Parallel lines have the same slope, meaning coefficients a and b in the general equation (ax + by + c = 0) are identical, differing only in the constant term c. The formula used is d = |c₂ − c₁| / √(a² + b²), where c₁ and c₂ are the constant terms of the two lines.
To use the calculator, you need to provide coefficients a, b and the constant terms c₁ and c₂ for the two lines. The result is the perpendicular distance between them, always positive. This tool is useful in analytic geometry problems, such as calculating the width of a strip, the distance between railroad tracks, or between parallel lines in engineering projects.
Important precautions: ensure the lines are indeed parallel, i.e., coefficients a and b must be equal. If the lines are not parallel, the formula does not apply and the distance is undefined. Also, verify that the equation is in general form (ax + by + c = 0); equations in slope-intercept form (y = mx + n) must be converted before use.
Frequently asked questions
Can I use this calculator for non-parallel lines?
No. The formula d = |c₂ − c₁| / √(a² + b²) only works for parallel lines. If the lines are not parallel, the distance between them varies and is not a single value.
How do I convert a line equation to general form?
If the line is in slope-intercept form y = mx + n, multiply both sides by 1 and rearrange: mx + n - y = 0, or mx - y + n = 0. The coefficients a, b, c are m, -1, and n respectively.
Is the result always positive?
Yes. The absolute value in the numerator ensures the distance is positive, regardless of the order of the lines.
What do a and b represent in the general equation?
Coefficients a and b determine the slope of the line. For parallel lines, a and b must be proportional (same direction). In the formula, they are used to compute the perpendicular distance.
Do I need to use the same a and b for both lines?
Yes. If the lines are parallel, coefficients a and b are identical (or proportional). Entering different values will yield an incorrect result, not the distance between parallel lines.