Skip to main content

Cosine Similarity Calculator

New

Calculate cosine similarity, dot product, Euclidean distance and vector magnitudes between two embedding vectors pasted as JSON or comma-separated numbers.

cosine similarity calculatorembedding similarityvector similaritydot product
Read the guide
Shortcuts:⌘ KSearch

Paste a JSON array or numbers separated by commas, spaces, or newlines — e.g. an embedding from OpenAI, Cohere, or a sentence-transformer. Both vectors must have the same length.

Continue with:

Frequently Asked Questions

What does cosine similarity measure?

The angle between two vectors: 1 means the same direction, 0 means unrelated (orthogonal) and -1 means opposite. It ignores vector length.

How do I use it with embeddings?

Paste two embedding vectors of equal length from your embedding model; higher scores usually mean more semantically similar text.

What input formats work?

A JSON array like [0.1, 0.2] or numbers separated by commas, spaces or new lines.

Why does it say vectors must be the same length?

Cosine similarity is only defined for vectors in the same dimensional space.

Related Tools