Skip to content

Windows shows two sizes for the same file, and both are right

Cluster rounding, compression and hard links make the two numbers differ. Which one to trust when you are freeing space.

5 min read

Right click a folder, Properties, and Windows shows Size and Size on disk. They are rarely equal and the gap goes in both directions, which is where most storage confusion on Windows starts.

The three reasons they differ

CauseEffectTypical case
Cluster roundingSize on disk is largerThousands of tiny files
NTFS compressionSize on disk is smallerCompact OS, compressed folders
Hard linksSize is overstatedWinSxS, deduplicated shares
Sparse filesSize is wildly overstatedVirtual disks, WSL

Cluster rounding, the usual one

NTFS allocates space in clusters, 4 KB by default. A 100 byte file occupies 4 KB. A folder of fifty thousand small files, which is what node_modules is, occupies far more than the sum of its file sizes. That is not waste anyone can fix, it is how the file system works.

fsutil fsinfo ntfsinfo C: | Select-String 'Bytes Per Cluster'

When size on disk is smaller

Compression. Windows compresses system binaries on many machines through Compact OS, and folders can be compressed individually. The file reports its real length and occupies less, which is correct and is what Compact OS does.

Which number to trust

  • Freeing space? Size on disk. That is what you get back.
  • Sending a file? Size. That is what has to travel.
  • Comparing two folders? Either, as long as it is the same measure for both.
  • A drive that does not add up? Neither. That is shadow copies, and vssadmin answers it.

Why every tool disagrees

Explorer understands some links and reports both numbers. A PowerShell sum of file lengths reports the first. A tool that walks hard linked folders overstates both. That is precisely why WinSxS looks twice its real size to almost everything.

Common questions

Why is size on disk larger than size in Windows?

Cluster rounding. NTFS allocates in clusters, 4 KB by default, so every file occupies at least one whole cluster. A folder of many tiny files occupies noticeably more than the sum of their sizes.

Why is size on disk smaller than size?

Compression. Windows compresses many system binaries through Compact OS, and individual folders can be compressed. The file reports its real length and occupies less.

Which size should I use when freeing space?

Size on disk, because that is what you actually reclaim. Size is the right number when sending a file rather than removing it.

What is the cluster size on my drive?

Run fsutil fsinfo ntfsinfo C: and look for Bytes Per Cluster. It is 4096 on most Windows installs, and larger on volumes formatted for big files.

Read next