Skip to content
Saha Hesap

Intersection of Two Lines Calculator

The point where two lines meet and the angle between them. Enter the lines as y = mx + n, ax + by + c = 0 or by two points each. Parallel and coincident cases are flagged.

How do you find where two lines intersect?

The point of intersection lies on both lines, so it satisfies both equations. The task is to solve two equations in two unknowns.

If the lines are y = m₁x + n₁ and y = m₂x + n₂, set the right sides equal: x = (n₂ − n₁) / (m₁ − m₂). Put that x back into either equation to get y.

Example

For y = 2x + 1 and y = −x + 4, 2x + 1 = −x + 4 gives 3x = 3, so x = 1. Then y = 2 × 1 + 1 = 3. The lines meet at (1, 3).

Solving in general form

If the lines are a₁x + b₁y + c₁ = 0 and a₂x + b₂y + c₂ = 0, compute the determinant first: D = a₁b₂ − a₂b₁. Then x = (b₁c₂ − b₂c₁) / D and y = (a₂c₁ − a₁c₂) / D. This route also works for vertical lines.

Parallel and coincident lines

A zero determinant means the lines have the same slope. Either they are parallel and never meet, or they are the same line and share every point. For parallel lines the calculator also gives the perpendicular distance between them.

Angle between the lines

From the slopes, tan φ = |(m₁ − m₂) / (1 + m₁m₂)|. The lines are perpendicular when the product of the slopes is −1.

Do the segments actually cross?

When you enter each line by two points, the calculator also says whether the intersection falls between those points or on an extension. That is how you check whether two grid lines, two pipe runs or two beams really clash in plan.

Limits

The calculator handles lines in a plane. For nearly parallel lines the intersection lies far away and a small input error changes the result a great deal.

Related calculators

Found a mistake or something missing?

If a value looks wrong, a size is missing or you need a feature, write to us and we will fix it.

Send an email