How to use this calculator
Determine whether two finite planar segments cross, touch, overlap collinearly, or remain disjoint.
- Enter First segment x1 y1 x2 y2, Second segment x1 y1 x2 y2. Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Closed line segment intersection explained
A numerical walkthrough
First segment x1 y1 x2 y2 = 0, 0, 2, 2; Second segment x1 y1 x2 y2 = 0, 2, 2, 0.
- Intersection: Point (1, 1)
The model behind the numbers
Parametric intersection with endpoint bounds
Coordinates are finite with a relative geometric tolerance; zero-length segments are supported as points..
What to enter
a— First segment x1 y1 x2 y2- Four coordinates for segment 1 in the order x1,y1,x2,y2. Both endpoints are included; keep all coordinates in the same unit.
b— Second segment x1 y1 x2 y2- Four coordinates for segment 2 in the order x1,y1,x2,y2, using the same coordinate system and units as segment 1.
Interpreting the result
Coordinates are finite with a relative geometric tolerance; zero-length segments are supported as points.
Frequently asked questions
Are endpoints included?
Yes, segments are closed.
Can collinear segments intersect?
Yes, an overlap interval is reported.
Does the result describe infinite lines?
No, intersections outside the endpoints are excluded.
How do I use the Closed line segment intersection calculator?
Enter First segment x1 y1 x2 y2, Second segment x1 y1 x2 y2. Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Closed line segment intersection?
First segment x1 y1 x2 y2 = 0, 0, 2, 2; Second segment x1 y1 x2 y2 = 0, 2, 2, 0. Intersection: Point (1, 1)
Read our calculation methodology.