Angle Between Two Lines Calculator

Find the angle between two lines using their slopes with the tangent formula.

Enter Slopes

Result

Angle Between Lines
--
degrees
Slope m1--
Slope m2--
|m1 - m2|--
1 + m1 * m2--
tan(theta)--
Angle (radians)--
Acute angle--
Obtuse angle--

Step-by-Step Solution

tan(theta) = |m1 - m2| / (1 + m1 * m2)

Angle Between Two Lines Using Tangent

When two straight lines intersect, they form two pairs of vertically opposite angles. The acute angle between the lines can be calculated using the slopes of the lines and the tangent function. This is one of the most practical applications of the tangent in analytic geometry.

The Formula

Standard Formula

Given slopes m1 and m2, the tangent of the angle between them is:

tan(theta) = |m1 - m2| / (1 + m1*m2)

Perpendicular Lines

When m1 * m2 = -1, the denominator is zero and the lines are perpendicular (90 degrees).

m1 * m2 = -1 implies theta = 90 deg

Parallel Lines

When m1 = m2, the numerator is zero and the angle between the lines is 0 degrees.

m1 = m2 implies theta = 0 deg

How It Works

The slope of a line is the tangent of the angle it makes with the positive x-axis. So if line 1 makes angle alpha with the x-axis (tan(alpha) = m1) and line 2 makes angle beta (tan(beta) = m2), then the angle between them is |alpha - beta|. Using the tangent subtraction identity gives us the formula above.

Applications

  • Finding angles in coordinate geometry problems
  • Determining if two roads or paths are perpendicular
  • Engineering and architectural design calculations
  • Computer graphics and game development