Distance and Similarity Calculator
Gives Euclidean, Manhattan, Minkowski, Chebyshev and cosine measures between two vectors, Mahalanobis distance from a dataset, and Jaccard or Dice similarity between two sets.
- Free
- No sign-up
- Works on any device
About Distance and Similarity Calculator
Distance and similarity measures answer how alike two things are. For two vectors the tool gives the Euclidean, Manhattan, Chebyshev and Minkowski distances plus the cosine similarity and angle. For a dataset it computes the Mahalanobis distance of a point from the mean, which accounts for the spread and correlation of the columns. For two sets it gives the Jaccard similarity (shared items over all items), the Dice coefficient and the overlap coefficient. The vectors 1, 2, 3 and 4, 6, 3 are 5 apart by Euclid and 7 by Manhattan.
How to use Distance and Similarity Calculator
- Choose vectors, Mahalanobis or sets.
- Enter the two vectors, the dataset and the point, or the two lists of items.
- Read the distances and similarities and the intersection and union of the sets.
Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.
Also known as
Frequently asked questions
When is Mahalanobis distance better than Euclidean?
When columns are measured in different units or move together. Mahalanobis rescales by the covariance matrix, so a point that is unusual relative to the data shows a large distance even if its raw coordinates look ordinary.
Why is Mahalanobis distance sometimes impossible to calculate?
It needs the covariance matrix to be invertible: more rows than columns and no column that is constant or a copy of another. Otherwise the tool tells you to remove such columns.
Is cosine similarity a distance?
It measures the angle between vectors and ignores their length. One minus the cosine similarity is a common dissimilarity, but it does not satisfy every rule of a true distance.
Is Distance and Similarity Calculator free?
Yes. Distance and Similarity Calculator on Toolipedia is free to use, with no sign-up and no watermark.
Is it safe to use?
Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.
Does it work on my phone?
Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.
Do I need an account?
No. Just open the page and use the tool. There's no sign-up and no email needed.