Two types of edit distance quantify the cost to transform between two strings. The Hamming distance gives the number of disagreements between words, usually of the same length. The Levenshtein distance is the number of one-element changes (adding, deleting, or substituting) needed to go from one word to the other.