Cosine Similarity Calculator
Enter two vectors as comma-separated numbers and instantly get their cosine similarity score, angle, and supporting calculations.
Use the Cosine Similarity Calculator
Vector Inputs
Quick Examples
Enter two vectors on the left and click Calculate.
Cosine Similarity
—
-101
Angle
—
degrees
Dot Product
—
A · B
|A| Magnitude
—
‖Vector A‖
|B| Magnitude
—
‖Vector B‖
Computation Breakdown
cos(θ) = A · B / (‖A‖ × ‖B‖)
—
Copied!
Summary
Enter two vectors as comma-separated numbers and instantly get their cosine similarity score, angle, and supporting calculations.
How it works
- Enter the first vector as comma-separated numbers (e.g. 1, 2, 3).
- Enter the second vector with the same number of dimensions.
- Click Calculate (or press Enter) to run the computation.
- The tool computes the dot product of the two vectors.
- It divides the dot product by the product of both magnitudes.
- The result is displayed as a similarity score (-1 to 1) and the angle in degrees.
Use cases
- Compare document embeddings in natural language processing.
- Measure similarity between user preference vectors in recommendation systems.
- Validate machine learning feature vectors during model development.
- Compute angles between vectors in physics and engineering problems.
- Check how closely two sets of survey ratings align.
- Debug cosine similarity implementations in your own code.
- Explore vector mathematics interactively for learning purposes.
Frequently Asked Questions
Last updated: 2026-09-22 ·
Reviewed by Nham Vu