Audio Duration Calculator

This utility calculates the duration of audio files (both uncompressed, PCM/IEEE FP audio, such as “.WAV”, “.W64” “.AIFF/.AIF” and also 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
0

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.

13 thoughts on “Audio Duration Calculator”

  1. 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).

  2. 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.

  3. 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 to Allan Cancel reply

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