Audio File Size Calculator

Last Updated on: 

Before using this tool, you need to understand some terminologies and I’ll also solve some examples on how to calculate both Uncompressed audio file format which is better known as a Lossless audio file format and Compressed audio file format which is better known as a Lossy file format, some terminologies that will be helpful are:

Sample Rate : The sample rate determines the sampling quality and this is how it is done: Let’s say we are sampling an audio signal at 50hz, at 50hz means a sample is taken at 1/50th of a second, that is 20 milliseconds, how did I get that, 1/50 = 0.02 and a millisecond is 1000th of a second, then the math is pretty simple, 0.02 x 1000 = 20 milliseconds, for every 20 milliseconds a sample is taken, this boils down to the sample rate of the original audio signal.

Bit-Depth: We first sample a signal then quantise the signal, then quantisation adds noise, in a simple term. This brought us to the simple expression: The number of bits determines how much noise and the noise floor

Channels: This is the number of channels that exist, if you are using a mono speaker or device, then the audio file size is multiplied by 1, and if you are using a stereo speaker, which is left and right, then audio file size is multiplied by 2, if it’s a surround system, multiply by the number of channels the surround system, e.g 5.1, 8.0, 11.1.

 In a simplified manner, a Bitrate refers to the number of bits that can be transmitted or received per second. Bit-rate is used to encode the number of bits to be transmitted into the particular audio aspect, measured in kbps (kbps stands for kilobits per second and note to be confused with kilobytes per second ).

Calculating Uncompressed Audio Files Size

Example 1:

1.) A C.D recording is said to have a sample rate of 44.1Khz, a bit-depth of 16, calculate the audio file size of the C.D in Megabyte(M.B) if it is recorded in 10minutes.

Note: C.D-D.A is in stereo, using the left and right channel, the amount of the audio per second is multiplied by 2.

Solution

i) 44.1 KHz, is first converted into Hz, 44.1 x 1000 = 44, 100

ii) Bit-depth = 16

iii) Length of time = 5minutes, converting 5minutes to seconds, 5 x 60 =300 seconds

Note: 60 seconds make a minute

iv) Number of channels = Stereo (2)

Using the formula

(Sample rate x Bit-depth x Time) x No. of Channel = (44, 100 x 16 x 300) x 2 = (423, 360, 000) x 2 = 423,360,000 bits

Huh, why the huge number? no worries, the cumulative size is in bits, we need to convert to bytes, then convert to K.b, and then M.b.

To convert to Bytes, we divide by 8, why? Because a byte contains 8bits, simply right!!!

423,360,000/8 = 52,920,000 bytes.

One more step to go, we need to convert it to Mb, since that is what the question stated.

We can’t bump and divide by 1024, we rather convert to Kilobytes and convert to MB, or we divide by multiplying 1024 x 1024

52,920,000/ 1024 x 1024 =52,920,000 / 1048576 = 50.47 MB

Example 2:

2.) An audio file is sampled at 22.05Khz, a bit depth of 8, and also in mono, calculate the audio file size in Gigabyte(G.B) if it is recorded in 3hours.

Solution

i) 22.05 KHz, is first converted into Hz, 22.05 x 1000 = 22, 050

ii) Bit-depth = 8

iii) Length of time = 3hours, i) 60sec make a minute ii) 60min makes an hour, which leads us to

5 x 60 x 60 =10, 800seconds

iv) Number of channels = Mono (1)

Using the formula

(Sample rate x Bit-depth x Time) x No. of Channel = (22, 050 x 8 x 10, 800) x 1 = (1, 905, 120, 000) x 1 = 1, 905, 120, 000 bits

Huh, why the huge number? no worries, the cumulative size is in bits, we need to convert to bytes, then convert to K.b, and then M.b and then G.b

To convert to Bytes, we divide by 8, why? Because a byte contains 8bits, simply right!!!

1, 905, 120, 000/8 = 238, 140, 000 bytes.

