Online Cosine Similarity Calculator

Calculate Cosine Similarity Between Two Vectors

Enter numbers separated by commas (e.g., 10, 20, 30, 40)
Ensure both vectors have the same number of dimensions for an accurate calculation.

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].

Mathematics and Tools

<b>90 Day </b>: Instantly Find Dates 90 Days From Today or Any Given Date

Go to Calculator

<b>Labor Force Participation Demographic Gap </b>: Compare Workforce Engagement Rates

Go to Calculator

1/4 Mile ET : Estimate Your Quarter Mile Elapsed Time

Go to Calculator

12 Volt Wire Size : Optimize Your DC Circuit Design

Go to Calculator

16:9 Aspect Ratio : Find Widescreen Dimensions

Go to Calculator

180 Day : Easily Find Dates 180 Days Forward or Back

Go to Calculator