Line Intersection Calculator

    Find where two 2D lines intersect from standard form, slope-intercept form, or two points on each line. The calculator also detects parallel and coincident lines.

    Line 1
    Line 2

    How to Find the Intersection of Two Lines

    The intersection point of two lines is the solution of a two-equation linear system. This calculator accepts standard-form coefficients, slope-intercept form, or two points on each line.

    The tool works with infinite lines, not finite line segments. Segment intersection requires an extra boundary check after the line intersection is found.

    Graph as a check
    The plot is a visual check of the line positions. Exact coordinates come from the determinant calculation and substitution check.

    Line Intersection Formula

    A1, B1, A2, and B2 are line coefficients; Delta is the system determinant.

    xP is the x-coordinate of the intersection point.

    yP is the y-coordinate of the intersection point.

    A nonzero determinant means the lines have one intersection point. A zero determinant means they are parallel or coincident.

    Supported Line Inputs

    Input formBest forLimit
    Standard form coefficientsproblems already written as Ax + By +A and B cannot both be zero
    Slope and interceptknown slope and y-interceptvertical lines cannot be entered this way
    Two pointswhen no equation has been written yetthe two points must be distinct

    Parallel and Coincident Lines

    When the determinant is zero, there is no single intersection point. The calculator checks coefficient proportionality to distinguish parallel lines from the same line written twice.

    ConditionGeometryResult
    nonzero determinantlines crossone point
    zero determinant and different constantsparallel linesno intersection point
    zero determinant and proportional coefficientscoincident linesinfinitely many common points
    one vertical lineuse standard form or two pointsslope-intercept form is not available

    Worked Example

    Take two lines: + 1 and. After rewriting them in standard form, solve the system for the shared point.

    x and y are the coordinates of the shared point.

    The nonzero determinant confirms that the lines meet at one point.

    xP and yP are the coordinates of point P.

    Substitution checks that the point satisfies both original line equations.

    Common Mistakes

    • Expecting a free-form equation parser. This tool uses numeric coefficients, slope-intercept values, or point coordinates.
    • Entering a vertical line in slope-intercept mode. Use standard form or two points with the same x-coordinate instead.
    • Confusing infinite lines with finite segments. Segment boundaries are not checked here.
    • Using zero for both A and B in standard form, which does not define a line.
    • Using two identical points, which cannot define a unique line.
    • Ignoring rounding for nearly parallel lines, where a tiny determinant can make coordinates unstable.
    Numerical precision
    For nearly parallel lines, a small coefficient change can shift the intersection point a lot. The calculator warns when the determinant is very small.

    Frequently Asked Questions

    Sources and References

    Calculations are based on the listed reference sources. Links open in a new tab.

    Updated:

    Related Tools