⌘ CodersEditor

All tools / AI tools

Cosine Similarity Calculator

Measure directional similarity between two numeric embedding vectors.

Vectors must have equal dimensions and nonzero norms.

How to use Cosine Similarity Calculator

Load the example, edit the input using the same format, and select Run. Review the output before copying or downloading.

Example input

{
  "a": [
    1,
    2,
    3
  ],
  "b": [
    2,
    4,
    6
  ]
}

Example output

{
  "cosineSimilarity": 1
}

Frequently asked questions

What does this tool do?

Measure directional similarity between two numeric embedding vectors.

What are the limitations?

Vectors must have equal dimensions and nonzero norms.

Does it call an AI API?

No. Tool processing runs in your browser. The site separately loads advertising and analytics scripts.

Related tools

Vector Distance Calculator

RAG Chunk Size Calculator

AI Training Dataset Validator