Hamming Distance Calculator

Calculate the Hamming distance between two strings of equal length.
Calculator
Enter your values
Analysis
Interpretation of the current calculator output

Enter values to see detailed analysis and insights.

How to Use

Step-by-step instructions
  1. 1Enter the first string.
  2. 2Enter the second string (must be same length).
  3. 3The calculator will show the Hamming distance.

Symbol Difference

Counts the number of positions at which the corresponding symbols are different.
Distance = Σ (s1[i] ≠ s2[i])

Variables:

s1First string
s2Second string

Example

Text Comparison

Inputs:

String 1:karolin
String 2:kathrin

Steps:

  1. 1.k=k, a=a, r!=t, o!=h, l!=r, i=i, n=n
  2. 2.Differences: r/t, o/h, l/r
  3. 3.Count = 3
Result:
3

Frequently Asked Questions

Does it work for binary?

Yes, it works for any strings, including binary sequences (e.g., 1011 vs 1001).