ThisCalculator

Everyday

Size vs Size on Disk: What’s the Difference?

Updated · Standard formula, shown below

Size vs Size on Disk: What's the Difference?

Size vs size on disk are two different ways of measuring how much storage a file or folder uses. The “Size” is the actual number of bytes in the file’s content, while “Size on disk” is the amount of storage space the file occupies on your hard drive, which is always equal to or larger than the actual size due to how file systems allocate space in blocks.

Background: Why Two Numbers Exist

When you view the properties of a file in Windows, macOS, or Linux, you typically see both “Size” and “Size on disk.” This isn’t a glitch or a way to trick you—it’s a fundamental result of how file systems store data. Hard drives and SSDs are organized into small fixed-size units called clusters (Windows) or blocks (macOS/Linux). A file must occupy a whole number of these units, even if the file’s actual data is smaller than one unit. For example, if your file system uses 4 KB clusters and you create a 1 KB text file, the file will still take up 4 KB on disk. The remaining 3 KB is called slack space or internal fragmentation.

How File Systems Allocate Space

The most common file systems use fixed-size allocation units. Here are typical cluster sizes:

  • NTFS (Windows): Default cluster size is 4 KB for drives up to 16 TB, but can be larger for bigger volumes.
  • APFS (macOS): Uses variable block sizes, often 4 KB for most files.
  • ext4 (Linux): Default block size is 4 KB, but can be 1 KB or 2 KB for smaller partitions.
  • FAT32 (USB drives): Cluster size varies with drive size, often 32 KB for large drives.

When you save a file, the file system allocates enough clusters to hold the file’s data. The “size on disk” is the total size of all allocated clusters. For a 10 KB file on a 4 KB cluster file system, the file uses 3 full clusters (12 KB), so size on disk is 12 KB. For a 4 KB file, it uses exactly one cluster (4 KB), so size and size on disk match.

Why Size on Disk Can Be Much Larger

Several factors can make size on disk significantly larger than the actual size:

  • Many small files: A folder with thousands of tiny files (like a source code repository or a folder of 1 KB text files) will waste a lot of space because each file uses a full cluster.
  • Large cluster sizes: If your drive is formatted with 64 KB clusters (common for large FAT32 drives), even a 1 KB file takes 64 KB on disk.
  • File system overhead: Some file systems (like NTFS) use additional space for metadata, access control lists, and journaling, which may be counted in the folder’s size on disk.
  • Compression and deduplication: Some file systems (like NTFS with compression) can make size on disk smaller than size, but this is an exception.

How to Check and Interpret the Numbers

On Windows, right-click a file or folder, select Properties, and you’ll see both values. On macOS, select the file and press Command+I (Get Info). On Linux, you can use the du command to see disk usage and ls -l for actual size. When you see a large difference, it usually means you have many small files or a large cluster size. For example, a folder with 10,000 empty text files (0 bytes each) will show a size of 0 bytes but a size on disk of 40 MB if the cluster size is 4 KB. This is a common source of confusion when people wonder why their USB drive is full even though the total size of files is small.

Common Problems and Misconceptions

One common misconception is that “size on disk” is a hidden charge or that the file system is wasting space. In reality, it’s the physical reality of how storage works. Another issue is that some tools (like Windows Explorer) may show “Size on disk” as 0 for compressed or sparse files, which can be confusing. Also, when you copy a file to a different drive with a different cluster size, the size on disk may change, even though the actual size stays the same. This is normal and not a sign of data corruption.

How to Reduce the Difference

If you want to minimize the gap between size and size on disk, you have a few options:

  • Use a file system with smaller cluster sizes: For example, formatting a drive with 4 KB clusters instead of 64 KB will reduce slack for small files.
  • Store many small files in an archive: Compressing them into a ZIP file reduces both size and size on disk because the archive is one large file.
  • Enable file compression: On NTFS, you can enable compression for a folder, which can make size on disk smaller than size.
  • Use a file system designed for many small files: Some file systems like ReFS or ZFS handle small files more efficiently, but they have their own trade-offs.

When It Matters

Understanding the difference is crucial when managing storage on small drives (like USB flash drives or SD cards), when planning backups, or when you see a drive fill up faster than expected. For example, if you have a 32 GB SD card and you copy 30,000 small photos (each 500 KB), the actual size might be 15 GB, but the size on disk could be 20 GB if the card uses 64 KB clusters. Knowing this helps you choose the right file system and cluster size for your needs.

Frequently Asked Questions

Why is size on disk larger than size?

Because file systems allocate space in fixed-size blocks. A file must occupy a whole number of blocks, so the last block is often partially empty. This wasted space is called slack space.

Can size on disk be smaller than size?

Yes, if the file system uses compression or deduplication. For example, NTFS compression can make a text file’s size on disk smaller than its actual size. Also, sparse files (files with long runs of zeros) can have a size on disk of 0.

Does size on disk affect file transfer speed?

No, transfer speed depends on the actual data size, not the size on disk. However, many small files can slow down transfers because of the overhead of creating each file.

Should I worry if size on disk is much larger?

Not usually, but if you’re low on storage, you can reduce the difference by using a file system with smaller clusters or by compressing files. It’s a normal part of how storage works.

Does deleting a file free up the size on disk or the size?

Deleting a file frees up the size on disk, which is what matters for available storage. The actual size is just the data content; the freed space is the allocated clusters.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.