KB vs KiB: Decimal vs Binary Storage Units
Key Difference
KB (kilobyte) = 1,000 bytes (decimal, 10³). KiB (kibibyte) = 1,024 bytes (binary, 2¹&sup0;). This 2.4% difference compounds at larger scales: a “1 TB” drive advertised in decimal holds about 931 GiB in binary. This is why your hard drive shows less space than the box says.
Side-by-Side Comparison
| Scale | Decimal (SI) | Binary (IEC) | Difference |
|---|---|---|---|
| Kilo | 1 KB = 1,000 B | 1 KiB = 1,024 B | 2.4% |
| Mega | 1 MB = 1,000,000 B | 1 MiB = 1,048,576 B | 4.9% |
| Giga | 1 GB = 1,000,000,000 B | 1 GiB = 1,073,741,824 B | 7.4% |
| Tera | 1 TB = 1,000,000,000,000 B | 1 TiB = 1,099,511,627,776 B | 10.0% |
Where Each Is Used
Decimal units (KB, MB, GB, TB) are used by hard drive and SSD manufacturers, network speed specifications (Mbps, Gbps), and macOS. When a drive label says “1 TB,” it means 1,000,000,000,000 bytes. Network speeds are always decimal: 100 Mbps means 100,000,000 bits per second.
Binary units (KiB, MiB, GiB, TiB) are used internally by operating systems for RAM measurement, file system allocation, and memory addressing. RAM chips are inherently binary: a “16 GB” RAM stick actually means 16 GiB (17,179,869,184 bytes). Linux systems often display storage in binary units with IEC prefixes.
Windows uses binary calculation but labels with decimal prefixes, causing the most confusion. A “1 TB” drive shows as “931 GB” in Windows, even though no storage is missing. The drive contains exactly the advertised bytes; Windows is just dividing by 1,073,741,824 instead of 1,000,000,000.
Conversion Formulas
Decimal to Binary
GiB = GB × (1000³ / 1024³)
Example: 500 GB = 500 × 0.93132 = 465.66 GiB
Binary to Decimal
GB = GiB × (1024³ / 1000³)
Example: 465 GiB = 465 × 1.07374 = 499.29 GB
Quick Reference: Advertised vs Actual
| Advertised (Decimal) | Shown in Windows (Binary) | “Missing” Space |
|---|---|---|
| 128 GB | 119.2 GiB | 8.8 GB |
| 256 GB | 238.4 GiB | 17.6 GB |
| 500 GB | 465.7 GiB | 34.3 GB |
| 1 TB | 931.3 GiB | 68.7 GB |
| 2 TB | 1,862.6 GiB | 137.4 GB |
| 4 TB | 3,725.3 GiB | 274.7 GB |
When to Use Which
Use decimal (KB, MB, GB) when describing hard drive or SSD capacity, network speeds, file download sizes, and when communicating with non-technical audiences. This matches how manufacturers and most consumers think about storage.
Use binary (KiB, MiB, GiB) in technical contexts such as programming, system administration, RAM specifications, and when precision matters. If you are writing code that allocates memory buffers, binary units are correct.
When in doubt, specify the exact byte count to eliminate ambiguity. For example, “the file is 1,073,741,824 bytes (1 GiB or approximately 1.07 GB)” leaves no room for misinterpretation.
A Brief History
In the early days of computing, “kilobyte” was universally understood to mean 1,024 bytes because computer memory is inherently binary. As storage devices grew, manufacturers began using the decimal definition (1,000 bytes per KB) because it let them advertise larger numbers. This ambiguity led to consumer confusion and even lawsuits.
In 1998, the International Electrotechnical Commission (IEC) introduced binary prefixes (kibi, mebi, gibi, tebi) to resolve the ambiguity. Under this standard, KiB means 1,024 bytes and KB means 1,000 bytes. Adoption has been slow but steady. Linux, scientific computing, and technical standards increasingly use IEC binary prefixes for clarity.