Skip to content
FreeToolsKit.app

Audio & Video guide

How to Trim an Audio Clip to the Exact Second

9 min read · Updated 20 November 2026 · Uses Waveform Audio Trimmer

Quick answer

Type the start and end times instead of dragging, then export a format that keeps the exact length. In FreeToolsKit's Waveform Audio Trimmer:

  1. Add the file and choose Prepare waveform.
  2. Type the times in Start time (MM:SS.mmm) and End time (MM:SS.mmm), for example 00:02.350 and 00:05.720, and press Enter after each.
  3. Check the Selection line, here "Selection: 00:02.350 – 00:05.720 (3.370 seconds)".
  4. Under Output format, choose WAV or FLAC for an exact, lossless copy, or M4A for a smaller file that also kept the exact length in the test.
  5. Choose Trim to WAV (the button names the format) and compare Selected with Measured duration before you download.

An MP3 reports a little more than you selected: 52 ms more in this guide's test. That's encoder delay and padding, not a cutting error. A click at the start or end means the cut landed in the middle of a sound. Move the edge into a pause, or add a fade.

Waveform Audio TrimmerFree to use · No account required · Files processed locallyOpen Waveform Audio Trimmer

The test file used in this guide

To measure where the cut lands, this guide uses a 20-second test recording made for it: a WAV at 44,100 samples per second, 16-bit, mono (1,764,044 bytes). It contains:

  • A steady hum at 233 Hz for the whole 20 seconds, so a cut almost never lands on silence.
  • A short tick at 1 kHz that starts exactly on every whole second.
  • A start marker: a 20 ms blip at 2 kHz that starts exactly at 2.350 seconds.
  • An end marker: a 20 ms blip at 3 kHz that ends exactly at 5.720 seconds.

The aim was to keep 00:02.350 to 00:05.720: 3.370 seconds, or 148,617 samples (at this rate a millisecond is 44.1 samples). If the cut is exact, the clip starts on the first sample of the start marker, has ticks at 0.650, 1.650 and 2.650 seconds, and ends on the last sample of the end marker.

Set the start and end to the millisecond

  1. Under Choose media source, keep Upload File and add your recording. The tool accepts MP3, WAV, AAC, M4A, OGG or FLAC, one file up to 25 MiB and 10 minutes.
  2. Choose Prepare waveform. The first time, the audio engine (about 10 MB) downloads from FreeToolsKit. Source details then show the duration, sample rate and channels. The test file showed 00:20.000, 44,100 Hz and Mono.
  3. Click in Start time (MM:SS.mmm), replace the text with the start time and press Enter. Do the same in End time (MM:SS.mmm). You can also type plain seconds, such as 2.35.
  4. Check the Selection line. It shows the start, the end and the length to the millisecond.
  5. Fine-tune if you need to:
    • Buttons: −100 ms, −10 ms, +10 ms and +100 ms under each time.
    • Keyboard: focus the bar under a time and use the arrow keys (10 ms, or 100 ms with Shift) or Page Up and Page Down (1 second).
    • Listening: Play selection plays the selected part, and Set to playhead moves an edge to the playback position. Preview seeking "can be slightly less precise than the trimmed file", the tool notes, so trust the typed times.
  6. Under 6. Export settings, choose the Output format. A WAV file starts with WAV selected.
  7. Choose Trim to WAV (or the format you picked) and wait for "Ready to download." Then choose Download WAV.

Why typing is the precise method. The tool's code turns a typed time into the nearest sample of the original recording, so a time typed in milliseconds is cut to within half a sample. The waveform shows at most 2,000 columns and can't be zoomed, so dragging a handle on a long recording moves it in bigger steps. A selection must be at least 100 ms long.

Changing the times or the export settings removes the previous result, so download each version before you change anything. The waveform stays.

What the test produced

The Selection line read "Selection: 00:02.350 – 00:05.720 (3.370 seconds)". Each export was downloaded and opened with separate tools: Python's wave module, FFmpeg's ffprobe and Chromium's audio decoder.

  • WAV: Selected 3.370 s and Measured duration 3.370 s, 297,278 bytes. The file held exactly 148,617 samples, and every one was identical to the original's samples 103,635 to 252,251. So the start marker began on the first sample, the ticks were at 0.650, 1.650 and 2.650 seconds, and the end marker finished on the last sample.
  • FLAC: 3.370 s, 57,561 bytes, and the same 148,617 samples, identical to the WAV.
  • M4A: 3.370 s, 57,685 bytes. Chromium decoded exactly 148,617 samples, starting on the right sample. M4A is lossy, so the sample values are close to the original but not identical.
  • MP3, at the default 192 kbps: Selected 3.370 s but Measured duration 3.422 s, 82,755 bytes. Under the result, the tool explains: "MP3 reports a length up to two frames (about 50 ms) longer than the selection because of encoder delay and padding".

This is one synthetic recording, and an MP3's extra length depends on the selection and sample rate. Three more MP3 trims of the same file reported 38 ms, 41 ms and 31 ms more than their selections of 2.000, 2.650 and 10.000 seconds.

Why your MP3 is a few milliseconds longer

