Cosine Similarity Calculator

Measure the cosine of the angle between two 3D vectors.

Cosine similarity 0.9746
Angle (°) 12.933

Formula: cosθ = (a · b) ÷ (|a| |b|)

Step-by-step with your numbers:
1. Values used:
2. a₁ = 1
3. a₂ = 2
4. a₃ = 3
5. b₁ = 4
6. b₂ = 5
7. b₃ = 6
8.
9. Cosine similarity = 0.9746
10. Angle = 12.933°
Did we solve your problem today?

Cosine similarity rates how aligned two vectors are, widely used in search and machine learning.

The math behind it

Divide the dot product by the product of the magnitudes. The result ranges from −1 (opposite) through 0 (perpendicular) to 1 (identical direction).

Worked example

(1,2,3) and (4,5,6) → cosine similarity ≈ 0.974 (about 13°).

FAQ

Does magnitude matter?

No — cosine similarity ignores length and measures direction only.