BIZOMAT MAKEOS · Geometry

Straight Lines: Intersection, Angle and Distance

Where do these two lines cross, at what angle, and how far is a point from the first line?

Analytical geometry of straight lines each defined by two points: slopes and intercepts, the intersection point, the angle between the lines, and the perpendicular distance and foot of the perpendicular from a point to the first line.

Open the calculatorRuns in your browser. No account needed.

How this tool works

Inputs, units and where to find them

InputUnitTypical source
Line 1
x₁mmFirst point on line 1.
y₁mmFirst point on line 1.
x₂mmSecond point on line 1.
y₂mmSecond point on line 1.
Line 2
x₃mmFirst point on line 2.
y₃mmFirst point on line 2.
x₄mmSecond point on line 2.
y₄mmSecond point on line 2.
Point
Point xmmPoint whose distance from line 1 is wanted.
Point ymmPoint whose distance from line 1 is wanted.

What each input means

Open an input to see what it is, its units, the worked example and the common mistakes, with a small diagram.

Line 1

What this means: x₁
Illustration: x₁A bar with a dimension line and arrows from one end to the other, marking the length x₁.x₁Example: 0 mmx₁
What it is
The horizontal coordinate of the first point that defines line 1, measured from your chosen origin.
Units and format
Enter a number in mm: millimetres. Negative values are accepted. Required: the tool does not calculate until every input is valid.
Example
The form opens with 0 mm as a worked example. It is an illustration, not a recommended value: replace it with your own figure.
Get it right
All eight line coordinates and the point must use the same origin and axes.
What this means: y₁
Illustration: y₁A block with a vertical dimension line from its base to its top, marking the height y₁.y₁Example: 0 mmy₁
What it is
The vertical coordinate of the first point that defines line 1, measured from the same origin as the x values.
Units and format
Enter a number in mm: millimetres. Negative values are accepted. Required: the tool does not calculate until every input is valid.
Example
The form opens with 0 mm as a worked example. It is an illustration, not a recommended value: replace it with your own figure.
Get it right
Coordinates below or left of the origin are negative.
What this means: x₂
Illustration: x₂A bar with a dimension line and arrows from one end to the other, marking the length x₂.x₂Example: 100 mmx₂
What it is
The horizontal coordinate of the second point on line 1. The line runs through both points and extends beyond them.
Units and format
Enter a number in mm: millimetres. Negative values are accepted. Required: the tool does not calculate until every input is valid.
Example
The form opens with 100 mm as a worked example. It is an illustration, not a recommended value: replace it with your own figure.
Get it right
The second point must differ from the first, or line 1 is undefined.
What this means: y₂
Illustration: y₂A block with a vertical dimension line from its base to its top, marking the height y₂.y₂Example: 50 mmy₂
What it is
The vertical coordinate of the second point on line 1, which with the first point fixes the line’s slope.
Units and format
Enter a number in mm: millimetres. Negative values are accepted. Required: the tool does not calculate until every input is valid.
Example
The form opens with 50 mm as a worked example. It is an illustration, not a recommended value: replace it with your own figure.
Get it right
A vertical line has equal x values; that is allowed and reported as vertical.

Line 2

What this means: x₃
Illustration: x₃A bar with a dimension line and arrows from one end to the other, marking the length x₃.x₃Example: 0 mmx₃
What it is
The horizontal coordinate of the first point that defines line 2.
Units and format
Enter a number in mm: millimetres. Negative values are accepted. Required: the tool does not calculate until every input is valid.
Example
The form opens with 0 mm as a worked example. It is an illustration, not a recommended value: replace it with your own figure.
Get it right
If line 2 is parallel to line 1 there is no intersection; the tool says so.
What this means: y₃
Illustration: y₃A block with a vertical dimension line from its base to its top, marking the height y₃.y₃Example: 80 mmy₃
What it is
The vertical coordinate of the first point that defines line 2.
Units and format
Enter a number in mm: millimetres. Negative values are accepted. Required: the tool does not calculate until every input is valid.
Example
The form opens with 80 mm as a worked example. It is an illustration, not a recommended value: replace it with your own figure.
Get it right
Use the same sign convention as line 1: up positive.
What this means: x₄
Illustration: x₄A bar with a dimension line and arrows from one end to the other, marking the length x₄.x₄Example: 80 mmx₄
What it is
The horizontal coordinate of the second point on line 2, which with the first fixes the direction of line 2.
Units and format
Enter a number in mm: millimetres. Negative values are accepted. Required: the tool does not calculate until every input is valid.
Example
The form opens with 80 mm as a worked example. It is an illustration, not a recommended value: replace it with your own figure.
Get it right
The two points on line 2 must not coincide.
What this means: y₄
Illustration: y₄A block with a vertical dimension line from its base to its top, marking the height y₄.y₄Example: 0 mmy₄
What it is
The vertical coordinate of the second point on line 2.
Units and format
Enter a number in mm: millimetres. Negative values are accepted. Required: the tool does not calculate until every input is valid.
Example
The form opens with 0 mm as a worked example. It is an illustration, not a recommended value: replace it with your own figure.
Get it right
The intersection may lie outside the segments you drew; the lines are treated as endless.

Point

What this means: Point x
Illustration: Point xA bar with a dimension line and arrows from one end to the other, marking the length Point x.pxExample: 20 mmPoint x
What it is
The horizontal coordinate of a separate point whose perpendicular distance from line 1, and the foot of that perpendicular, are wanted.
Units and format
Enter a number in mm: millimetres. Negative values are accepted. Required: the tool does not calculate until every input is valid.
Example
The form opens with 20 mm as a worked example. It is an illustration, not a recommended value: replace it with your own figure.
Get it right
Distance is measured to line 1 only, not to line 2.
What this means: Point y
Illustration: Point yA block with a vertical dimension line from its base to its top, marking the height Point y.pyExample: 40 mmPoint y
What it is
The vertical coordinate of the separate point whose perpendicular distance from line 1 is wanted.
Units and format
Enter a number in mm: millimetres. Negative values are accepted. Required: the tool does not calculate until every input is valid.
Example
The form opens with 40 mm as a worked example. It is an illustration, not a recommended value: replace it with your own figure.
Get it right
A point on line 1 itself gives a distance of zero.

Method and formulas

  1. Each line in the form A x + B y = C from its two points; the intersection solves both (none when parallel).
  2. Angle between lines from their direction vectors.
  3. Distance from a point = |A x₀ + B y₀ − C| ÷ √(A² + B²).
  4. Example: the lines cross at (53.333, 26.667) at 71.565°.

Limitations

  • Plane geometry; each line needs two distinct points.
  • Example values are illustrations. Replace them with values for your actual task.

Typical uses

  • Find a theoretical sharp corner from two drawn edges
  • Check a CNC contour intersection
  • Measure the distance of a hole from an inclined edge

Who it is for

  • CNC programmers
  • Toolmakers
  • Design engineers

What you get

  • Intersection point
  • Angle between the lines
  • Distance from the point to line 1

Interpreting the result

  • Use the foot of the perpendicular as the gauging point when inspecting an edge position.

References

  • Machinery’s Handbook, 29th edition (Industrial Press, 2012), printed pp. 40–46. Topic reference; no source tables or recommended settings are reproduced.

BIZOMAT tools are screening and decision-support utilities. Verify important financial, engineering, safety, legal or operational decisions using appropriate professional standards and your organisation’s approved data.

Open the Straight Lines: Intersection, Angle and Distance calculator