Audio Duration Calculator

This utility calculates the duration of audio files (both uncompressed, PCM/IEEE FP audio, such as .WAV/ .W64/ .RF64, .AIFF/.AIF and also lossy compressed files such as MP3, WMA, AAC and OGG Vorbis) that will fit into your available disk space:

**N.B.** If you’re looking for a calculator to do the opposite (i.e. calculate the size of audio files from a given duration), then go here.

Audio Duration Calculator by Colin Crawley
Available Space

Settings - Uncompressed (WAV, AIFF etc.)
Settings - Compressed (MP3, AAC etc.)
Uncompressed (WAV, AIFF etc.) 1411.2 kbps

0 Hours : 0 Minutes : 0 Seconds . 0 Milliseconds
Compressed (MP3, AAC etc.) 0 kbps

0 Hours : 0 Minutes : 0 Seconds . 0 Milliseconds

Enter your available disk/storage space. Calculating the duration of uncompressed files also requires the Sample Rate, Bit Depth and Channel information (but not the Bit Rate, which is automatically calculated). In addition to the available disk/storage space, calculating the duration of compressed files such as MP3 etc., requires only the Bit Rate information (in this case the Sample Rate, Bit Depth and Channel information is ignored). For compressed files encoded with CBR (Constant Bit Rate), the displayed duration should be as accurate as possible (notwithstanding variables such as header information etc- see below). For compressed files encoded with VBR (Variable Bit Rate), the displayed file size can be slightly less accurate because in this case the bit rate can vary depending on the programme material.

Note that the amount of available disk space reported by your device may vary slightly due to file allocation methods, possible differences in the amount of header information and/or the fact that some operating systems calculate hard disk space differently from others (e.g., some calculate it in binary and call 1kB 1024 bytes whilst others – and most hard drive manufacturers – calculate it in decimal and call 1kB 1000 bytes) – this calculator requires decimal input but also displays the equivalent binary value for convenience.

If you find this useful and/or have any comments or suggestions then do let me know via the comment section below (please read our website rules before posting).

40 thoughts on “Audio Duration Calculator”

  1. is there a way (calculator or app) to determine the bit depth & sample rate if i have the track length and bit rate? or at lease a rule of thumb?

    seems that 16-44.1 FLACs have a bit rate of approx 700kbps yet others are about twice that. is it safe to assume those are encoded w higher bit depth and-or sample rate?

    1. Hi Andrew, I assume you’re asking about FLAC files here, since that’s what you mention. With FLAC files, there’s no need to calculate (or assume) anything since both the bit depth and sample rate of the original file are encoded into the FLAC file itself. There are many tools available that let you see this information. Some (but not all) media players display bit depth and sample rate information when you use them to open a FLAC file; for example, Strawberry Music Player (available for Windows, Linux and Mac) shows that information by default. There are also cross-platform command-line tools such as ffprobe (part of ffmpeg, which you probably already have installed) and SoX which are able to show this info.

      To show file info using ffprobe – in a command window, type: ffprobe -show_streams filename | grep -e flac -e bits_per_raw_sample
      To show file info using SoX – in a command window, type: sox --i filename

    1. Hello Colin Charles, You can easily calculate that yourself using the calculator above. Just enter the maximum capacity of your DVD in the “Disk Space (Dec)” field and 128 in the “Bit Rate (kbps)” field. The “Compressed (MP3, AAC etc.)” area below will show the result.

  2. What happens when we zip a file? Can we calculate the size of the original file if we know the upper limit size of a zip file? What kind of variables are in play here?

    1. Hello Aleksey, I’m not sure quite what your questions have to do with the calculator on this page, but in any case my response is this: Don’t worry about it; the .zip format is great for compressing text but unsuitable for compressing audio (because it isn’t designed for that purpose), so…don’t use it to compress audio 😉 . Instead, use a compression format that is specifically designed for audio – either a lossless format such as FLAC (for fixed point) or Wavpack (for floating point), or a lossy format such as .mp3 or Ogg Vorbis. In the case of either uncompressed audio files or any of the lossy audio compression formats you’ll then simply be able to use the calculators on this website to determine either file size or duration.

        1. Hi Mayank,

          You’ll need to enter the bit rate for an AAC file as it’s a lossy format (similar to Mp3). A file that is originally recorded uncompressed at a sample rate of 44100 Hz won’t remain that way after conversion to AAC. Just type the file size into the available space field and then enter the bit rate of your AAC file and the calculator will give you the duration! Bear in mind that, as with all lossy formats, the result will be approximate but probably close enough to be useful.

  3. As I said in the comments on the other calculator, the binary conversion is off. It only multiplies (or divides, in this case) by 1.024, when it should be 1.024^x, where x is 1 for K, 2 for M, 3 for G, and so on. I think it’s calculating the duration using the binary because when I enter a value in the MB field that results in 120.375 MiB, it gives me 11:38.775 duration WAV (44.1 16bit stereo), which is the same value that I need to input in the other editor to get this binary size. However, this means that entering a value with the correct MB or GB sizes gives the wrong result (meaning longer duration than the real one) – in my case 126.222 MB (correct for 120.375 MiB) gives a too high MiB (123.26) value, and therefore a too long duration. You get a wrong result in the other converter too, which gives you a smaller file size than real. The error compounds with higher prefixes (5% in Gigs).

  4. Thanks for this! But is there a minor bug? Going from disk space to duration, if I reset the form, enter units as GB, then enter 10 binary, it says 1 hour and something. If I add a decimal point and zero to make it 10.0, it reads what seems a lot more likely to be the right answer.

    1. Hi Tony, Thanks for your comment. You are correct – there was indeed a bug concerning the binary input field. I’ve fixed it by disabling binary input altogether (although the correct binary value is still displayed when you enter the amount of disk space in decimal). All calculations should now be accurate. I’ll try to find a solution which allows binary input again when I have more time.

  5. Thanks to everyone who contacted me requesting this – it took a while but I finally managed to find some time and…here it is! 🙂 Hope it’s useful to you. Let me know what you think in the comments…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.