Cosine Similarity Calculator
NewCalculate cosine similarity, dot product, Euclidean distance and vector magnitudes between two embedding vectors pasted as JSON or comma-separated numbers.
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.
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
LLM Token Counter
NewEstimate token counts for GPT, Claude, and Llama-style models as you type.
AI Cost Calculator
NewEstimate LLM API costs from input/output token counts across popular models.
Prompt Template Builder
NewBuild reusable AI prompt templates with {{variable}} placeholders and instant preview.