Line Intersection Calculator

Find the intersection point of two lines from standard form, slope-intercept form, or two points on each line. The calculator shows exact fractions, decimal approximations, worked steps, and handles parallel, coincident, vertical, and line-segment cases locally in your browser.

Lines & Actions

Editable example loaded: x + y = 5 and x - y = 1.

Line 1

Line 2

Intersection = -

Step-by-step solution

Enter two lines and calculate to see the algebra.
Calculation method: The solver converts every input to Ax + By = C, uses Cramer's rule with determinants, keeps exact rational arithmetic for displayed fractions, handles vertical lines in standard and point modes, detects parallel and coincident lines, and runs locally in your browser.

Preview

Line 1 Line 2 Intersection
Graph text: editable example lines are x + y = 5 and x - y = 1.

Advertisement

Find the intersection point of two lines

This calculator solves two linear equations and shows the exact ordered pair when the lines cross at one point. It supports Ax + By = C, y = mx + b, and coordinate pairs that define each line. In two-point mode, it can also check whether the crossing belongs to both finite segments.

How to use the calculator

  1. Choose the input mode: standard form, slope-intercept form, or two points on each line.
  2. Enter both lines using coefficients, slopes and intercepts, or coordinate pairs.
  3. Optionally turn on the line segments check in two-point mode.
  4. Press Calculate Intersection or press Enter in a field to solve the system.
  5. Review the exact fraction result, decimal approximation, worked algebra, verification, graph preview, and any parallel, coincident, or segment message.

Why the determinant decides the answer

After both lines are written as A1x + B1y = C1 and A2x + B2y = C2, the determinant Delta = A1B2 - A2B1 shows whether a unique solution exists. If Delta is not zero, Cramer's rule gives the intersection. If Delta is zero, the lines are either parallel or coincident.

Worked Line Intersection Examples

Slope-intercept form

y = 2x + 1 and y = -x + 7 become -2x + y = 1 and x + y = 7. Solving gives (2, 5).

y = mx + b

Standard form

2x + 3y = 13 and x - y = 1 have Delta = -5, so x = 16/5 and y = 11/5.

exact fractions

Vertical line

x = 3 is 1x + 0y = 3. With y = 2x - 1, the intersection is (3, 5).

vertical line

Parallel lines

y = 2x + 1 and y = 2x - 4 have the same slope but different intercepts, so they never meet.

no solution

Coincident lines

2x + 2y = 10 and x + y = 5 describe the same infinite line, so there are infinitely many intersections.

same line

Two-point input

Line 1 through (0, 0) and (4, 4), and Line 2 through (0, 4) and (4, 0), cross at (2, 2). With segment mode on, both parameters are 1/2.

segments

Line Intersection: Frequently Asked Questions

How do I find the intersection from y=mx+b?

Enter each line's slope m and intercept b in slope-intercept mode. The calculator converts y=mx+b to -mx+y=b and solves the two equations with determinants.

How do I find the intersection from two points on each line?

Choose the two-points mode and enter two coordinates for Line 1 and two coordinates for Line 2. The calculator builds each line from the point pairs, then solves for their crossing point.

What happens with vertical lines?

Vertical lines work in standard form and two-point mode. A vertical line such as x=3 is represented as 1x+0y=3.

How can I tell if two lines are parallel?

After converting both lines to A1x+B1y=C1 and A2x+B2y=C2, the calculator checks Delta=A1B2-A2B1. If Delta is zero and the constants do not match proportionally, the lines are parallel.

What do coincident lines mean?

Coincident lines are the same infinite line written in equivalent forms. They have infinitely many intersection points instead of one unique point.

Why is there no solution?

There is no solution when the two lines are parallel and distinct. They have the same direction but different positions, so they never meet.

Does this work for line segments?

Yes. In two-point mode, turn on the line segments option to check whether the infinite-line intersection lies within both finite segments. The calculator also reports the segment parameters t and u.

Is my data private?

Everything runs locally in your browser. No line equations or coordinates are uploaded.

Explore more tools