Audio duration & size

Audio sample length and PCM size calculator

Find a loop's time, sample frames and packed PCM audio size from its bars, tempo and audio settings.

Sample length: settings and guide

Loop duration0:08.0008 seconds · 4/4
Sample frames384,000
Exact payload bytes2,304,000
Decimal payload size2.304 MB
Binary size2.197 MiB

Sample frames round to the nearest whole frame. Size covers packed PCM audio data at the stored bit depth. It does not include headers, extra data or padding.

Formula

How to calculate sample length and PCM size

First, use the bars, time signature and quarter-note BPM to find the loop time. Multiply that time by the sample rate. Round to the nearest whole frame. For packed PCM audio size, multiply frames by channels and stored bytes per sample.

sample frames = exact duration × sample rate, rounded to the nearest whole frame

  1. 01

    A frame has one sample value for each channel at the same moment. The frame count sets the time.

  2. 02

    The size estimate uses the stored bit depth you choose. Pick 32 bit if 24 valid bits are stored in 32 bits.

  3. 03

    Compressed files such as MP3, AAC and FLAC have different sizes.

Worked example

Example: a four-bar 48 kHz stereo loop

Four bars of 4/4 at 120 quarter-note BPM last 8 seconds. At 48 kHz that is 384,000 sample frames. At packed 24-bit stereo, the audio payload is 2,304,000 bytes, or about 2.20 MiB, before headers or metadata.

Practical examples

Check the exported frame count

Why a four-bar loop may need rounding to a sample frame

Enter 123 BPM, 4 bars of 4/4, 44.1 kHz, stereo and 24 bit. The ideal duration is 960 ÷ 123 ≈ 7.804878 seconds. At 44,100 frames per second this is not a whole number, so the calculator rounds to 344,195 frames.

Same 344,195 frames, different stored PCM widths
StorageBytes per stereo frameAudio payload
Packed 24 bit62,065,170 bytes
32-bit storage82,753,560 bytes

Both have the same frame count and play for about 7.804875 seconds. A WAV file may be larger. This estimate leaves out headers, extra data and padding. If 24 valid bits are stored in 32 bits, choose the 32-bit stored width.

Use the sample-frame converter to check the rounded count. Compare it with the end of the musical loop. A file does not always end at an exact fraction of a second.

Loop frame reference

Common loop lengths in sample frames

The frame count depends on time and sample rate, not the number of channels. The chart uses 4/4 at 120 BPM. Stereo changes the stored values and bytes, but not the frame count or time.

4/4 loops at 120 BPM

Duration and sample frames for common loop lengths at 120 BPM and 44.1 or 48 kHz
LengthDuration44.1 kHz frames48 kHz frames
1 bar0:02.00088,20096,000
4 bars0:08.000352,800384,000
8 bars0:16.000705,600768,000
16 bars0:32.0001,411,2001,536,000
Quick answers

Frequently asked questions

How many sample frames are in one second?

At 44.1 kHz there are 44,100 sample frames per second; at 48 kHz there are 48,000. Each frame contains one value per channel.

Why is a stereo file twice as large?

Stereo stores two sample values in every frame—one for the left channel and one for the right.

Does bit depth change duration?

No. Bit depth changes the data stored for each sample and therefore file size, not playback duration.