Skip to main content
Skip to calculator
Advertisement

Last updated: July 31, 2026

Intersection of Two Lines Calculator

Helpful
Not helpful
Save as image
Share
Embed
Cite
Write feedback

Formula

For y = m₁x + b₁ and y = m₂x + b₂, set the equations equal to solve x = (b₂-b₁)/(m₁-m₂), then substitute back to get y = m₁x + b₁.

Where:

  • m_1=Slope of line 1
  • b_1=Y-intercept of line 1
  • m_2=Slope of line 2
  • b_2=Y-intercept of line 2
  • x=X-coordinate of the intersection
  • y=Y-coordinate of the intersection
(x, y)y = m₁x + b₁y = m₂x + b₂x = (b₂ - b₁) / (m₁ - m₂)

Worked Examples

Positive and negative slopes

One rising line and one falling line intersect at a clean integer point.

  1. 1Set 2x - 1 = -x + 5.
  2. 2Solve 3x = 6, so x = 2.
  3. 3Substitute into y = 2x - 1 to get y = 3.
Final Answer: (x, y) = (2, 3)

Symmetric slopes

Lines with slopes 1 and -1 often intersect cleanly.

  1. 1Set x = -x + 4.
  2. 2Solve 2x = 4, giving x = 2.
  3. 3Substitute back to get y = 2.
Final Answer: (x, y) = (2, 2)

Parallel lines

Equal slopes mean the lines never meet unless they are identical.

  1. 1Compare slopes: m1 = 3 and m2 = 3.
  2. 2Because the slopes are equal and the intercepts differ, the lines are parallel.
  3. 3Parallel lines have no intersection point.
Final Answer: No intersection; the lines are parallel.

Decimal intersection

The formula also works smoothly with decimal slopes and intercepts.

  1. 1Compute x = (b2-b1)/(m1-m2) = (-1-1.5)/(0.5-(-2)) = -2.5/2.5 = -1.
  2. 2Substitute into y = 0.5(-1) + 1.5 = 1.
Final Answer: (x, y) = (-1, 1)

Introduction

Two non-parallel lines in slope-intercept form cross at exactly one point. This calculator solves that point directly from the slopes and y-intercepts, making it useful for algebra practice, graphing checks, and analytic geometry problems.

Start from slope-intercept form

Each line is written as y = mx + b, where m controls steepness and direction while b marks the vertical intercept. Because an intersection lies on both lines, both equations must give the same y-value at that x-coordinate.

Line 1:

y = m₁x + b₁

Line 2:

y = m₂x + b₂

Set the right-hand sides equal.

How the x-coordinate is derived

Equating the two line formulas gives m₁x + b₁ = m₂x + b₂. Rearranging isolates x and leads to the compact formula used by the calculator.

  • Move x-terms to one side.

  • Move constants to the other side.

  • Divide by m₁ - m₂ to get x = (b₂-b₁)/(m₁-m₂).

How the y-coordinate is found

Once x is known, substitute it into either original line equation. Both give the same y-value if the algebra is correct.

  • Use y = m₁x + b₁ or y = m₂x + b₂.

  • Round the final value for readability.

  • Check by plugging into the other equation if desired.

When lines do not intersect

If the slopes are the same, the denominator m₁ - m₂ becomes zero and the standard intersection formula breaks down. In that case the lines are parallel or identical.

  • Equal slopes with different intercepts means parallel lines.

  • Equal slopes with equal intercepts means the same line.

  • This calculator treats equal-slope inputs as no single intersection point.

The result is undefined for a unique point when the slopes match.

Geometric interpretation

The intersection point is the coordinate where the two graphs cross. In applications, that can represent a solution, a break-even point, a meeting location, or an equilibrium state.

  • In algebra, it solves a system of linear equations.

  • In economics, it can model equality of two trends.

  • In graphing, it confirms the visual crossing point.

Input rules and precision

All four values must be finite numbers. The calculator rounds the returned coordinates to six decimal places so that repeating decimals remain readable.

  • Integers and decimals are allowed.

  • Very close slopes may create a large x-value.

  • Use consistent units if the lines model real quantities.

Common mistakes to avoid

Typical mistakes include subtracting the intercepts in the wrong order or forgetting that identical slopes mean there is no unique solution.

  • Keep the formula order as (b₂-b₁)/(m₁-m₂).

  • Substitute back into one equation only after x is found.

  • Check whether the slopes are equal before expecting an answer.

FAQs

What if the two slopes are equal?

Then the lines are parallel or identical, so there is no unique intersection point. The calculator returns an error for that case.

Why can I substitute into either line to find y?

At the intersection, both line equations describe the same point, so both give the same y-value.

Can this calculator handle vertical lines?

No. Vertical lines are not written in slope-intercept form y = mx + b because their slope is undefined.

What does the intercept b represent?

It is the y-value where the line crosses the y-axis.

What does the slope m represent?

It describes how much y changes for each one-unit increase in x.

Can the intersection coordinates be negative?

Yes. Depending on the two lines, x, y, or both may be negative.

Why does a tiny slope difference create a large x-value?

Nearly parallel lines cross very far away, so dividing by a very small difference in slopes produces a large coordinate.

Does this solve systems of linear equations?

Yes. Two slope-intercept equations form a 2-by-2 linear system, and the intersection point is its solution.

Can I use decimal slopes and intercepts?

Yes. The calculator accepts finite decimal values for all four inputs.