Why is my 128gb SD card showing as 119gb?

It’s a common frustration that SD cards and other storage devices often show less usable capacity than advertised on the packaging. For example, you may buy a 128GB SD card but when you insert it into your computer, it only shows 119GB available. The goal of this article is to understand the various technical reasons that cause the available capacity on SD cards and other storage devices to be lower than the stated capacity.

How Storage Capacity is Calculated

The reason why a 128GB SD card shows less than the advertised capacity is because manufacturers calculate gigabyte capacities differently than operating systems like Windows. Manufacturers use the decimal system to calculate gigabytes, while operating systems use the binary system.

In the decimal system, 1 gigabyte is equal to 1,000 megabytes. This is how storage manufacturers advertise the capacity of SD cards, hard drives, and other storage devices. So a 128GB SD card in the decimal system contains 128,000,000,000 bytes.

However, operating systems like Windows use the binary system to calculate gigabytes. In binary, 1 gigabyte is equal to 1,024 megabytes. So a binary gigabyte contains 1,073,741,824 bytes. This discrepancy between decimal and binary gigabytes is why a 128GB SD card shows up as 119GB in Windows – the binary system recognizes fewer gigabytes for the same number of bytes.1

The bottom line is that storage manufacturers use the decimal system for gigabyte measurements, while computers use the binary system. This difference of about 7% explains why the advertised capacity is higher than what shows up when you insert the SD card.

Formatting and File Systems

The file system used to format an SD card plays a major role in determining the available storage capacity. When an SD card is formatted, a specific file system is written to the card which defines how data is organized and accessed. Two common file systems used for SD cards are FAT32 and exFAT.

FAT32 is an older file system that has a maximum file size of 4GB and a maximum partition size of 32GB. While it is compatible with most devices, the 4GB file size limit makes FAT32 inefficient for larger SD cards. FAT32 also uses larger cluster sizes which can lead to wasted space on higher capacity cards (1).

exFAT is a newer file system without these limitations. It supports file sizes larger than 4GB and partition sizes larger than 32GB. exFAT uses smaller cluster sizes as well, reducing wasted space on the SD card. The downside is that exFAT may not be compatible with some older devices (2).

In general, formatting with exFAT will provide more available storage capacity compared to FAT32 on larger SD cards. However, compatibility with the device should be considered. Formatting and choosing the optimal file system avoids wastage of space and allows efficient utilization of the full rated capacity.

(1) https://www.quora.com/Why-does-formatting-an-SD-card-lose-some-of-the-capacity

(2) https://superuser.com/questions/381208/how-can-i-format-an-sd-card-with-a-more-robust-linux-usable-filesystem-with-a-sp

Pre-Installed Files

It’s important to note that SD cards often come with pre-installed files that take up space (1). These can include read-only system files, formatting utilities, anti-piracy software, and trial versions of software or media files. The pre-installed files are put on the SD card by the manufacturer or reseller. While the total stated capacity of the SD card remains the same, these pre-installed files effectively reduce the usable free space available to the user.

Depending on the SD card, the amount of space taken up by pre-installed files can range from a few megabytes to over a gigabyte. A 16GB or 32GB SD card will likely have less pre-installed files than a 128GB or 256GB SD card. This is because the larger cards have more usable space to fit trial software, videos, music, and other media files from promotional partners of the SD card brand.

To maximize usable space, many users suggest formatting or “cleaning” a new SD card to wipe it clear of unnecessary pre-installed files. However, this comes with the risk of accidentally removing essential system files as well. The best approach is to check the contents of a new SD card first before formatting, keeping any useful software or files and removing only unnecessary clutter.

(1) https://www.quora.com/Whats-taking-up-the-SD-cards-storage-space-It-reads-as-95-full-but-I-can-only-find-can-50-of-the-files

Cluster Size

Cluster size refers to the smallest allocatable unit of space on a storage device like an SD card [1]. When a file is saved to the SD card, it occupies an integer number of clusters. If the file size is not an even multiple of the cluster size, then the remaining space in that partially filled cluster goes unused. For example, if the cluster size is 32 KB and a 28 KB file is saved, it will take up an entire 32 KB cluster, leaving 4 KB unused. This unused space in partially filled clusters adds up and effectively reduces the available capacity.

