Finder says 4.3 GB and du says 4.0 GB. Both are right
Base 10 against base 2, apparent size against blocks, and clones. Why every tool reports a different number for the same folder.
Get Info on a folder says 4.3 GB. du -sh on the same folder says 4.0G. Neither is broken, and the difference has three causes that stack on top of each other.
1. Gigabytes against gibibytes
macOS reports storage in base 10: a gigabyte is 1,000,000,000 bytes. Most command line tools report base 2: a gibibyte is 1,073,741,824 bytes, about 7 percent more. A 4.3 GB folder is 4.0 GiB, and that single conversion accounts for most of the discrepancy you will see.
du -sh ~/Downloads # base 2, prints 4.0G meaning 4.0 GiB
du -sh --si ~/Downloads 2>/dev/null || du -shk ~/Downloads # k for arithmetic2. Size against size on disk
Get Info shows two numbers, and people read the first: the apparent size of the contents, and the size on disk, which counts whole allocation blocks. A folder of ten thousand tiny files uses noticeably more space than the sum of their sizes, because each one occupies at least one block.
3. Clones, hard links and sparse files
- Clones. Two files sharing data on APFS are counted once by the file system and possibly twice by a tool that adds up file sizes.
- Hard links. The same content in two places.
ducounts it once, most other tools count it twice. - Sparse files. A file that reports 50 GB while using 3 GB, common with virtual machine disks.
This is why a virtual machine folder can show wildly different numbers in different tools, and the tool reporting the smaller figure is usually the one telling you what you will get back.
Which number to trust
| Question | Use |
|---|---|
| How much space will I reclaim | Size on disk, or du |
| How big is this file to send | Apparent size, what Get Info shows first |
| Why does the disk not match my folders | df against du, and read the snapshot guide |
| Comparing two folders | Either, as long as it is the same tool for both |
The larger discrepancy, tens of gigabytes rather than a few percent, is a different problem entirely: that is snapshots and purgeable space, covered in why deleting files does not free space.
Common questions
Why does Finder show a different size than du?
Mostly because macOS reports base 10 gigabytes while du reports base 2 gibibytes, a difference of about 7 percent. Allocation blocks and clones account for the rest.
What is the difference between size and size on disk?
Size is the total of the file contents. Size on disk counts whole allocation blocks, so many small files occupy more space than their sizes add up to.
Why does my virtual machine file show two different sizes?
Because it is a sparse file: it reports a large logical size while using less actual space. Tools that add up reported sizes overstate it, while du shows what is really allocated.
Which size number should I trust when freeing space?
Size on disk, or du, since that is what you actually reclaim by deleting. Apparent size is the right number when you are sending a file rather than removing it.