Decimal vs binary data units

A megabyte (MB) is 1,000,000 bytes. A mebibyte (MiB) is 1,048,576 bytes. A gigabyte (GB) is 1,000,000,000 bytes and a gibibyte (GiB) is 1,073,741,824. The decimal units count in thousands and the binary units in multiples of 1,024.

Two ways of counting

Computer memory is organized in powers of two, and 2¹⁰ = 1,024 happens to be close to 1,000. Early engineers borrowed the metric prefix and called 1,024 bytes a kilobyte. The 2.4% difference seemed harmless. But it compounds with each step up, reaching nearly 10% at the terabyte level.

Decimal unitBytesBinary unitBytesDifference
kilobyte (kB)1,000kibibyte (KiB)1,0242.4%
megabyte (MB)1,000,000mebibyte (MiB)1,048,5764.9%
gigabyte (GB)10⁹gibibyte (GiB)1,073,741,8247.4%
terabyte (TB)10¹²tebibyte (TiB)1,099,511,627,77610.0%

The binary prefixes

In 1998 the International Electrotechnical Commission introduced separate prefixes for the binary multiples: kibi, mebi, gibi, tebi, formed from the first two letters of the SI prefix plus "bi" for binary. The SI prefixes kilo, mega and giga were confirmed to mean exactly 1,000, 1,000,000 and 1,000,000,000, as they do for every other unit.

The "missing space" on a new drive

A drive sold as 1 TB contains one trillion bytes, as labeled. Windows divides that by 1,024 three times and shows 931, then labels the result GB when it is really GiB. Nothing is missing. The same drive on macOS shows about 1 TB, because macOS reports in decimal units.

Labeled capacityBytesShown in binary units
128 GB128 × 10⁹119.2 GiB
256 GB256 × 10⁹238.4 GiB
500 GB500 × 10⁹465.7 GiB
1 TB10¹²931.3 GiB
2 TB2 × 10¹²1.82 TiB
4 TB4 × 10¹²3.64 TiB

Who uses which

  • Decimal: drive and memory-card makers, network speeds, macOS and some Linux file managers.
  • Binary: RAM sizes, Windows file sizes (labeled KB, MB, GB), many command-line tools.

RAM is the one place where binary sizes are natural: an "8 GB" memory module is 8 GiB, exactly 8,589,934,592 bytes.

How to convert

To go from gigabytes to gibibytes, multiply by 10⁹ and divide by 2³⁰, which is the same as multiplying by 0.931323. To go from gibibytes to gigabytes, multiply by 1.073742.

Frequently asked questions

Is 1 GB equal to 1,000 MB or 1,024 MB?

By the standard definition, 1 GB is 1,000 MB. The unit that equals 1,024 MiB is the gibibyte, GiB.

What is a kibibyte?

A kibibyte (KiB) is 1,024 bytes, the binary counterpart of the 1,000-byte kilobyte.

How do I convert GB (decimal) to GiB (binary) in one step?

Multiply the decimal GB number by 0.93132257 (1,000³ ÷ 1,024³). For example, 500 GB × 0.93132257 = 465.66 GiB.

How do I convert GiB (binary) back to GB (decimal)?

Multiply the binary GiB number by 1.073741824 (1,024³ ÷ 1,000³). For example, 32 GiB × 1.073741824 = 34.36 GB.

Why do Linux commands like ls -lh and df -h print M and G instead of MiB and GiB?

In GNU coreutils, -h (--human-readable) uses powers of 1,024 (MiB, GiB) abbreviated as single letters, while --si uses powers of 1,000.

Worked example: Why a '2 TB' SSD shows as 1.81 TB in Windows Explorer

Storage manufacturers label drives using SI decimal powers of 1,000 (10³), whereas Microsoft Windows reports drive capacity in binary powers of 1,024 (2¹⁰, technically **tebibytes / gibibytes**, though Windows labels them TB / GB). Walk through the exact arithmetic for a **2 TB NVMe SSD**:

  • Step 1 — Exact decimal bytes on the drive box (2 TB): 2 × 10¹² = 2,000,000,000,000 bytes.
  • Step 2 — Convert bytes to binary tebibytes (TiB, dividing by 1,024⁴ = 1,099,511,627,776): 2,000,000,000,000 ÷ 1,099,511,627,776 = 1.818989 TiB (which Windows truncates/rounds and displays as 1.81 TB, or 1,862.65 GiB).
  • The 9.05% gap at the terabyte scale: At the kilobyte level (1,000 vs 1,024), the difference is only 2.4%. By the gigabyte level (10⁹ vs 2³⁰), the gap grows to 7.37% (1,000 GB = 931.32 GiB), and at the terabyte level (10¹² vs 2⁴⁰), it reaches 9.05%—even though not a single byte of storage is actually missing!

Limits and where each convention applies

  • RAM is always binary (16 GB DDR5 = 16 GiB): Unlike SSDs and hard drives, computer memory modules (DRAM) are addressed by binary row/column address lines, so a 16 GB stick of RAM genuinely contains 16 × 1,024³ = 17,179,869,184 bytes (16 GiB).
  • Network speeds (100 Mbps, 1 Gbps) are always decimal bits per second: A 1 Gbps fiber link transmits 1,000,000,000 bits/s (never 1,073,741,824 bits/s).
  • macOS 10.6+ and iOS/Android vs Windows: macOS Finder, iOS, and Ubuntu disk utilities display storage using base-10 decimal units (2 TB shows as 2 TB), whereas Windows File Explorer still uses base-2 1,024 division while printing the letters KB, MB, GB, TB.