Guides · updated October 22, 2026

MP3 encoder delay and WAV length

MP3 frames, encoder delay, decoder delay and gapless tags. What the extra milliseconds are, what our test measured, and when it matters.

Tested: 22 October 2026 · 5.000 s LAME MP3 · browser decode to 16-bit WAV · measured 5.041633 s

Short answer

MP3 stores audio in frames of 1,152 samples (MPEG-1). The encoder adds a priming delay and pads the last frame; the decoder adds its own delay. A LAME tag can record the values, but not every decoder trims them. In our test, a 5.000 s MP3 decoded to a 5.042 s WAV.

Why MP3 has a delay at all

MP3 is built on a modified discrete cosine transform (MDCT) and a polyphase filterbank. Both need samples before and after the current block to encode it correctly. The encoder therefore starts with priming samples (silence or a windowed ramp) and pads the end so the last frame is complete.

For MPEG-1 Layer III, a frame holds 1,152 samples. At 44.1 kHz that is about 26.1 ms per frame. The exact delay depends on the encoder; LAME’s default encoder delay is 576 samples (13.1 ms at 44.1 kHz). The decoder adds its own delay, commonly around 528–529 samples.

If the delay and padding are known, a player can trim them and produce gapless playback. MP3 itself does not define a standard field for this; LAME stores the values in a non-standard extension of the Xing/Info header. Players that read it can trim; players that ignore it cannot.

What our test measured

We took a 5.000 s MP3 encoded with LAME, decoded it in the browser, and wrote a 16-bit WAV:

source MP3:  5.000000 s
output WAV:  5.041633 s
difference:  0.041633 s ≈ 41.6 ms

At 44.1 kHz, 41.6 ms is about 1,836 samples. That is the decoder output length after the browser’s MP3 decoder; the WAV writer does not trim it. The extra samples are consistent with encoder delay, decoder delay and final-frame padding that were not removed.

This is not a bug in the WAV writer. It is a property of decoding MP3 without a gapless-aware trim. A different decoder or player may produce a different length.

Why it matters — and when it does not

It does not matter for listening. A 42 ms difference at the start or end of a song is inaudible in normal playback. Most players do their own buffering and trimming anyway.

It matters for editing and sync. If you are aligning a voice track to video, building a multitrack session, or looping a sample, a few hundred samples of offset can be audible as a flam or a lip-sync drift. For those jobs, use a WAV/AIFF master, not an MP3 round trip.

It matters for gapless albums. A live album or a DJ mix depends on exact frame boundaries. MP3 gapless playback works only when the encoder writes the delay/padding metadata and the player reads it. Not every combination does.

What this tool does

The practical rule

If sync or sample accuracy matters, keep a lossless master (WAV or AIFF) and do the edit there. Use MP3 for delivery, not as an intermediate format in an editing chain. A WAV made from an MP3 is convenient, but it is not a time machine.

FAQ

Why is the WAV longer than the MP3?

MP3 is frame-based. The encoder adds priming samples at the start and pads the final frame; the decoder has its own delay. If the decoder does not read the LAME/Xing delay and padding fields, the decoded output includes those extra samples. The WAV writer stores what the decoder produced.

Does this converter trim the delay?

No. It writes the decoded samples as they arrive. It does not guess at a gapless trim. For sample-accurate work, use a lossless master or trim in a DAW with a known reference.

How big is the difference?

In our test, a 5.000 s MP3 produced a 5.041633 s WAV: about 42 ms, or roughly 1,836 samples at 44.1 kHz. The exact number depends on the encoder, the decoder and the final frame padding.

Is 42 ms audible?

Usually not in casual listening. It is enough to shift a multitrack edit or a video sync point. If you are aligning audio to picture or to other tracks, do not round-trip through MP3.

Can I fix it by trimming the WAV?

You can trim by ear or by a known reference, but you need to know which samples are padding. A DAW and a lossless master are the reliable route. A blind trim may remove real audio.

Compare upload-based alternatives

Convert a MP3 file