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.

Copied!

Summary

Cosine similarity measures the cosine of the angle between two non-zero vectors in an inner product space, giving a value between -1 and 1. A score of 1 means the vectors point in exactly the same direction, 0 means they are orthogonal (perpendicular), and -1 means they point in opposite directions. It is widely used in NLP, recommendation systems, and machine learning to quantify how similar two data points are regardless of their magnitude.

How it works

  1. Enter the first vector as comma-separated numbers (e.g. 1, 2, 3).
  2. Enter the second vector with the same number of dimensions.
  3. Click Calculate (or press Enter) to run the computation.
  4. The tool computes the dot product of the two vectors.
  5. It divides the dot product by the product of both magnitudes.
  6. 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-05-29 · Reviewed by Nham Vu