Code tool

Angle Between Two Lines Calculator

Enter direction components for each line to calculate the smaller angle in degrees.

In-browser processingNo account requiredPrivacy details ↗

Angle between two lines

Enter nonzero direction vectors; result is the smaller angle from 0° to 90°.

Angle (degrees): —

A QUICK WALKTHROUGH

How to use this tool

  1. Enter the x and y direction components for line one.
  2. Enter the components for line two.
  3. Review the smaller angle from 0° to 90°.

Formula and convention

The smaller unoriented angle is θ=acos(|u·v|/(|u||v|)), reported in degrees from 0° to 90°. Each direction vector must be nonzero.

Ideal plane geometry

Direction vectors are in the same Cartesian plane. Local calculation only.

GOOD TO KNOW

Common questions

Why is the result at most 90°?

This calculator reports the smaller angle between unoriented lines.