Math

Cosine Similarity Calculator

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

Parameters Live Compute
Calculated Output
Cosine similarity 0.9746
Angle (°) 12.933
Formula: cosθ = (a · b) ÷ (|a| |b|)
Step-by-Step Breakdown
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 this calculator solve your problem today?
Report issue to loopingon.com
Sponsored

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°).

Frequently Asked Questions

Does magnitude matter?

No — cosine similarity ignores length and measures direction only.

Advertisement