Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Acute Angle Between Lines
45
degrees
Acute angle 45°
Obtuse angle 135°

What Is the Angle Between Two Lines?

When two straight lines cross, they form two pairs of angles — an acute angle and its supplementary obtuse angle. This calculator computes that intersection angle directly from the slopes of the two lines, \(m_1\) and \(m_2\), without needing to graph them. It is a staple tool in coordinate geometry, trigonometry, surveying, and computer graphics.

Two intersecting straight lines forming an acute angle theta and its supplementary obtuse angle
Two intersecting lines form a pair of angles: an acute angle θ and its obtuse supplement.

How to Use the Calculator

Enter the slope of the first line (\(m_1\)) and the slope of the second line (\(m_2\)). The slope is the "rise over run" of each line — for the equation \(y = mx + b\), \(m\) is the slope. Click calculate and you'll see the acute angle in degrees, plus the supplementary obtuse angle.

The Formula Explained

The angle θ between two lines is found with:

$$\theta = \arctan\left(\left|\frac{m_1 - m_2}{1 + m_1 m_2}\right|\right) \times \frac{180}{\pi}$$

The absolute value guarantees a non-negative tangent, which yields the acute angle. The result from arctan is in radians, so we multiply by \(\frac{180}{\pi}\) to convert to degrees. A special case occurs when \(1 + m_1 m_2 = 0\): the denominator is zero, the lines are perpendicular, and the angle is exactly 90°. This calculator handles that case automatically.

Advertisement
Two lines on a coordinate grid with slopes m1 and m2 and inclination angles to the x-axis
Each line's slope relates to its inclination angle; the formula combines m₁ and m₂ to find θ.

Worked Example

Suppose line 1 has slope \(m_1 = 1\) and line 2 has slope \(m_2 = 0\) (a horizontal line). Then $$\frac{m_1 - m_2}{1 + m_1 m_2} = \frac{1 - 0}{1 + 0} = 1.$$ So \(\theta = \arctan(1) = 45^\circ\). The obtuse angle is \(180 - 45 = 135^\circ\).

Advertisement

Key Terms & Variables

Slope (m)
The steepness of a line, defined as the ratio of vertical change to horizontal change, \(m = \dfrac{\Delta y}{\Delta x}\). A larger magnitude means a steeper line; a positive slope rises left-to-right while a negative slope falls.
Inclination angle
The angle a single line makes with the positive x-axis, measured counterclockwise. It relates to slope by \(m = \tan(\alpha)\). The angle between two lines is the difference of their inclination angles.
Acute angle
An angle less than \(90^\circ\). The absolute value in the tangent formula always produces the acute angle between two intersecting lines.
Obtuse (supplementary) angle
An angle between \(90^\circ\) and \(180^\circ\). Two intersecting lines form both an acute angle \(\theta\) and its supplement \(180^\circ - \theta\); together they account for the four angles at the crossing point.
Arctangent (inverse tangent, tan⁻¹)
The function that returns the angle whose tangent equals a given value, \(\theta = \tan^{-1}(x)\). Its principal range is \(-90^\circ\) to \(90^\circ\), so applied to a non-negative input it yields an acute angle.
Perpendicular lines
Two lines meeting at \(90^\circ\). For non-vertical lines this occurs when \(m_1 m_2 = -1\), which makes the denominator \(1 + m_1 m_2 = 0\) and the tangent undefined.
Parallel lines
Two lines that never intersect and have equal slopes, \(m_1 = m_2\). The formula then gives a numerator of 0, so \(\theta = \tan^{-1}(0) = 0^\circ\).

FAQ

What if the lines are parallel? Parallel lines have equal slopes (\(m_1 = m_2\)), giving \(\theta = 0^\circ\).

How do I enter a vertical line? A vertical line has an undefined slope, so it can't be entered directly. Instead, swap which line is vertical by using a very large slope, or reformulate the problem.

Why two answers? Two intersecting lines always create both an acute and an obtuse angle that sum to 180°. The acute angle is the conventional "angle between" the lines.

Last updated: