Background image
⇠ Podcasting Articles

Sample Width / Bit Depth / Sample Size

Last updated: 2 November 2023

Sample width is also known as “bit depth” or “sample size” but should not be confused with “sample rate”. Sample width is related to sample rate but determines how many digital steps are available to represent the signal level (voltage) at each sample. Data is commonly stored as bytes and the more bytes you have available, the more distinct numbers you can store. It is often written as “bits per sample”. If you think of an audio waveform as a line graph with time along the x-axis (as it is displayed in most audio editors), then sample width is how much resolution you have on the y-axis.

1 byte (8 bits) allows you to store 256 values (2⁸). 2 bytes (16 bits) allows you to store 65536 values (2¹⁶). Note that because of the binary system, the number of values that can be stored doubles for every extra bit that you add.

It turns out that 65536 is more than enough to represent any humanly-audible difference in signal (96dB) while still being a convenient multiple of 8 bits (1 byte) used for storage. Recording and editing workflows often use a higher sample width such as 16 or 32 bit floats so that volume levels can be altered and other effects applied without quantisation artifacts being introduced.

Some specialist “high-resolution” music tracks are made available to the consumer at 24-bit sample width but you’d need specialist audio equipment and a trained ear to have any chance of noticing the difference.

16 bits is ideal, 8 bits is too low and there is no reason to export audio that will not be re-mastered at higher than 16 bits as it just wastes data.


Diagrams

Diagram highlighting difference between varying sample widths

The diagram above shows an analogue audio signal waveform (pink line) being encoded at two different sample widths using linear PCM (Pulse-code modulation). The left diagram has a sample width of 4 bits and the right one has 5 bits. 4 bits is very low for a real audio file and you would never see an audio file with 5 bits — however it makes the diagrams readable.

In the 4-bit sample (left) there are 16 (2⁴) different possible values the signal can quantized to (the grey horizontal lines from -8 to +7). In the 5-bit sample (right) there are 32 (2⁵) possible values (-16 to +15). The light blue lines represent the sample rate which measures the signal at regular time intervals. The blue dots are the digital representation that ends up in the audio file. You can see that at the higher bit sample width the dots represent the analogue signal more closely and accurately.

Visual Analogy

Sample width is one piece of the challenge when translating real-world analogue audio into a computerised digital representation. Drawing an analogy from computer graphics might help our understanding further.

As display technology improved, people wanted to store and view photos on computers. You can think of an image pixel like an audio sample. Ideally, a pixel would mirror any colour perceivable in the real world, much like an audio sample mirrors any pressure in the air detectable by our ears.

Contemporary displays typically work in 24-bit colour (termed “true color”) giving 16.7 million combinations — 256 levels of red, green, and blue all multiplied together. Given that humans cannot usually discern more colours than this, this 24-bit colour is akin to 16-bits of audio resolution. Cameras can capture a broader range of colours to enable editing and enhancement, but screens do not need to handle more than this. This is a simplification as there are colours that cannot be represented by today’s screens (near-ultraviolet, some greens, etc.) but hopefully you get the gist.

Reducing a photo to lower bit depths unveils various artifacts, as seen below. Smooth gradients degrade into discernible “bands”, resulting in a flat appearance like an old poster. These bands are similar in a way to the digital glitchiness you can hear in low bit depth audio.

Visual analogy using a photo with colors representing bit depth


Diagrams adapted from Wikipedia and shared under CC BY-SA 3.0 license.

Header photo: Sebbi Strauch

Visual analogy photo: Matt Hardy

Whilst you’re here…

Audio Audit is an automatic benchmarking and proofing tool which checks the quality of your podcast MP3 files, giving you peace of mind before you publish.

It checks things like loudness, silences, restarted sentences, encoding, swearing and metadata.

Learn more ⇢Screenshot of an Audio Audit report

Sign up

Creating an account only takes a couple of minutes. You’ll soon be able to start uploading your own audio files and improving your shows.