Does Gain Change the Size of an Audio File?

Understanding what factors are involved in generating the size of an audio file and why gain doesn’t affect them.

No.

Audio file size is directly related to bit depth1, sample rate, file time and number of channels.

5 minutes of a stereo 44.1kHz/16 bit audio file, for example, will always be approx. 51 MB2 regardless of gain within the file.

Why?

A 16-bit system has a resolution of 65,536 (216) possible values – that is 216 possible values that will be used  to reconstruct the original analog signal. The amplitude of the original signal is the only information explicitly stored in the sample and that value is finite. However you gain the signal you will only ever have a certain amount of places to store the amplitude of that signal encoded as a binary number with a fixed number of digits i.e., Bit Depth. Adding gain at any stage will not change this aspect of bit depth and that is where file size change would come from.

In a 24 Bit System there are over 16.5 million possible integer values per sample hence larger file sizes because the bit depth increased.

5 minutes of a stereo 44.1kHz/24 bit audio file, for example, will be approx. 75.7 MB

An increase in sample rate will add more information to the file:

5 minutes of a stereo 48kHz/16 bit audio file, for example, will be approx. 55 MB

Increase both and the file sizes go way up.

5 minutes of a stereo 192kHz/24 bit audio file, for example, will be approx. 329.6 MB

At no point is gain within the file (or recorder) a factor related to file size.

Notes:

1. http://wiki.audacityteam.org/wiki/Bit_Depth#size

2. http://www.sounddevices.com/calculator/