What This Calculator Does
This tool finds the angle formed where two straight lines cross, using only the slopes of the lines. Enter the slope of Line 1 (\(m_1\)) and the slope of Line 2 (\(m_2\)), and it returns the acute angle between them in both degrees and radians. It works for any real slope values and automatically detects perpendicular lines.
How to Use It
1. Determine each line's slope. If a line is written as \(y = mx + b\), the slope is \(m\). If you have two points, \(\text{slope} = (y_2 - y_1)/(x_2 - x_1)\). 2. Type \(m_1\) and \(m_2\) into the fields. 3. Read the angle. The calculator always reports the acute angle (0° to 90°) between the lines.
The Formula Explained
The angle \(\theta\) between two lines is given by $$\theta = \arctan\left| \frac{\text{m}_1 - \text{m}_2}{1 + \text{m}_1 \cdot \text{m}_2} \right|$$ The numerator measures how much the slopes differ; the denominator accounts for how the lines are oriented. When \(1 + m_1 \cdot m_2 = 0\), the expression is undefined because the lines are exactly perpendicular — in that case the angle is 90°. The absolute value guarantees the answer is the acute angle rather than its obtuse supplement.
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 \cdot m_2} = \frac{1 - 0}{1 + 0} = 1,$$ so \(\theta = \arctan(1) = 45°\). A line with slope 1 indeed makes a 45° angle with the horizontal axis.
FAQ
What if the lines are parallel? If \(m_1 = m_2\), the numerator is 0, so \(\theta = 0°\). Parallel lines have no angle between them.
How do I handle a vertical line? Vertical lines have an undefined slope, so this slope-based formula does not apply directly. Use the angle each line makes with the x-axis instead.
Why is the answer always acute? Two crossing lines form two pairs of equal angles that sum to 180°. The absolute value in the formula selects the smaller (acute) one, which is the conventional "angle between" the lines.