Line Intersection Calculator

Two lines in a plane meet at exactly one point unless they are parallel. Solving the two equations together gives that point.

Also called: Intersection point calculator

  • Last updated
  • Formula tested against reference values

Your numbers

Equation form

Result

Intersection point (x, y)
—

Calculating…

Result
—
x
—
y
—
Acute angle between the lines
—

How to use this calculator

  1. Enter or choose equation form.
  2. The intersection point (x, y) updates as you type. Use Copy result or Share to keep it.

Method

For a₁x + b₁y = c₁ and a₂x + b₂y = c₂: D = a₁b₂ − a₂b₁; x = (c₁b₂ − c₂b₁) ÷ D; y = (a₁c₂ − a₂c₁) ÷ D; tan θ = |D| ÷ |a₁a₂ + b₁b₂|. y = mx + b is −mx + y = b.

a, b, c
coefficients of each line
m, b
slope and y-intercept
D
determinant; D = 0 means parallel or identical lines
θ
acute angle between the lines

Worked example

  1. Set the lines equal: 2x + 1 = −x + 4, so 3x = 3 and x = 1.
  2. Substitute: y = 2(1) + 1 = 3.
  3. Angle: tan θ = |(m₁ − m₂) ÷ (1 + m₁m₂)| = |3 ÷ (−1)| = 3, so θ ≈ 71.5651°.

The lines y = 2x + 1 and y = −x + 4 cross at (1, 3), at an angle of about 71.57°.

What the result means

The intersection is the one (x, y) pair that satisfies both equations, so this is also a way to solve a pair of simultaneous linear equations.

Assumptions and limits

  • Both lines lie in the same plane (2D).
  • A vertical line (x = constant) cannot be written as y = mx + b; use the ax + by = c form with b = 0.
  • Lines in 3D usually do not meet at all (they are skew); this tool covers the plane only.

Questions

How do I enter a vertical line such as x = 3?

Choose ax + by = c and enter a = 1, b = 0, c = 3.

When are two lines perpendicular?

When m₁ × m₂ = −1, or in standard form when a₁a₂ + b₁b₂ = 0.