Intersection of Two Lines Calculator

Find where two lines cross, or whether they are parallel or the same line. Enter y = mx + b or Ax + By = C. Free calculator with steps.

An intersection of two lines calculator finds the point where two lines cross. Enter each line as y = mx + b or as Ax + By = C and the calculator returns the intersection point, or tells you when the lines are parallel or are the same line.

Solving for the intersection is the same as solving a system of two linear equations, so this tool also works as a two-variable system solver.

This calculator needs JavaScript. Please enable it in your browser.

How the intersection of two lines is found

Using Cramer’s rule

Write both lines as Ax + By = C. Let D = A1B2 − A2B1. If D is not zero, the lines meet at one point.

x = (C1B2 − C2B1) ÷ D and y = (A1C2 − A2C1) ÷ D

Lines in slope-intercept form

If you know y = m1x + b1 and y = m2x + b2, set the right sides equal: x = (b2 − b1) ÷ (m1 − m2). Then put x back into either line to get y.

Parallel and identical lines

If D is zero the lines have the same slope. If their intercepts also match they are the same line and share every point. Otherwise they are parallel and never meet.

Worked examples

Example 1: standard form

Find where 2x + 3y = 12 and x − y = 1 meet. D = 2 × (−1) − 1 × 3 = −5.

x = (12 × (−1) − 1 × 3) ÷ (−5) = 3 and y = (2 × 1 − 1 × 12) ÷ (−5) = 2

The lines meet at (3, 2). Check: 2 × 3 + 3 × 2 = 12 and 3 − 2 = 1.

Example 2: slope-intercept form

Find where y = 2x + 1 and y = −x + 7 meet. Setting 2x + 1 = −x + 7 gives 3x = 6, so x = 2 and y = 5. The lines meet at (2, 5).

Example 3: parallel lines

y = 2x + 1 and y = 2x + 5 have the same slope but different intercepts, so they never meet.

Frequently asked questions

How do you find the intersection of two lines?

Solve the two equations together. Set the expressions for y equal to each other if both lines are in slope-intercept form, or use the elimination formulas for Ax + By = C.

What does it mean if there is no intersection?

The lines are parallel. They have the same slope but different y-intercepts, so they never cross.

What if the two equations describe the same line?

Then every point on the line is an intersection point. The calculator reports that the lines are the same line.

Can I use this to solve a system of equations?

Yes. Enter the two equations in Ax + By = C form. The intersection point is the solution to the system.

How do I enter a vertical line?

Use the Ax + By = C option with B = 0, for example 1x + 0y = 4 for the line x = 4.