📐Angle Between Two Lines Calculator

Calculate the acute or obtuse angle formed by two lines from their slopes or equations

m1
m2

How to Use the Angle Between Two Lines Calculator

When two lines cross on a plane, they form both an acute angle and an obtuse angle at the intersection. By convention, this calculator reports the smaller one — the acute angle, between 0 and 90 degrees. Just enter each line's slope (m1, m2); if you have an equation in y=mx+k form, the coefficient of x is the slope, so plug that in directly.

The formula is tan(θ) = |(m2-m1) / (1+m1×m2)|, and taking the arctan of that value gives the angle (θ). If the two slopes are equal (m1=m2), the lines are parallel and the angle is 0 degrees. If the product of the slopes equals -1 (1+m1×m2=0), the lines are perpendicular and the angle is 90 degrees. Outside those two special cases, the formula above gives the exact acute angle.

This method assumes both lines have a defined slope (i.e., neither is vertical). It's commonly used to estimate the angle where two roads intersect, or to quickly check the angle between two vectors or line segments in graphics programming.

Frequently Asked Questions

Why is the angle 0 degrees when the slopes are equal?

Two lines with equal slopes are parallel, so they never meet at an angle, which is why the result is 0 degrees.

Is the angle always 90 degrees when the lines are perpendicular?

Yes. When the product of the two slopes equals -1 (m1×m2=-1), the lines are perpendicular and the angle between them is always 90 degrees.