ToolPick

Data size converter: KB, KiB, MB, MiB, GB, GiB, TB, TiB

Convert between bytes and decimal units (KB, MB, GB, TB, PB) or binary units (KiB, MiB, GiB, TiB, PiB), in both directions, and see why the two differ.

Convert a data size

Start from

0 up to 1,000,000,000,000 in the unit chosen below.

KB, MB, GB, TB, PB are decimal; KiB, MiB, GiB, TiB, PiB are binary.

Decimal units

The same size in decimal units
B (bytes)500,000,000,000
KB (kilobytes)500,000,000
MB (megabytes)500,000
GB (gigabytes)500
TB (terabytes)0.5
PB (petabytes)0.0005

Binary units

The same size in binary units
KiB (kibibytes)488,281,250
MiB (mebibytes)476,837.1582
GiB (gibibytes)465.6612873
TiB (tebibytes)0.4547473509
PiB (pebibytes)0.0004440892099

How it is calculated

  • Decimal (SI) units are powers of 1,000: 1 KB = 1,000 bytes, 1 MB = 1,000,000 bytes, 1 GB = 10⁹ bytes, 1 TB = 10¹² bytes, 1 PB = 10¹⁵ bytes.
  • Binary (IEC) units are powers of 1,024: 1 KiB = 1,024 bytes, 1 MiB = 1,024² bytes, 1 GiB = 1,024³ = 1,073,741,824 bytes, 1 TiB = 1,024⁴ bytes, 1 PiB = 1,024⁵ bytes.
  • Conversion: bytes = amount × bytes per unit; result = bytes ÷ bytes per target unit. Both directions use the same two steps.

Worked example: a 500 GB drive holds 500 × 10⁹ = 500,000,000,000 bytes, which is 465.6612873 GiB, and 1 TB is 0.9094947018 TiB. Nothing is lost: the drive is the size on its label in decimal units, and a tool that reports binary units shows a smaller number for the same bytes. The gap grows with the prefix: about 2.4% at KB/KiB, 4.9% at MB/MiB, 7.4% at GB/GiB, 10% at TB/TiB.

Questions

Why does my 1 TB drive show less than 1 TB?

The drive is labelled in decimal units: 1 TB is 1,000,000,000,000 bytes. Some operating systems calculate the size in binary units (powers of 1,024) but still print the label GB or TB, so the same bytes appear as about 931 "GB" (really GiB), which is 0.909 TiB. Operating systems that report decimal units show the full 1 TB. Formatting and file system overhead then take a small extra amount.

What is the difference between GB and GiB?

A gigabyte (GB) is 1,000,000,000 bytes. A gibibyte (GiB) is 1,073,741,824 bytes (1,024³), about 7.4% more. The IEC introduced the "bi" names (kibibyte, mebibyte, gibibyte) so that KB, MB and GB could keep their decimal meaning. Memory chips are traditionally sized in binary units; drive makers and network speeds use decimal units.

Which unit should I use for cloud storage and bandwidth?

Check the provider's page, because it differs: some price per gigabyte, some per gibibyte (Google Cloud's network and storage pages price per GiB), and tier sizes may count a terabyte as 1,000 or 1,024 gigabytes. For a rough budget the difference is under 8%; for exact bills use the unit and tier edges the provider states.