Two more step to go, we need to convert it to Mb, and then convert to Gb.

We can’t bump and divide by 1024, we rather convert to Kilobytes and convert to MB, and then convert to Gb, or we divide by multiplying 1024 x 1024 x 1024

238, 140, 000 / 1024 x 1024 x 1024 = 238, 140, 000 / 1, 073, 741, 824 = 0.22Gb

Calculating Bitrate

Bitrate is measured in Kilobitspersec (Kbps), this means how many bits a file take up for every second or just saying the number of bits that can be transmitted or received per sec.

The formula is straightforward: (Sample Rate * BitDepth * Channel)

Examples:

1) A C.D recording is said to have a sample rate of 44.1Khz, a bit-depth of 16, calculate the bit-rate of the C.D.

Note: C.D-D.A is in stereo, using the left and right channel, so it is multiplied by 2

Solution

i) 44.1 KHz, is first converted into Hz, 44.1 * 1000 = 44, 100

ii) Bit-depth = 16

iii) Number of channels = Stereo (2)

Using the formula

(Sample Rate * BitDepth * Channel)

44100 * 16 * 2 = 1, 411, 200bits/s, Bitrate is in kilobits per sec (not to be confuse with Kilobyte)

To get our answer in Kilobits, we divide by 1000, 1411200 / 1000 = 1411.2Kb/s

Calculating a Lossy(Compressed) Audio File Size

A lossy audio file format is usually written as an uncompressed audio file sound Interchangeably, “Lossy”, When an audio data is compressed, the compression deletes chunks of data without really been noticeable. example of the lossy audio file format is mp3, Ogg, e.t.c

The formula for calculating a lossy audio file format: (Time x Bitrate)/8

Example 1:

1.) Calculate the audio file size of Mp3 recording, if the duration is 3minutes, and the bit-rate is 128Kbs.

Solution

When calculating a lossy audio file format, two things are important i) The Time and ii) Bitrate.

i) Length of time = 3minutes, converting is 3 x 60 =180 seconds

ii) Bitrate is in 128 Kbs, don’t be confused with the Kbs, This is not Kilobyte, it is kilobit, so we need to convert into Kilobyte, 8kilobits makes a Kilobyte.

Using the formula

(Time x Bitrate)/8

(180 x 128)/8 = 23, 040 / 8 = 2, 880 Kilobytes, converting to mb 2, 880 / 1024 = 2.8mb

Example 2:

1.) Calculate the audio file size of Mp3 recording, if the duration is 15minutes, and the bit-rate is 320Kbs.

Solution

When calculating a lossy audio file format, two things are important i) The Time and ii) Bitrate.

i) Length of time = 15minutes, converting 15minutes to seconds, 15 x 60 =900 seconds

ii) Bitrate is in 320 Kbs, don’t be confused with the Kbs, This is not Kilobyte, it is kilobit, so we need to convert into Kilobyte, 8kilobits makes a Kilobyte.

Using the formula

(Time x Bitrate)/8

(900 x 320)/8 = 288, 000 / 8 = 36, 000 Kilobytes, converting to mb 36, 000 / 1024 =35.1mb

Question and Answer Section

Q: How many GB is an hour of audio?

A: The size of an hour of audio depends on the file format, it can either be a Lossless Settings also known as Uncompressed (Wav, Flac, AAC, ALE) or Lossy Settings a.k.a compressed (Mp3/OGG).

If it is a Lossless format, then an hour of audio is 75.70 MB (In C.D Sample Rate, you can learn more about the calculation above.

If it is a lossy format, then an hour of audio is 140.63 MB (In Mp3 bit rate of 320kbs), again, go through the calculation I did above.

Comment If you do not understand!

Comment policy: Respectful and beneficial comments are welcome with full open hands. However, all comments are manually moderated and those that doesn't relate with what the passage is saying or offensive comments would be deleted. Thanks for understanding!

Leave a Reply

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