Our free Cosine Similarity Calculator helps you quickly determine the similarity between two non-zero vectors. Used widely in data science, natural language processing, and information retrieval, it measures the cosine of the angle between two vectors, indicating their directional sameness rather than magnitude differences.
Formula:
The Cosine Similarity formula is defined as:
cos(θ) = (A ⋅ B) / (||A|| ||B||)
- A and B are the two vectors you wish to compare.
- A ⋅ B represents the dot product of vectors A and B.
- ||A|| represents the magnitude (Euclidean norm) of vector A.
- ||B|| represents the magnitude (Euclidean norm) of vector B.
Each vector is composed of dimensions, for example, A = [A1, A2, ..., An].