Intersection of Two Lines Calculator
Enter the slope and y-intercept for each of two straight lines and instantly get the exact intersection point — the (x, y) coordinate where the lines cross — plus a live graph showing both lines.
Point where the two lines cross
- 1
Denominator (m₁ − m₂)
2 − (-1) = 3Set the two line equations equal; x terms collect to give this denominator. - 2
x-coordinate
(7 − 1) ÷ 3 = 2 - 3
y-coordinate
2 × 2 + 1 = 5
How does this calculator work?
For two lines y = m₁x + b₁ and y = m₂x + b₂, their intersection is x = (b₂ − b₁)/(m₁ − m₂) and y = m₁x + b₁. If slopes are equal the lines are parallel (no crossing) or coincident (every point crosses). Enter slope and intercept for each line above.
Formula
How this is calculated
Two lines in slope-intercept form are y = m₁x + b₁ and y = m₂x + b₂. At the intersection both equations are satisfied simultaneously, so m₁x + b₁ = m₂x + b₂. Collecting x terms gives (m₁ − m₂)x = b₂ − b₁, then x = (b₂ − b₁) / (m₁ − m₂). The y-coordinate follows by substituting back: y = m₁x + b₁.
If the slopes are equal (m₁ = m₂) the denominator is zero and the lines never converge. There are two sub-cases: if the intercepts also match (b₁ = b₂) the lines are identical (coincident) and every point is a solution; otherwise the lines are parallel with no intersection.
This is algebraically equivalent to solving a 2×2 system of linear equations using substitution or elimination — a core skill in secondary-school algebra and linear programming.
Frequently asked questions
Convert to slope-intercept form first: y = (C − Ax) / B = −(A/B)x + C/B. Then slope m = −A/B and intercept b = C/B.
No — this calculator handles only linear equations. For intersections with parabolas or other curves, you need to solve the resulting non-linear equation numerically.
Parallel lines have exactly the same slope. Check that m₁ ≠ m₂. Floating-point rounding can make very nearly parallel lines appear to intersect at a huge x-value; the calculator treats slopes closer than 10⁻¹² as equal.
Also known as
TG we-Calculate Editorial Team. (2026). Intersection of Two Lines Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/intersection-of-two-lines-calculator
TG we-Calculate Editorial Team. "Intersection of Two Lines Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/intersection-of-two-lines-calculator.
TG we-Calculate Editorial Team, "Intersection of Two Lines Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/intersection-of-two-lines-calculator
@misc{wecalculate_intersection_of_two_lines_calculator, title = {Intersection of Two Lines Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/intersection-of-two-lines-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
