Intersection of Lines Calculator

Where Two Paths Cross

Two non-parallel lines on a plane meet at exactly one point, and finding it is one of the oldest problems in coordinate geometry — it's the algebraic version of asking where two roads, two trajectories, or two trend lines cross. This calculator solves that point exactly, whether the lines are given as equations or as pairs of coordinates.

The Formula

With both lines in slope-intercept form, setting them equal and solving for x gives the intersection directly:

m1x + b1 = m2x + b2
x = (b2 − b1) / (m1 − m2)
y = m1x + b1

When lines are given as two points each, their slope and intercept are derived first with m = (y2−y1)/(x2−x1). If both slopes are equal, the lines are parallel: identical intercepts mean the lines coincide entirely (infinite intersections), and different intercepts mean they never meet.

Where This Matters

  • Break-even analysis — the point where a cost line and a revenue line cross marks the break-even quantity.
  • Navigation and surveying — two bearing lines from different observation points intersect at the object's location, a classic triangulation technique.
  • Computer graphics — detecting where two line segments (such as edges of shapes) cross is a core operation in collision detection and clipping.
  • Systems of two linear equations — the intersection point is precisely the solution to the corresponding 2×2 linear system.

How to Use This Calculator

  1. Choose how the lines are defined: Both Lines as y = mx + b or Both Lines as Two Points Each.
  2. For the slope-intercept mode, enter Line 1 Slope (m1), Line 1 Y-Intercept (b1), Line 2 Slope (m2), and Line 2 Y-Intercept (b2).
  3. For the two-points mode, enter Line 1's two points (X1, Y1, X2, Y2) and Line 2's two points (X1, Y1, X2, Y2 for the second line).
  4. Select Calculate to get the intersection coordinates, or a message noting the lines are parallel or identical.

Related Calculations

Start from raw coordinates with the Line Equation Calculator, or measure the angle formed at the crossing point with the Angle Between Lines Calculator.