Developer
MB vs MiB: What Is the Difference?
4 min read
The difference between MB and MiB confuses many people, including software developers. Here is a clear explanation.
The Definitions
- MB (Megabyte): 1 MB = 1,000,000 bytes (10^6). Used by hard drive manufacturers, internet service providers, and most storage devices.
- MiB (Mebibyte): 1 MiB = 1,048,576 bytes (2^20). Used by operating systems, RAM specifications, and memory-related contexts.
Why the Confusion?
Before 1998, "MB" was informally used to mean both 1,000,000 and 1,048,576 bytes. The IEC introduced the "MiB" prefix to eliminate this ambiguity. However, older software and common usage still often say "MB" when technically meaning "MiB."
Practical Impact
A hard drive advertised as "500 GB" provides 500,000,000,000 bytes. Windows, however, shows this as ~465 GB (using GiB). This is why a "500 GB" drive appears smaller than expected in your operating system.
Quick Reference
- 1 KB = 1,000 B | 1 KiB = 1,024 B
- 1 MB = 1,000,000 B | 1 MiB = 1,048,576 B
- 1 GB = 1,000,000,000 B | 1 GiB = 1,073,741,824 B