Hamming Distance Calculator

Calculate the Hamming distance between two binary strings.

Result

Hamming distance
2
Differing bit positions (0 = LSB)
4, 2
XOR
0010100
✓ Free⚡ Instant🔒 Runs in your browser📱 Mobile friendly∞ No limits

How to use the Hamming Distance Calculator

  1. Type or paste your value into the inputs above.
  2. The result is calculated instantly as you type — no button needed.
  3. Press Copy to copy any result, or Example to see a worked example (1011101, 1001001).

How hamming distance calculator works

Hamming distance is the number of positions where two equal-length strings differ — the popcount of A XOR B.

Frequently asked questions

How do I use the Hamming Distance Calculator?

Enter your value in the box above. The result updates instantly as you type. Use the Copy button next to any result to copy it, Example to load a sample, or Clear to start again.

Is this hamming distance calculator tool free?

Yes. Binary Tool Hub is completely free, needs no sign-up and has no usage limits.

Is my data private?

Yes. Every calculation runs locally in your browser with JavaScript. Nothing you type is uploaded to a server.

Does it work on mobile?

Yes. The Hamming Distance Calculator works on iPhone, Android, tablets and desktop browsers, and even offline once the page has loaded.

How does the hamming distance calculator conversion work?

Hamming distance is the number of positions where two equal-length strings differ — the popcount of A XOR B.