Cosine Similarity Calculator
Enter two numeric vectors and instantly get their cosine similarity score, dot product, and magnitudes.
Input Vectors
Quick Examples
Enter two vectors and click Calculate
Cosine Similarity
—
-10+1
Dot Product
—
A · B
|A| Magnitude
—
‖Vector A‖
|B| Magnitude
—
‖Vector B‖
Angle Between Vectors
theta = arccos(similarity)
—
deg
Step-by-Step
Copied!
Summary
Enter two numeric vectors and instantly get their cosine similarity score, dot product, and magnitudes.
How it works
- Enter two numeric vectors of the same dimension as comma-separated numbers.
- The tool computes the dot product A · B and each vector magnitude (Euclidean norm).
- It divides the dot product by the product of the magnitudes to get the cosine of the angle.
- The result is the similarity score from -1 to 1, plus the angle in degrees and radians.
Use cases
- Measure document or text similarity in NLP and information retrieval.
- Compare user preference vectors in recommendation systems.
- Evaluate word embeddings and semantic similarity between sentences.
- Assess feature vector similarity in machine learning models.
- Verify cosine distance calculations in data science projects.
Frequently Asked Questions
Last updated: 2026-06-10 ·
Reviewed by Nham Vu