Enter two lines as equations, as two points each, or as slope and intercept to find the exact point where they cross. Parallel and identical lines are detected, and every answer comes with Cramer's rule working, the angle between the lines and a graph.
Last updated:
How are the lines given?
Line 1
Any linear form: y = 2x − 1, 3x + 4y = 12, x = 5, y − 2 = 3(x − 1)
Line 2
Enter your values to see the result.
Advertisement
Advertisement
How to use the Line Intersection Calculator
Choose how your lines are given: equations, two points on each line, or slope and y-intercept.
Enter line 1 and line 2. Fractions like 1/2x and brackets like 3(x − 1) are fine in equations.
Read the intersection point at the top, shown as a fraction when it is exact.
Check the working to see the determinants and the substitution check.
Look at the graph and the comparison table, then copy the results or download the table as CSV.
Intersection formulas
For two lines in standard form A₁x + B₁y = C₁ and A₂x + B₂y = C₂, the determinant D = A₁B₂ − A₂B₁ decides what happens. If D is not zero the lines cross at exactly one point. If D is zero the lines have the same direction, and they are either parallel or the same line.
Lines given as
Intersection point
No single point when
A₁x + B₁y = C₁ and A₂x + B₂y = C₂
x = (C₁B₂ − C₂B₁) ÷ D, y = (A₁C₂ − A₂C₁) ÷ D
D = A₁B₂ − A₂B₁ = 0
y = m₁x + b₁ and y = m₂x + b₂
x = (b₂ − b₁) ÷ (m₁ − m₂), y = m₁x + b₁
m₁ = m₂
x = k and y = mx + b
(k, mk + b)
never: a vertical and a non-vertical line always meet
Through points P₁, P₂ and P₃, P₄
Build each line with A = y₂ − y₁, B = x₁ − x₂, C = Ax₁ + By₁, then use the first row
the two segments point in the same direction
Worked example
Find where y = 2x − 1 and x + y = 5 meet. Rewrite the first line as 2x − y = 1, so A₁ = 2, B₁ = −1, C₁ = 1 and A₂ = 1, B₂ = 1, C₂ = 5.
D = 2 × 1 − 1 × (−1) = 3, which is not zero, so there is one intersection point.
x = (1 × 1 − 5 × (−1)) ÷ 3 = 6 ÷ 3 = 2.
y = (2 × 5 − 1 × 1) ÷ 3 = 9 ÷ 3 = 3.
Check: 2(2) − 1 = 3 and 2 + 3 = 5, so (2, 3) lies on both lines.
Tips
Lines are infinite, so two line segments may not actually touch even when their lines intersect. Check that the point lies between the endpoints if you are working with segments.
A slope written as a fraction is easiest to type as 3/4x or (3/4)x.
Rounded decimal inputs can make nearly parallel lines meet very far away. If the point looks surprising, check the slopes in the comparison table.
Frequently asked questions
How do you find the intersection of two lines?
Write both lines in the form Ax + By = C and solve them as a system of two equations. With Cramer's rule, D = A₁B₂ − A₂B₁, x = (C₁B₂ − C₂B₁) ÷ D and y = (A₁C₂ − A₂C₁) ÷ D. For y = 2x − 1 and x + y = 5 the lines meet at (2, 3).
How do I find the intersection when both lines are in y = mx + b form?
Set the right-hand sides equal: m₁x + b₁ = m₂x + b₂, so x = (b₂ − b₁) ÷ (m₁ − m₂). Substitute x into either equation to get y. This only works when the slopes are different.
What does it mean if two lines have no intersection?
In a plane, two different lines that never meet are parallel: they have the same slope but different y-intercepts. The determinant D is 0 and the system of equations has no solution.
What if both equations describe the same line?
If one equation is a multiple of the other, such as 2x − y = 3 and 4x − 2y = 6, the lines are coincident. Every point on the line is shared, so there are infinitely many intersection points.
How is the angle between two lines calculated?
For slopes m₁ and m₂, tan θ = |(m₂ − m₁) ÷ (1 + m₁m₂)|. When m₁ × m₂ = −1 the lines are perpendicular and the angle is 90°. The calculator also handles vertical lines by using the direction of each line.
Can I enter vertical lines?
Yes. Type x = 4 as an equation, or give two points with the same x-coordinate. A vertical line has an undefined slope, and the intersection with any non-vertical line is found the same way.
Is this the same as solving a system of linear equations?
Yes. The intersection point of two lines is the solution of the 2 × 2 system formed by their equations. For three or more equations or variables, use a system of equations solver.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.