What the Embedding Similarity Calculator does
This calculator compares two embedding vectors that you paste in as comma-separated numbers, and returns cosine similarity, Euclidean distance, Manhattan distance, the dot product and each vector's norm. It is a fast way to check a score that a vector database or a retrieval step handed you, without opening a notebook. The arithmetic runs in JavaScript inside the page, so vectors built from private documents never leave the browser tab.
A worked example: both boxes load with a pair of ten-dimension vectors, and pressing Calculate labels them Very Similar, with a cosine value close to 1 and a Euclidean distance under 0.1. Swap the second vector for one taken from an unrelated sentence and the label falls to Weakly Related or Dissimilar once the cosine drops under 0.5, while the two distance figures grow.
How to use it
- Paste Vector ACopy the numeric array out of your embedding API response and drop it into the first box. The parser reads values separated by commas, so keep the commas exactly as the API returned them.
- Paste Vector BPut the vector you want to compare into the second box. Both sides must hold the same number of values, because the tool refuses to score a mismatched pair and reports the two dimension counts instead.
- Press CalculateThe results table fills in straight away. The stats line underneath reports the dimension count, the dot product, and the norm of each vector, which tells you whether both sides came from the same model.
- Read the label lastCheck the raw numbers before the Interpretation row. The label is derived from cosine similarity alone, and the two distance values sit beside it with no verdict attached, so you decide what counts as close.
Options and formats
Things to watch out for
Frequently asked questions
Why does my pair return a dimension mismatch error?
The two boxes held different numbers of values. That normally means one vector was cut short while copying, or the two texts were embedded with different models or different truncation settings. Check the value count in each box, then re-embed the shorter text with the model that produced the other vector.
What cosine similarity counts as a good match?
It depends on the model and the corpus, so no single number is universal. With common text embedding models, paraphrases often score above 0.8, loosely related passages sit around 0.5 to 0.7, and unrelated text lands near zero. Use the built-in labels as a rough guide, then test pairs from your own data.
Should I look at cosine similarity or Euclidean distance?
Use cosine when the length of the text should not influence the score, which is the usual case for text embeddings. Use Euclidean distance when absolute position matters, such as comparing image features or checking whether two points sit in the same cluster. This page reports both so you can compare them side by side.
Does the tool normalise the vectors first?
No. Cosine similarity divides by both norms, so it returns the same value whether or not your vectors are already unit length. The Euclidean and Manhattan figures are raw distances, so they do change if you scale or shorten a vector before comparing.
Can I compare one vector against several candidates?
Not in a single run, because the page holds two boxes and scores one pair at a time. Keep the reference vector in the first box and paste each candidate into the second, noting the cosine value before you overwrite it. The Clear button empties both boxes.
Are my vectors sent to a server?
No. Parsing and arithmetic happen in JavaScript in the page, and nothing is posted anywhere. That matters when the text behind an embedding is confidential, because a similarity check on internal documents leaves no trace in a server log or an analytics record.