Cosine Similarity Calculator

Compute cosine similarity between two vectors. Accepts raw JSON arrays (the format every embedding API returns) or comma-separated values. Returns the similarity score (-1 to 1; usually 0 to 1 for normalized embeddings) plus the dot product, magnitudes, and angle in degrees.

How to use the Cosine Similarity Calculator

Paste two vectors of equal length. Accepted formats: JSON array ([0.1, 0.2, ...]), comma-separated (0.1, 0.2, ...), or newline-separated. Most embedding APIs return normalized vectors where cosine similarity ranges 0-1; raw vectors range -1 to 1.

Interpretation

Cosine similarity measures the angle between two vectors, ignoring magnitude. For embeddings: 1.0 = identical meaning; ~0.8-0.95 = closely related; ~0.5-0.8 = topically related; near 0 = unrelated; negative = semantically opposite (rare with normalized embeddings).

Practical cutoffs are model-specific. For OpenAI text-embedding-3-small, ~0.85+ usually means "about the same topic." For Voyage models, the same threshold is closer to 0.75 because their distributions differ. Calibrate on your data.

Frequently asked questions

What range should I expect?

Cosine similarity runs from -1 to 1. With normalized embeddings it usually sits between 0 and 1, where higher means closer in meaning.

What similarity counts as "similar"?

It is model-specific. A 0.85 might mean "same topic" for one embedding model and only "loosely related" for another, so calibrate the threshold on your own data.

Do the two vectors need the same length?

Yes. Cosine similarity is only defined for vectors of equal dimension, so both must come from the same embedding model.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: