Tools

Vector similarity calculator

Cosine similarity, dot product and Euclidean distance between embedding vectors, pasted from any model or API response.

Runs in your browserAI developer tools41.2K
Free

Input

0 B

Result

The result will appear here.

When a retrieval result looks wrong, the fastest way to understand it is to compute the score by hand. Paste two or more embedding vectors — straight from an OpenAI or Voyage response, a database row, or a notebook — and this calculator gives cosine similarity, cosine distance, dot product, Euclidean distance and the vector norms, the three metrics FAISS indexes expose. With more than two vectors you get a full similarity matrix, which is how you find out that your 'different' chunks are near-duplicates, or that your vectors were never normalised in the first place.

How it works

  • Accepts one vector per line (comma or space separated, optionally labelled), a JSON array of arrays, or a whole embeddings API response — the embedding fields are found automatically.
  • Dimensions must match; a mismatch is reported with the offending vector, since mixing models or truncated vectors is the usual cause.
  • The stats say whether every vector is unit length, which tells you whether dot product and cosine will agree for your model.

Where your data goes

Nowhere. This tool runs entirely in your browser: the text you paste is processed by the page and is never transmitted to a server or written to a log.

This tool is free and needs no account. Its results exist only in your open page and are not saved anywhere.

What it costs

This tool is free, with no sign-in and no points.

Common questions

Cosine or dot product — which should my index use?
If the model emits normalised vectors (OpenAI text-embedding-3, most sentence-transformers with normalize=True), they are identical and dot product is cheaper. If it does not, cosine ignores magnitude and is usually what you want for semantic similarity; dot product then rewards longer or more 'confident' vectors. The normalisation stat here tells you which case you are in.
What is a good cosine similarity?
It depends on the model more than on the texts. OpenAI's text-embedding-3 models produce scores clustered between 0.2 and 0.6 even for unrelated text, while older models and MiniLM spread wider. Compare a known relevant pair against a known irrelevant one from the same model to calibrate rather than trusting an absolute threshold.
How many vectors and dimensions can it handle?
Up to 64 vectors of any dimension — 3072-dimensional OpenAI vectors are fine. Everything is computed in your browser in double precision; nothing is uploaded.

The open-source behind it

This tool is a self-contained implementation. facebookresearch/faiss (MIT) does the same job as a library — if you need this behaviour inside your own program, start there rather than calling a web page.

facebookresearch/faiss

Also known as

  • cosine similarity calculator
  • embedding similarity online
  • vector distance calculator
  • dot product vs cosine similarity
  • euclidean distance vectors
  • compare embeddings