Levenshtein Distance Calculator

Enter two strings to see how many single-character edits separate them.

How to use

  1. Enter your values in the fields above.
  2. Press Calculate to see your result instantly.
  3. Use the Share button to copy a link to your result.

About this calculator

The Levenshtein distance between two strings is the minimum number of single-character edits — insertions, deletions or substitutions — needed to turn one string into the other. It was introduced by the Russian mathematician Vladimir Levenshtein in 1965 and is computed with a dynamic-programming grid that builds up the cheapest edit path cell by cell, comparing every prefix of one string against every prefix of the other.

The metric shows up everywhere text needs to be compared imperfectly: spell checkers use it to suggest the closest real word to a typo, search engines and autocomplete use it for fuzzy matching against misspelled queries, bioinformatics tools use a close variant of it to align DNA and protein sequences, and plagiarism detectors and version-control diff tools use it to measure how similar two documents or lines of code really are.

Enter two strings and this calculator computes their Levenshtein distance and a similarity percentage, so you can see at a glance how close — or far — the two pieces of text are from each other.

Was this helpful?

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators