Hamming Distance Calculator

Count the positions that differ between equal-length strings, binary words, or hexadecimal values. See the exact mismatch positions.

Result
—

How to calculate

Align the messages and add one for each mismatching position. Binary, octal, and hexadecimal inputs compare bits and preserve leading zeros. Decimal mode compares the typed digits directly.

Worked example

Use Compare Binary · First message 1011101 · Second message 1001001. The result is 2.

Input and result notes

Messages must have equal lengths in the selected mode. Text mode compares visible Unicode graphemes and preserves letter case, spaces, and punctuation.

R. W. Hamming’s error detection and correction paper

Related calculators