Line Intersection Calculator
Enter two points for each line. The tool handles vertical lines, parallel lines, and overlapping (coincident) lines.
Line 1
Line 2
What is an intersection calculator?
An intersection calculator finds where two geometric objects meet. In this page, we focus on the most common case: the intersection point of two lines in a 2D coordinate plane. You define each line using two points, and the calculator determines whether the lines cross at one point, never cross (parallel), or overlap completely (coincident lines).
This can save time in algebra, analytic geometry, coding projects, engineering sketches, and data visualization workflows. Instead of solving equations manually each time, you can quickly test coordinates and confirm results.
How to use this intersection calculator
Step-by-step
- Enter coordinates for Line 1: points A(x1, y1) and B(x2, y2).
- Enter coordinates for Line 2: points C(x3, y3) and D(x4, y4).
- Optionally check finite line segments mode if you only care about the segment endpoints, not the full infinite lines.
- Click Calculate Intersection.
- Read the output: exact intersection point or a message describing the relationship between lines.
How the math works (quick version)
Each line is represented by two points. The calculator uses a determinant-based formula to compute the intersection:
denominator = (x1 - x2)(y3 - y4) - (y1 - y2)(x3 - x4)
- If the denominator is 0, the lines are parallel or coincident.
- If the denominator is not 0, there is one unique intersection point
(px, py).
This method is robust and handles vertical lines without needing slope-only formulas, which can fail when slope is undefined.
Parallel, coincident, and segment-only cases
Parallel lines
Parallel lines have the same direction and never meet. The calculator will clearly label this case.
Coincident lines
Coincident lines lie on top of each other. That means infinitely many intersection points, not just one.
Finite segment mode
In normal mode, the calculator treats lines as infinitely long. In segment mode, it checks whether the computed intersection point is actually inside both endpoint ranges. If not, it reports that the segments do not intersect, even though the extended lines would.
Practical uses
- Math classes: Verify hand-solved coordinate geometry problems.
- Programming: Collision checks, path crossing, and map logic.
- Engineering and CAD: Quick line-crossing sanity checks.
- Data analysis: Identify crossing trends on plotted lines.
- Game development: Ray/segment interactions and movement boundaries.
Common input mistakes to avoid
- Using the same point twice for one line (for example, A and B identical).
- Confusing line intersection with segment intersection mode.
- Typing commas instead of decimal points in numeric fields.
- Assuming near-parallel lines are exactly parallel due to rounding.
Final thoughts
A reliable intersection calculator gives immediate feedback and helps build intuition about line behavior. Try a few test inputs: crossing lines, vertical/horizontal combinations, parallel lines, and overlapping lines. The more cases you test, the more confident you become with both the geometry and the underlying algebra.