Levenshtein Distance Calculator
Enter two strings to see how many single-character edits separate them.
Result
How to use
- Enter your values in the fields above.
- Press Calculate to see your result instantly.
- 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?
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)