Cosine Similarity Calculator

Your details

Number of components in each vector. Both vectors must have the same number of components.
First component of vector A.
Second component of vector A.
Third component of vector A.
First component of vector B.
Second component of vector B.
Third component of vector B.
Cosine SimilarityNearly identical direction
0.974632

Ranges from -1 (opposite) to +1 (identical direction)

Angle Between Vectors12.9332degrees
Cosine Distance0.025368
Dot Product32
Magnitude |A|3.741657
Magnitude |B|8.774964
0.974632
Opposite<-0.5Dissimilar-0.5-0Moderate0-0.5Similar0.5-0.95Identical dir.0.95+

Cosine similarity of 0.9746 - the vectors point in nearly the same direction.

  • The angle between the vectors is 12.93 degrees.
  • Cosine distance (1 - similarity) is 0.0254. Distance of 0 means identical direction, 2 means fully opposite.
  • Cosine similarity measures only the angle, not the length of the vectors. Scaling either vector by any positive constant leaves the similarity unchanged.
  • The dot product is 32.0000. Its sign matches the sign of the similarity because magnitudes are always positive.

Next stepIn NLP and search engines, vectors often represent word counts or TF-IDF weights, and a similarity above 0.7 typically indicates closely related documents.

= Powered by OnlyCalculators