Line Intersection Calculator

Enter the slopes and intercepts of two lines to get their intersection point.

How it is calculated

Each line is entered as y = m·x + b, with slope m and y-intercept b. Setting the two equations equal gives x = (b₂ − b₁) / (m₁ − m₂), and substituting back gives y = m₁·x + b₁. All four numbers are plain real numbers (negative and decimal values work) and the coordinates use whatever unit your axes use. If the slopes are equal the lines are parallel or identical, so there is no single intersection and the tool returns no result. The values are rounded to two decimals for display. A vertical line such as x = 3 has no slope and cannot be entered in this form.

Worked example

Line 1 is y = 2x + 1 and line 2 is y = −0.5x + 6. Step 1: x = (6 − 1) / (2 − (−0.5)) = 5 / 2.5 = 2. Step 2: y = 2 × 2 + 1 = 5. Check with line 2: −0.5 × 2 + 6 = 5, which agrees. The lines meet at (2.00, 5.00).

Try this example →

Common mistakes

  • Swapping a slope with its intercept: for y = 2x + 1 the slope is 2 and the intercept is 1, not the reverse.
  • Dropping a minus sign, for example entering y = 3 − 2x as slope 2 instead of −2.
  • Entering two equal slopes and expecting a point; parallel lines never cross, and identical lines share every point.
  • Trying to enter an equation like 2x + 3y = 6 directly; rewrite it first as y = −(2/3)x + 2, so the slope is −0.6667.
  • Rounding the slope early; a small change in slope can move the crossing point a lot when the lines are nearly parallel.

About this calculator

This calculator solves for the point where two lines meet, each given in slope-intercept form, y = mx + b. Setting the two equations equal and solving gives the intersection's x-coordinate as x = (b₂ − b₁) ⁄ (m₁ − m₂), which is then substituted back in to get y. If the two slopes are equal, the lines are parallel and either never meet or are identical — the calculator gives no result in that case rather than a false coordinate.

Solving a system of two linear equations this way is a core skill in algebra and analytic geometry, and the same logic underlies applications from computer graphics (ray/line intersection) to break-even charts where two cost or revenue lines cross.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    Think of the lines as two price plans. A plan with 20 fixed and 0.10 per unit meets one with 5 fixed and 0.25 per unit at x = 100, y = 30: below 100 units the second is cheaper, above it the first. If the crossing lands at a negative x, the lines meet only outside the range that makes sense for your problem. What are your two lines modelling?

Popular calculators

All Calculators