Levenshtein edit distance calculator

Count minimum single-code-point insertions, deletions and substitutions between two strings.

Enter values

Start with the example below, or enter your own values.

How it works

Dynamic programming on prefix lengths with two rows of memory. Case sensitive; no grapheme normalization.

Try an example

First string: kitten; Second string: sitting. The form starts with these values; change them to explore your own case.

Example result: 3

  1. Initialize the empty-prefix costs.
  2. Use the minimum of insertion, deletion and substitution costs.

Learn more in Algorithm reasoning and step visualizers.

Results are calculated locally. Floating-point tools provide numerical approximations, not formal proof certificates.