Toolvito

Works on this device

Audio Duration Calculator

Find how long an audio file plays, how large it will be, or its bitrate. You can also read the length of a WAV file from its header, or add up the parts of a podcast episode. Everything is worked out in this browser.

Enter your values

For files with a constant or average bitrate. Choose what you want to find and type the other two values.

Your values

The size your computer or phone shows for the file. MB counts 1,000,000 bytes and MiB counts 1,048,576 bytes.

The bitrate of the audio, such as 128 kbit/s. For a variable bitrate (VBR) file use its average bitrate.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose the button below them.

How to use the calculator

  1. Choose what you want to work out in the menu.
  2. For MP3, AAC or Opus files, choose Length, size or bitrate of compressed audio, say what you want to find, and type the other two values.
  3. For WAV or AIFF sound that is not compressed, type the sample rate, the bit depth and the channels, or choose a common format.
  4. To read a WAV file, choose Length of a WAV file read from its header and choose the file. It is not uploaded.
  5. To plan an episode or an album, type the length of each part. You get the total and the start time of each part.

The formulas

  • Compressed audio: length = file size × 8 ÷ bitrate. So size = bitrate × length ÷ 8, and bitrate = size × 8 ÷ length.
  • Uncompressed PCM audio: bytes per second = sample rate × bits per sample ÷ 8 × channels. Length = bytes of sound ÷ bytes per second.
  • A WAV file is read as RIFF chunks: the chunk fmt gives the sample rate, channels and bytes per sample frame, and the chunk data gives the bytes of sound. Length = (bytes of sound ÷ bytes per frame) ÷ sample rate.
  • Total of segments: the lengths are added; each part starts where the one before it ends.
  • kB, MB and GB count in powers of 1,000; KiB, MiB and GiB in powers of 1,024. One byte is 8 bits.

Worked examples

A 50 MB MP3 file at 128 kbit/s plays for 50,000,000 × 8 ÷ 128,000 = 3,125 seconds, which is 52 minutes 5 seconds.

CD audio has 44,100 samples each second, 2 bytes per sample and 2 channels: 44,100 × 2 × 2 = 176,400 bytes each second (1,411.2 kbit/s). One minute is 10,584,000 bytes, about 10.6 MB.

An episode with an intro of 0:45, an interview of 32:10, an ad break of 1:30, listener questions of 12:05.5 and an outro of 0:35 is 47:05.500 long. The outro starts at 46:30.500.

Limits you should know

  • For a variable bitrate (VBR) file the length from size and bitrate is an estimate, because it uses the average bitrate. Tags and cover art also add bytes.
  • Only WAV files are read from their header. MP3, AAC, FLAC and other files are not decoded here: use their size and bitrate.
  • WAV files over 4 GB in the RF64 or BW64 form, and big-endian RIFX files, are not read. The data chunk must start in the first 16 MB of the file.
  • The tool does not play or change audio, and it does not measure loudness or silence.

Related tools