By default, SD cards larger than 32GB use an exFAT file system with a cluster size of 128KB. So a 128KB video file would take up 128KB (1 cluster), while a 256KB file would take up 256KB (2 clusters). But a 150KB file would take up a full 128KB cluster with 22KB unused. For a 128GB SD card, that 128KB cluster size leads to tens of thousands of these small unused blocks that reduce available capacity [2]. Using a smaller cluster size reduces this wasted space, but also leads to more file fragmentation.

Over-Provisioning

Over-provisioning refers to the practice of reserving a portion of an SD card’s total capacity solely for the controller’s use to manage reading and writing operations. Manufacturers typically over-provision SD cards by around 7-28% of the total advertised capacity [1]. This reserved space allows the controller to evenly spread out writes across all the memory cells, reducing write amplification and extending the card’s lifespan. The controller also uses the over-provisioned capacity to remap bad blocks and replace worn-out cells [2]. While over-provisioning reduces the usable capacity for the end user, it significantly increases the card’s endurance and consistency of performance over time.

Controller Circuitry

SD cards contain controller chips and circuitry that manage the storage and transfer of data on the card. This controller circuitry takes up physical space on the card’s circuit board and also reserves some storage capacity for its own operations.

For example, the controller may use some memory to store firmware, mapping tables, error correction data, and other types of metadata needed to operate the card properly. The sophisticated controller in higher capacity SD cards will utilize more memory and space than a basic controller.

According to the SD Association’s specifications, SD cards up to 32GB must leave 2% of the total capacity available just for controller usage and management operations. Cards larger than 32GB reserve even more – about 7% of capacity for the controller [1]. So in a 128GB card, around 9GB may be set aside for controller processes.

Therefore, the presence of advanced controller circuitry in modern, high-capacity SD cards leads to a portion of the stated capacity being unavailable for user data storage. This explains why usable capacity is always slightly less than the advertised size printed on the card.

[1] https://www.sdcard.org/developers/sd-standard-overview/capacity-sd-sdhc-sdxc-sduc/

Bad Blocks

All SD cards contain some bad blocks – memory sectors that are defective and cannot reliably store data. During manufacturing, SD card controllers scan for these bad blocks so they can be marked and avoided. This process is called bad block mapping.

To compensate for bad blocks, SD card manufacturers reserve a small percentage of the total capacity as spare blocks. For example, on a 128GB card, the manufacturer may set aside 2% (2.56GB) for bad block replacement. This allows the controller to swap out any new bad blocks that develop during usage with the spare good blocks.

Therefore, the presence of bad blocks reduces the usable capacity that is reported to your device. A brand new 128GB SD card may only show 119GB available if 2.56GB was reserved for bad block remapping [1]. This over-provisioning ensures the card’s health and longevity.

Unfortunately, it is not possible to repair bad blocks on an SD card. The reserved capacity is permanent due to the physical defects in those blocks. However, the controller does its best to manage bad blocks transparently using the spare capacity [2].

File Allocation Table

The file allocation table (FAT) is a data structure that keeps track of where files are stored on a storage device like an SD card. It occupies space on the card that cannot be used to store files. The FAT uses up more space as the total capacity of the card increases.[1]

The FAT is created when an SD card is formatted with a file system like FAT16, FAT32 or exFAT. The operating system stores information about each file and directory in the FAT, including the starting location of the file data and the size. This allows the OS to locate files and determine free space on the device.

On larger capacity SD cards, the FAT itself takes up more overall bytes. For example, a 32GB SD card formatted with FAT32 may have a 4MB FAT. While this is a small percentage of the total space, it does reduce the available capacity. So a 32GB card would only have 31.97GB free after reserving 4MB for the FAT.[2]

Newer SD cards over 32GB often use exFAT instead, which has lower overhead. But the FAT still uses up a portion of the space. The more files stored and the larger the card’s capacity, the bigger the FAT needs to be to keep track of the data.

Conclusion

In summary, SD cards often show less storage capacity than advertised for several key reasons:

[Source 2]. The most significant factors are the file system which reserves space for formatting, the controller circuitry and bad blocks which take up physical space, and overprovisioning by the manufacturer.

[Source 1]. File allocation tables, pre-installed files, and cluster size optimization also lead storage capacity to be slightly less than advertised. But these factors usually have a smaller impact.

By understanding how SD card capacity is calculated and optimized, users can have realistic expectations. The missing capacity is a normal part of device function, not a defect.