All tools

Vector Similarity Calculator

AI / Agent

Compute cosine similarity, dot product, and Euclidean / Manhattan distance between two embedding vectors, right in the browser.

When a RAG pipeline retrieves the wrong chunk, the first thing to check is the raw similarity between the query embedding and the candidate embeddings, and this tool does exactly that. Paste two equal-length number vectors (as a JSON array or a plain comma or space separated list) and it returns cosine similarity, dot product, and both Euclidean and Manhattan distance, plus each vector's magnitude. Unlike the Rerank Chunks and Relevance Score tools, which work over raw text using keyword statistics, this operates on actual embedding vectors you already have from an external model, so it reflects the geometry your vector database sees. Cosine similarity ignores magnitude and is the usual metric for comparing embeddings, and it is reported as 0 when either vector is all zeros. It is pure arithmetic that runs entirely client-side, with no vectors sent anywhere.

embeddingcosinesimilarityvectorragretrieval

How to use Vector Similarity Calculator

  • 1.Paste your first embedding vector into Vector A as a JSON array like [0.1, 0.2, 0.3], or a plain comma / space separated list.
  • 2.Paste a second, equal-length vector into Vector B.
  • 3.Read the cosine similarity (the usual embedding metric), dot product, and distances; the two vectors must have the same number of dimensions.

Frequently asked questions

Which metric should I use for embeddings?
Cosine similarity is the standard choice because it measures direction and ignores magnitude, so two vectors pointing the same way score 1 regardless of length. Dot product and Euclidean distance are also shown for cases where magnitude matters.
Does it generate embeddings for me?
No. It only compares vectors you already have from an external embedding model; it does not call any model or produce embeddings from text.
What happens with a zero vector?
Cosine similarity is mathematically undefined when a vector has zero magnitude, so this tool returns 0 for cosine in that case while still reporting the dot product and distances.
Are my vectors uploaded anywhere?
No. All computation runs entirely in your browser; nothing is sent to a server.

Use via API, SDK, or MCP

cURL# Free: 1,000 req/day · Pro: 10,000 req/day
curl -X POST https://api.utilix.tech/v1/tools/vector-similarity \
  -H "Authorization: Bearer utx_live_..." \
  -H "Content-Type: application/json" \
  -d '{"a":[1,2,3],"b":[4,5,6]}'

Get an API key from your dashboard · Full API docs →