Sound
Sound file size is the amount of storage a digital sound recording needs. Once you know the sample rate, the duration and the bit depth, you can calculate it exactly.
The sample rate is the number of samples taken each second. Multiplying it by the duration in seconds gives the total number of samples in the recording, because samples per second × seconds leaves just samples. For example, a rate of 12,000 Hz for 4 seconds gives 48,000 samples.
Each sample is stored using the bit depth, so multiply the total number of samples by the bit depth. The answer is in bits, because each sample is that many bits long:
file size in bits = sample rate × duration in seconds × bit depth
Before you substitute, make sure the duration is in seconds and the sample rate is in hertz. A rate written in kilohertz is multiplied by 1,000, so 9 kHz becomes 9,000 Hz. A duration of 1 minute 30 seconds becomes 90 seconds.
A 5-second recording of a school bell is sampled at 16,000 Hz with a bit depth of 8 bits.
16,000 × 5 × 8 = 640,000 bits
There are 8 bits in a byte, so divide by 8 to convert: 640,000 ÷ 8 = 80,000 bytes. Divide by 1,000 for kilobytes: 80,000 ÷ 1,000 = 80 KB. Divide by 1,000 again if you need megabytes.
Because the three factors are multiplied, doubling any one of them doubles the file size. The formula counts a single channel of sound: sample rate, duration and bit depth are all it needs, so mono or stereo is not part of the calculation.