← All articles

How to Null Test Two Audio Files (and Hear Exactly What Changed)

A null test is the oldest trick in audio engineering. Take two recordings that are supposed to be the same, flip one of them upside down, play them together, and everything they share cancels. Whatever is left over is exactly what changed: a re-recorded vocal line, a limiter that was switched on, an MP3 encoder’s artefacts, a click someone edited out.

It is also notoriously fiddly to do by hand. This guide explains why, and how to get a clean result without spending an afternoon nudging regions in a DAW.

Why the subtraction works

A sound wave is a series of numbers. Inverting the polarity multiplies every one of them by -1. Add that inverted copy to the original and each sample becomes zero — silence. If the second file differs anywhere, those samples do not cancel, and that residue is the difference.

The beauty of it is that the residue is something you can listen to. A percentage tells you two files differ by some amount; a null track lets you hear that the difference is a hi-hat that went missing in the second chorus.

Why it fails when you do it by hand

Three things wreck a manual null test, and each is small enough that you will not notice it by eye:

  • Timing. If one file is a single sample late, high frequencies no longer cancel — at 44.1 kHz one sample is 23 microseconds, and that is enough to leave the cymbals and sibilance standing in the residue. Exports from different software often start a few milliseconds apart because of encoder padding.
  • Level. A file 0.2 dB quieter than the other leaves the entire mix behind at about -33 dB. It sounds like “everything changed”, when really nothing did except a gain knob.
  • Polarity and channels. If one version was already inverted, or its left and right channels were swapped, inverting it again makes things worse, not better.

So most people who try a null test once get a residue nearly as loud as the music and conclude the files are different. Often they are not.

Doing it properly

The fix is to measure the timing and level instead of guessing them:

  1. Line the second file up with the first to the sample, by cross-correlating the two waveforms rather than dragging regions until they look aligned.
  2. Match the levels by finding the gain that makes the subtraction smallest.
  3. Check the polarity and the channel order, and correct them if they are flipped.
  4. Only then subtract.

When the two really are the same recording, that gets you a residue tens of decibels below the music — or silence.

The online version

DiffALL’s audio comparison does this for you. Compare the two files as usual, then press Make the difference track under the result. It lines the second recording up to the sample, matches the level, checks polarity and channel order, subtracts, and gives you a track you can play or download. It also tells you what it had to correct — “the Actual file was later by 4.0 ms, it was 0.20 dB quieter” — because those corrections are findings too.

It works at the files’ own sample rate (up to 48 kHz), and in stereo when both files are stereo, rather than on a reduced copy, because downsampling would itself be a difference.

Reading the result

The residue is reported as how far below the music it sits, second by second:

  • Cancels completely — the files are the same audio, even if their bytes differ (a different container, different metadata).
  • Far below the music (around -80 dB or lower) — far too quiet to hear in context. A sample-rate conversion typically lands here.
  • Tens of decibels below — a codec at work. A 320 kbps MP3 against its WAV source sits around -42 dB; a 128 kbps one around -22 dB.
  • One loud second in a quiet timeline — something was added or removed at that moment. The timeline under the verdict shows where.

The track is boosted so a quiet residue can be heard, and the page says by how much. Turn your volume down before pressing play.

When a null test is the wrong tool

A null test only means something for two versions of one recording. Two takes of the same song, two singers, or a live and a studio version will never cancel, however carefully they are aligned. If the comparison already scored the pair as unrelated, the page says so and does not make a track — the “difference” would just be the second file.

After heavy EQ, reverb or a pitch change, the files are related but barely cancel, and the residue is the change itself. That is still worth hearing; it just is not a near-silent track.

If you are comparing two different mixes rather than two exports of one, see how to compare two mixes of a song.

Stop hunting for differences by hand. DiffALL spots every change between any two files — automatically.

Compare your files — free