MP3 stores audio in frames. At 44.1 kHz each frame holds 1,152 samples, which FFmpeg's MP3 reader uses as the samples per frame (FFmpeg source: mp3dec.c). The test MP3 had 131 audio frames: 150,912 samples, or 3.422 seconds. That's the Measured duration the tool showed.

Those frames hold more than the selection, for two reasons:

  • Delay at the start: the LAME encoder adds an encoder delay ("suggested: 576" samples), and most decoders add 528 more. LAME's source puts the total at "ENCDELAY + 528 + 1" (LAME source: encoder.h). In the test, decoding the MP3 without any correction put the start marker 1,105 samples late (25.1 ms), exactly 576 + 528 + 1.
  • Padding at the end: LAME appends padding "to make sure decoder can fully decode all input" (LAME source: lame.h), and the last frame is filled up. In the test, the uncorrected decode ran 1,190 samples (27 ms) past the end of the selection.

The tool writes a header frame that records this. FFmpeg describes it as a Xing/LAME frame containing information "like the audio duration or encoder delay" (FFmpeg Formats Documentation: mp3). The test file's header recorded a delay of 576 samples and padding of 1,681 samples. FFmpeg's reader uses those numbers to skip "start_pad + 528 + 1" samples at the start and the padding at the end (FFmpeg source: mp3dec.c).

What that means for playback in the test:

  • Players that read the header start exactly on the first selected sample. FFmpeg 6.1 and Chromium both decoded 148,655 samples. That's the selection plus 38 quiet samples (under 1 ms) at the end, because the recorded padding was 38 samples short. In the three other MP3 trims, the decoded length matched the selection exactly.
  • Players that ignore the header play about 25 ms of near-silence before your first sound, and the padding after it.

This isn't specific to one encoder. Apple's note on AAC delay says the problem "is not unique to AAC. MP3 also has these data dependencies and delays", and that a playback system "must trim this data" to stay in sync (Apple: Technical Note TN2258).

What to do when the exact length matters, for example a sound that must line up with video or loop without a gap:

  • Lossless and exact: export WAV or FLAC. The tool's own limits say WAV, FLAC, OGG and M4A exports "match the selection exactly", and the test's WAV and FLAC kept every sample.
  • Smaller and exact: export M4A. Choose M4A rather than AAC: the tool notes that raw AAC "can't store gapless information" and starts with 1,024 samples of delay.
  • If it must be MP3: expect Measured duration to read up to two frames longer than Selected. The tool checks this before it offers the download. Test the clip in the player or app that will use it.

Why there's a click at the cut, and how to avoid it

Because the cut lands on an exact sample, it can land in the middle of a sound wave. In the test, the WAV export's first sample was −2,025 and its last was −11,984, on a scale that runs from −32,768 to 32,767. Inside the hum, neighbouring samples never differed by more than 218. A player goes from silence to that first value, and from the last value back to silence, in a single sample, and that jump can be heard as a click.

Audio editors avoid this by moving edit points to a zero crossing, where the wave passes through silence. Audacity's manual says this "reduces the risk of clicks at editing points". It also warns that in stereo, zero crossings can fall at different places in the left and right channels, "so there may still be a click at the edit point in one channel" (Audacity Manual: At Zero Crossings).

The Waveform Audio Trimmer doesn't snap to zero crossings, and its waveform can't zoom in far enough to see them. You have two options:

  1. Move the edge into a pause. Look for a flat, quiet stretch on the waveform before the first sound and after the last one, and put the edges there. Use the 10 ms buttons and Play selection to find the gap.
  2. Add a fade. Under Fade in and Fade out, choose 0.25 s, 0.5 s, 1 s or 2 s. Fades are linear and apply only to the exported file. Play selection doesn't preview them, so listen to the result.

Fades have a cost. With 0.25 s fades, the test WAV started at 0 and ended at −1, and everything between the fades was unchanged. But the 20 ms markers at each edge dropped to about 7–8% of their level. A fade suits music or room sound at the edge. If a word starts right at the cut, move the edge into the pause before it instead.

Check the exported length yourself

In the tool, the result panel shows Selected and Measured duration. Before offering the download, the tool checks the file is a real file of the chosen format, decodes without errors, has the expected settings, and has "a length matching your selection".

To check outside the tool:

  • WAV: divide the number of samples by the sample rate, which an audio editor or a file-information tool can show. The test WAV had 148,617 samples at 44,100 Hz: 3.370 seconds, and FFmpeg's ffprobe reported 3.370000 seconds.
  • MP3: compare it with a WAV export of the same selection. A reported length up to about 50 ms longer is the delay and padding. If your recording has a clear sound near the start, check it lands at the same time in both.

Before you use the clip

  1. Times: the Selection line shows exactly the start and end you typed.
  2. Length: Measured duration equals Selected for WAV, FLAC, OGG or M4A, or is up to about 50 ms longer for MP3.
  3. Edges: listen to the start and end of the exported file, not just Play selection, for clicks, and to hear any fades.
  4. Quality and tags: MP3, AAC, M4A and OGG exports are re-encoded, which loses a little quality, and tags, album art and chapters aren't copied. Keep the original file.

If your audio is inside a video, take it out first with Extract Audio from Video, then trim it. To change the format of a whole file without cutting it, use the Audio Converter.