Embedding Similarity Calculator
Paste two comma-separated embedding vectors and get their cosine similarity instantly, with a plain-language interpretation of how closely related they are, computed entirely in your browser.
🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.
Example shown — paste your own comma-separated embedding vectors (same length).
How it works
- Paste two comma-separated lists of numbers — the output of any embedding model.
- Both vectors are parsed and validated to be the same length as you type.
- The cosine similarity, the angle between them in degrees, and a plain-language interpretation update instantly.
The formula
Cosine similarity is the dot product of two vectors divided by the product of their magnitudes:
similarity = (A · B) / (‖A‖ × ‖B‖)
The result ranges from -1 (pointing in exactly opposite directions) through 0 (unrelated, at a right angle) to 1 (pointing in exactly the same direction). Embedding-based search and recommendation systems typically treat scores above roughly 0.7-0.8 as "similar enough" to surface, though the right threshold depends on the model that produced the embeddings.
FAQ
What is cosine similarity, and why is it used for embeddings?
Cosine similarity measures the angle between two vectors rather than their raw distance, so it captures whether two embeddings point in the same direction regardless of magnitude. That makes it a good fit for embeddings, where the direction of the vector — not its length — is what tends to carry the semantic meaning.
Do the vectors need to be normalized first?
No — the formula divides by the magnitude of each vector, so it already accounts for vectors of different lengths. You can paste raw, un-normalized embedding output directly.
What size vectors can I compare?
Any length, as long as both vectors have exactly the same number of values — real embedding models commonly output 384, 768, or 1536 dimensions, and this tool handles any of those the same way it handles a short 5-value example.
Why did I get an error about a zero vector?
Cosine similarity divides by each vector's magnitude (its length). A vector of all zeros has zero magnitude and no direction, so the division is undefined — that's what the error is flagging, not a formatting mistake.
How we compare
| Feature | Online Tool Store | Python (numpy/scipy) | Vector database console |
|---|---|---|---|
| No file upload — runs in your browser | ✓ | ✓ | Depends on hosting |
| No install or environment setup | ✓ | Requires Python + libraries | Requires an account/cluster |
| Instant result while typing | ✓ | Manual (write and re-run a script) | Query-by-query |
| Shows angle + plain-language interpretation | ✓ | ✗ | ✗ |
A `numpy` one-liner computes the exact same number, but it means opening a terminal and writing code. This tool is for the quick check — pasting two vectors from a notebook, log, or API response and getting the score without leaving the browser.