Skip to content
Math

Intersection of Two Lines Calculator

Enter the equations of two lines to find their intersection point. Choose slope-intercept form (y = mx + b) or standard form (Ax + By + C = 0). The calculator returns the exact (x, y) coordinates, walks through the algebra step by step, and correctly identifies parallel and coincident lines.

Your details

Slope-intercept uses slope m and y-intercept b. Standard form uses coefficients A, B, C where Ax + By + C = 0.
Slope of the first line (rise over run).
The y-value where the first line crosses the y-axis.
Slope of the second line.
The y-value where the second line crosses the y-axis.
x-coordinateLines intersect
2

x value of the intersection point

y-coordinate5
ResultIntersection at (2.0000, 5.0000)
Angle between lines18.43degrees
x-coordinate2
y-coordinate5

Intersection point: (2.0000, 5.0000)

  • The two lines cross at exactly one point: (2.0000, 5.0000).
  • The acute angle between the lines at the intersection is 18.43 degrees.
  • Slope 1 is 1, Slope 2 is 2. Because the slopes differ, the lines meet at exactly one point.
  • Substitute (x, y) back into both original equations to verify the result.

Next stepTo verify, plug the x-coordinate back into each equation - both should give the same y value.

Formula

Slope-intercept: x0=b2b1m1m2,y0=m1x0+b1Standard form: x0=B1C2B2C1A1B2A2B1,y0=C1A2C2A1A1B2A2B1\text{Slope-intercept: } x_0 = \dfrac{b_2 - b_1}{m_1 - m_2},\quad y_0 = m_1 x_0 + b_1 \\[6pt] \text{Standard form: } x_0 = \dfrac{B_1 C_2 - B_2 C_1}{A_1 B_2 - A_2 B_1},\quad y_0 = \dfrac{C_1 A_2 - C_2 A_1}{A_1 B_2 - A_2 B_1}

Worked example

Lines y = x + 3 and y = 2x + 1: set x + 3 = 2x + 1, so x = 2, then y = 2 + 3 = 5. Intersection at (2, 5). The angle is arctan(|1 - 2| / |1 + 1*2|) = arctan(1/3) ≈ 18.43 degrees.

What is the intersection of two lines?

Two distinct lines in a plane either cross at exactly one point, run parallel and never cross, or lie on top of each other (coincident). The intersection point is the unique (x, y) pair that satisfies both line equations simultaneously. Geometrically, it is the point where the two lines meet on the coordinate plane. Finding it algebraically means solving a system of two linear equations with two unknowns.

How to find the intersection point

The standard approach is substitution or elimination. In slope-intercept form (y = m1x + b1 and y = m2x + b2), set the right-hand sides equal: m1x + b1 = m2x + b2, then solve for x = (b2 - b1) / (m1 - m2). Substitute x back into either equation to get y. In standard form (A1x + B1y + C1 = 0 and A2x + B2y + C2 = 0), use Cramer's rule with the determinant D = A1*B2 - A2*B1: x = (B1*C2 - B2*C1) / D and y = (C1*A2 - C2*A1) / D. If D = 0 the lines are parallel or coincident.

Parallel, coincident, and perpendicular lines

When two lines have the same slope (m1 = m2 in slope-intercept form, or D = 0 in the determinant test), they are parallel and share no intersection point unless they also share the same intercept, in which case they are coincident (the same line) with infinitely many intersections. Two lines are perpendicular when their slopes multiply to -1 (m1 * m2 = -1), and the angle between them is exactly 90 degrees. The angle between any two intersecting lines is calculated with tan(theta) = |m1 - m2| / |1 + m1 * m2|, giving the acute angle at the crossing point.

Converting between equation forms

Slope-intercept form y = mx + b and standard form Ax + By + C = 0 are equivalent: to convert y = mx + b to standard form, rearrange to mx - y + b = 0 (so A = m, B = -1, C = b). To convert Ax + By + C = 0 back, isolate y: y = (-A/B)x + (-C/B), giving slope -A/B and intercept -C/B (when B is nonzero). Vertical lines have B = 0 and cannot be expressed in slope-intercept form, so standard form is more general.

Line relationship summary

Determinant (D)RelationshipIntersections
D = 0, rows proportionalCoincident Infinitely many
D = 0, rows not proportionalParallel None
D not equal to 0Intersecting Exactly one point

How to identify the relationship between two lines from the determinant.

Frequently asked questions

What happens if the two lines are parallel?

Parallel lines have the same slope but different y-intercepts, so they never meet. In this case the determinant D = A1*B2 - A2*B1 equals zero and there is no solution. The calculator will display "Parallel lines (no intersection)" and the angle between them is 0 degrees.

What does it mean for lines to be coincident?

Coincident lines are actually the same line written in two different ways. Every point on one is also on the other, giving infinitely many solutions. This happens when the coefficient ratios are proportional: A1/A2 = B1/B2 = C1/C2. The determinant is also zero for coincident lines, but unlike parallel lines, all three ratios match.

How do I verify the intersection point is correct?

Substitute the (x, y) result back into both original equations. If both equations are satisfied (left side equals right side), the answer is correct. Small floating-point rounding differences (for example, 5.0000001 instead of 5) are normal for non-integer results.

Can this calculator handle vertical or horizontal lines?

Yes, using standard form (Ax + By + C = 0). A vertical line x = k is written as 1x + 0y - k = 0. A horizontal line y = k is written as 0x + 1y - k = 0. Slope-intercept form cannot express vertical lines because their slope is undefined, so switch to standard form for those cases.

What is the angle between two intersecting lines?

The acute angle theta between two lines with slopes m1 and m2 is given by tan(theta) = |m1 - m2| / |1 + m1*m2|. When the product m1*m2 = -1 the denominator is zero and the lines are perpendicular (90 degrees). The calculator shows this angle alongside the intersection coordinates.

Sources

Written by Dr. Rajiv Menon, PhD Applied Mathematician · Bengaluru, India

Applied mathematician bridging algebraic theory and computational tools for students, engineers, and everyday problem-solvers.

Search 3,500+ calculators

Loading search…