File Size Units Explained

Understanding KB vs KiB, MB vs MiB, and all storage measurements

Quick Summary:
There are two systems for measuring file sizes: Decimal (SI) using powers of 1000, and Binary (IEC) using powers of 1024. This causes confusion when your 1 TB hard drive shows as 931 GB in your operating system!

Decimal System (SI)

Based on powers of 1000

Used by: Hard drive manufacturers, USB drives

  • 1 KB = 1,000 bytes
  • 1 MB = 1,000 KB = 1,000,000 bytes
  • 1 GB = 1,000 MB = 1,000,000,000 bytes
  • 1 TB = 1,000 GB = 1,000,000,000,000 bytes

Binary System (IEC)

Based on powers of 1024

Used by: Operating systems, RAM specifications

  • 1 KiB = 1,024 bytes
  • 1 MiB = 1,024 KiB = 1,048,576 bytes
  • 1 GiB = 1,024 MiB = 1,073,741,824 bytes
  • 1 TiB = 1,024 GiB = 1,099,511,627,776 bytes

Complete Size Conversion Table

Unit Symbol Decimal (Base 1000) Binary (Base 1024) Bytes
Byte B 1 B 1 B 1
Kilobyte / Kibibyte KB / KiB 1,000 B 1,024 B 1,000 / 1,024
Megabyte / Mebibyte MB / MiB 1,000 KB 1,024 KiB 1,000,000 / 1,048,576
Gigabyte / Gibibyte GB / GiB 1,000 MB 1,024 MiB 1,000,000,000 / 1,073,741,824
Terabyte / Tebibyte TB / TiB 1,000 GB 1,024 GiB 1,000,000,000,000 / 1,099,511,627,776
Petabyte / Pebibyte PB / PiB 1,000 TB 1,024 TiB 1,000,000,000,000,000 / 1,125,899,906,842,624
Exabyte / Exbibyte EB / EiB 1,000 PB 1,024 PiB 1,000,000,000,000,000,000 / 1,152,921,504,606,846,976

Real-World Examples

Why Your 1 TB Drive Shows as 931 GB

Hard drive manufacturers use decimal (base 1000):

1 TB = 1,000,000,000,000 bytes

Your operating system uses binary (base 1024):

1,000,000,000,000 bytes รท 1,073,741,824 = 931.32 GiB

This is not a defect - it's just two different measurement systems!

RAM Always Uses Binary

When you buy 16 GB of RAM, you're actually getting:

16 GiB = 17,179,869,184 bytes = 17.18 GB (decimal)

RAM specifications always use the binary system because it matches how memory addressing works in computers.

Pro Tip:
When in doubt, use GiB, MiB, KiB for binary (1024-based) and GB, MB, KB for decimal (1000-based). The "i" in the middle stands for "binary" and eliminates confusion!