FmtDev
Language

RAG Vector Distance Calculator

Calculate Cosine Similarity and Euclidean Distance between high-dimensional embedding vectors. Built for AI engineers debugging RAG pipelines, semantic search, and vector stores — entirely offline.

Single Only
Single or Batch Mode

Paste embedding vectors to compare

Compare 1-to-1 or use Batch Mode by pasting a 2D array in Vector B to rank multiple vectors.

Vector Calculations FAQ

Should I use Cosine Similarity or Euclidean Distance for RAG?
Cosine Similarity is the industry standard for RAG (Retrieval-Augmented Generation) because it measures the semantic direction of vectors rather than their magnitude. This makes it ideal for text embeddings (like OpenAI or Cohere) where document length can vary. Euclidean Distance is better for numerical data where the absolute scale of features matters.
Can I compare a batch of vectors at once?
Yes. In the 'Vector B' input field, you can paste a 2D Array (a JSON list of multiple vectors). The tool will automatically enter Batch Mode and generate a Top-K ranked table scored by Cosine Similarity, allowing you to simulate a vector database search locally.
What embedding dimensions are supported?
Our calculator supports any dimension count, from small 384D models (like all-MiniLM-L6-v2) to high-density 1536D (OpenAI text-embedding-3-small) or 3072D (text-embedding-3-large) vectors. As long as both vectors share the same length, the math remains accurate.
Engineering Guides

Master This Tool

Deep-dive guides and tutorials for advanced users.