CalcWorldHub
Free online calculator · no signup

Angle between two lines calculator

Find the smaller angle between two nonvertical straight lines from their finite slopes.

Angle between two lines calculator — First line slope m₁, Second line slope m₂ and calculation method
Angle between two lines calculator: inputs and calculation method.

How to use this calculator

Find the smaller angle between two nonvertical straight lines from their finite slopes.

  1. Enter First line slope m₁, Second line slope m₂. Match the units shown beside each field and review the result together with the assumptions below.
  2. Read the worked example below to check the expected input format and result.
  3. Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Calculation guide

How Angle between two lines calculator works

Find the smaller angle between two nonvertical straight lines from their finite slopes.

Inputs and units

  • First line slope m₁: Enter the first line's finite slope m₁; a vertical line has no finite slope and is not represented here.
  • Second line slope m₂: Enter the second line's finite slope m₂.

Formula and method

θ = atan2(|m₂−m₁|, |1+m₁m₂|), reported in degrees from 0° to 90°

Worked example

For slopes 1 and −1, the lines are perpendicular. atan2(2,0) gives 90°.

Interpreting the result

Parallel lines return 0° and perpendicular lines return 90°. The smaller undirected angle is reported.

Assumptions and limits

The slope form cannot represent a vertical line as a finite input. Slopes describe line orientation and do not require intercepts; rounding may affect nearly parallel or perpendicular cases.

Frequently asked questions

Why is the angle between slopes 1 and −1 equal to 90 degrees?

Their product is −1, so the lines are perpendicular.

Can I enter a vertical line?

No. Use a line-direction representation that accepts direction vectors if either line is vertical.

How do I use the Angle between two lines calculator?

Enter First line slope m₁, Second line slope m₂. Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Angle between two lines?

For slopes 1 and −1, the lines are perpendicular. atan2(2,0) gives 90°.

What does the Angle between two lines calculator calculate?

Find the smaller angle between two nonvertical straight lines from their finite slopes.

Related calculators