Skip to content
FiftyCalc Free calculators for all 50 states

Intersection of Two Lines Calculator

Test cases replayed : 4 of 4 match · Methodology · No outside source listed

Enter two lines in standard form ax + by = c to get their intersection point. For y = mx + k, enter a = −m, b = 1, c = k.

Result

Sample figures

Intersection x—

Intersection y —

  • Result—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Intersection of Two Lines Calculator

Line 1: a₁: enter a number. Prefilled example: 2.

Line 1: b₁: enter a number. Prefilled example: 1.

Line 1: c₁: enter a number. Prefilled example: 7.

Line 2: a₂: enter a number. Prefilled example: 1.

Line 2: b₂: enter a number. Prefilled example: -1.

Line 2: c₂: enter a number. Prefilled example: 2.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Line 1: a₁: enter a number.
  2. Line 1: b₁: enter a number.
  3. Line 1: c₁: enter a number.
  4. Line 2: a₂: enter a number.
  5. Line 2: b₂: enter a number.
  6. Line 2: c₂: enter a number.
  7. Read the result: Intersection x; the panel also shows Intersection y and Result.

How this calculator works

Two lines a₁x + b₁y = c₁ and a₂x + b₂y = c₂ form a 2×2 linear system. With the determinant D = a₁b₂ − a₂b₁, Cramer's rule gives x = (c₁b₂ − c₂b₁)/D and y = (a₁c₂ − a₂c₁)/D.

If D = 0 the lines have the same slope: they are parallel (no solution) or the same line (infinitely many solutions). A line in slope-intercept form y = mx + k is −mx + y = k.

The formula

  1. X={c1×b2−c2×b1a1×b2−a2×b1if a1×b2−a2×b1≠0−1otherwise
Symbols used in the formula
SymbolMeaning
a1Line 1: a₁
b1Line 1: b₁
c1Line 1: c₁
a2Line 2: a₂
b2Line 2: b₂
c2Line 2: c₂
XIntersection x

Worked example

Line 1: a₁2
Line 1: b₁1
Line 1: c₁7
Line 2: a₂1
Line 2: b₂-1
Line 2: c₂2
Intersection y1
ResultThe lines cross at one point
  1. X=7×−1−2×12×−1−1×1=3

Intersection x 3

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

Where do 2x + y = 7 and x − y = 2 intersect?

D = −3, x = 3 and y = 1, so the lines meet at (3, 1).

How can I tell if two lines are parallel?

They are parallel when a₁b₂ − a₂b₁ = 0, which means they have the same slope, and the equations are not multiples of each other.

Related calculators