Don's Tools · Developers · Embedding & Vector Calculator

Embedding & vector calculator

Paste two embeddings or vectors to get cosine similarity, dot product, Euclidean and Manhattan distance, the angle between them and each magnitude, all in your browser.

-Cosine similarity (-1 to 1)
-Dot product
-Angle between (degrees)
-Euclidean distance
-Manhattan distance
-Magnitude |A| , |B|
-Dimensions
Embedding & Vector Calculator compares two vectors or embeddings and reports cosine similarity, dot product, the angle between them, Euclidean and Manhattan distance and the magnitude of each. Paste numbers separated by commas, spaces or new lines, or a JSON array copied straight from your code, and the results update live. It handles large embeddings such as 1536 dimensional vectors, and everything is calculated locally with nothing uploaded.

Frequently asked questions

Is anything uploaded or saved?

No. Both vectors are parsed and all the maths runs in your browser. Nothing you paste is sent anywhere or stored.

What formats can I paste?

Numbers separated by commas, spaces or new lines, or a JSON array like [0.1, -0.2, 0.3]. Surrounding square brackets are handled automatically, so you can paste an embedding straight from your code.

Which measures does it calculate?

Cosine similarity, the angle between the vectors, dot product, Euclidean and Manhattan distance, and the magnitude of each vector. Cosine similarity is the usual choice for comparing embeddings.

Why do I get a length error?

Cosine similarity, distance and dot product only make sense when both vectors have the same number of dimensions. Magnitudes are still shown for each, but the pair measures need equal length.

Can it handle large embeddings?

Yes. It comfortably handles long vectors such as 768, 1024 or 1536 dimensional embeddings, since it is plain arithmetic done locally.