Angle Calculator

The angle between two vectors in 2D or 3D — or the acute angle between two lines from their slopes.

100% FreeNo sign-upPrivate — runs in your browser
—

angle (degrees)

Angle (radians)
—
Method
—
Copied to clipboard

How to use this tool

1
Choose what to measure

Two vectors in 2D or 3D, or two lines given by their slopes.

2
Enter the components

Vector components, or the two slopes m1 and m2.

3
Read degrees and radians

Both are shown, so the answer works for homework and for code.

4
Check special cases

Perpendicular vectors give exactly 90°, parallel vectors 0° (or 180° if opposite).

Formula & worked example

Vector angle: cos θ = (a·b) ÷ (|a||b|). Line angle: tan θ = |(m2 − m1) ÷ (1 + m1m2)|, taking the acute angle.

(1, 0) and (0, 1) are perpendicular: 90°. In 3D, (1, 2, 3) and (4, 5, 6) give cos θ = 32 ÷ √(14 × 77) ≈ 0.9746, so θ ≈ 12.93°.

Limitations — read this before you rely on it

The vector angle is always the smaller angle between the vectors (0° to 180°). For lines, the acute angle (0° to 90°) is returned; perpendicular lines are exactly 90°.

Frequently asked questions

Use the dot product: cos θ = (a·b) ÷ (|a| × |b|), then take arccos. This calculator does all three steps.

90° — they are perpendicular, and their dot product is 0.

Yes — switch to 3D mode and enter z components. The same dot-product formula extends naturally.

From slopes: tan θ = |(m2 − m1) ÷ (1 + m1m2)|. Slopes 1 and −1 give 90° (perpendicular lines).

Because the angle between vectors is defined as the smaller rotation that takes one to the other, from 0° to 180°.