Intersection of Two Lines Calculator: Find Where They Meet
ByMuhammad Ali•Founder of KruskalCode
22:10
6 min read

Understanding where two lines cross is a fundamental concept in algebra and geometry. Whether you're solving a system of equations, analyzing graphs, or tackling homework problems, finding the intersection point is a common task. This guide will walk you through the process, explain the underlying formula, and show you how to use our free online calculator to get your answers quickly.
Explanation
When two distinct lines are drawn on a coordinate plane, they will either be parallel (never meeting) or they will intersect at exactly one unique point. At this special point, both lines share the same x and y coordinates. To find this point mathematically, we set the equations of the two lines equal to each other. This creates a single equation with one variable (x), which we can then solve. Once we have the x-coordinate, we substitute it back into either original line equation to find the corresponding y-coordinate.
Formula
For two lines given in slope-intercept form: Line 1: y = m₁x + b₁ Line 2: y = m₂x + b₂ 1. Set the y-values equal to each other: m₁x + b₁ = m₂x + b₂ 2. Rearrange to solve for x: m₁x - m₂x = b₂ - b₁ x(m₁ - m₂) = b₂ - b₁ x = (b₂ - b₁) / (m₁ - m₂) 3. Substitute the value of x back into either Line 1 or Line 2 to find y: y = m₁(x) + b₁ (or y = m₂(x) + b₂)
Example
Let's work through an example. Suppose you have the following two linear equations: Line A: y = 3x + 5 Line B: y = -2x + 10 Here, for Line A, m₁ = 3 and b₁ = 5. For Line B, m₂ = -2 and b₂ = 10. Step 1: Set the equations equal: 3x + 5 = -2x + 10 Step 2: Solve for x: 3x + 2x = 10 - 5 5x = 5 x = 1 Step 3: Substitute x = 1 into either equation (let's use Line A): y = 3(1) + 5 y = 3 + 5 y = 8 So, the intersection point of Line A and Line B is (1, 8).
How to use the related calculator
Using our Intersection of Two Lines Calculator is straightforward. First, make sure your two line equations are in the standard slope-intercept form: `y = mx + b`. Once you have them in this format, identify the slope (m) and the y-intercept (b) for each line. Enter the slope of your first line into the 'Slope of Line 1 (m₁)' field and its y-intercept into the 'Y-intercept of Line 1 (b₁)' field. Do the same for your second line using the 'm₂' and 'b₂' fields. Click 'Calculate', and the tool will instantly display the x and y coordinates where the two lines intersect, or tell you if they are parallel or identical.
Try the related calculator
Open toolFAQ
Can this calculator handle negative slopes or intercepts?
Yes, absolutely! Our calculator is designed to work with both positive and negative values for slopes (m) and y-intercepts (b). Just enter the numbers as they appear in your equations.
What if the lines don't intersect?
If the lines have the same slope but different y-intercepts, they are parallel and will never intersect. The calculator will correctly identify this situation and tell you there are no intersection points.
Is this tool useful for systems of linear equations?
Yes, finding the intersection of two lines is exactly how you solve a system of two linear equations graphically. The (x, y) point of intersection represents the unique solution that satisfies both equations simultaneously.
What if one of my lines is vertical (e.g., x = 5)?
The calculator currently works with lines in slope-intercept form (y = mx + b). A vertical line has an undefined slope and cannot be written in this form. For such cases, you would typically substitute the x-value of the vertical line directly into the other line's equation to find y.
Related articles

About the author
Muhammad Ali. Muhammad Ali is a full-stack developer and founder of KruskalCode. He builds SaaS platforms and automation systems with React and Laravel, and helps teams ship fast, scalable tools.
Need a custom calculator, dashboard, or automation workflow? Reach out to KruskalCode.