Decimal prefixes and binary prefixes
The byte is the basic unit of stored data, and a byte is 8 bits. The confusion starts with the prefixes in front of it.
- Decimal (SI) prefixes multiply by powers of 1,000: a kilobyte (kB) is 1,000 bytes, a megabyte (MB) 1,000,000, a gigabyte (GB) 10⁹ and a terabyte (TB) 10¹². These are the same kilo, mega and giga used for meters and grams, and the SI defines them strictly as powers of ten.
- Binary (IEC) prefixes multiply by powers of 1,024 (2¹⁰): a kibibyte (KiB) is 1,024 bytes, a mebibyte (MiB) 1,024², a gibibyte (GiB) 1,024³ and a tebibyte (TiB) 1,024⁴. The International Electrotechnical Commission approved these names in December 1998 so that “kilo” would no longer have to mean two different numbers.
For decades software used “KB”, “MB” and “GB” for the binary sizes, and some still does. Drive and memory card makers and network equipment use decimal units, and so do current versions of macOS and iOS (Apple says iOS 10 and OS X Leopard and earlier counted in binary). Windows File Explorer reports binary sizes but labels them GB. The bytes are the same either way; only the unit differs.
Data size formulas
The first two lines and the last are exact; the TB to TiB factor is rounded to ten significant digits. Every binary unit is a whole number of bytes, so the converter’s results are exact apart from the displayed rounding.
Why a “1 TB” drive shows about 931 GB
A drive sold as 1 TB holds 1,000,000,000,000 bytes. A system that counts in binary divides that by 1,073,741,824 and gets 931.32, then labels it “GB” although it means GiB. Nothing is missing; the same capacity has been divided by a larger unit. Formatting and preinstalled system files reduce the space free for your files further, which is a separate effect the converter cannot predict.
Bits for speed, bytes for size
Internet and network speeds are quoted in bits per second: Mbps, or Mbit/s, means a million bits per second. File sizes and download progress bars use bytes. Since a byte is 8 bits, divide a connection speed in Mbps by 8 to get megabytes per second: a 100 Mbps line moves at most 12.5 MB/s. Select Bits in the converter to turn a file size into a bit count before dividing by the line speed.
Worked examples
- Bytes: 500 × 1,000,000,000 = 500,000,000,000 B.
- Divide by a gibibyte: 500,000,000,000 ÷ 1,073,741,824 = 465.661 GiB.
- 10¹² ÷ 1,073,741,824 = 931.323 GiB.
- 10¹² ÷ 1,099,511,627,776 = 0.90949 TiB.
- Convert the file to bits: 5 GB × 8,000,000,000 bits per GB = 40,000,000,000 bits.
- Divide by the speed: 40,000,000,000 ÷ 100,000,000 bits per second = 400 s.
- Real downloads take longer because of protocol overhead and the speed of the server, so treat this as the minimum.
- Multiply by 1.073741824: 128 × 1.073741824 = 137.439 GB.
Drive sizes table
| Gigabytes (GB) | Gibibytes (GiB) | Tebibytes (TiB) |
|---|---|---|
| 16 | 14.9012 | 0.0145519 |
| 32 | 29.8023 | 0.0291038 |
| 64 | 59.6046 | 0.0582077 |
| 128 | 119.209 | 0.116415 |
| 256 | 238.419 | 0.232831 |
| 500 | 465.661 | 0.454747 |
| 512 | 476.837 | 0.465661 |
| 1,000 | 931.323 | 0.909495 |
| 2,000 | 1,862.65 | 1.81899 |
| 4,000 | 3,725.29 | 3.63798 |
| 8,000 | 7,450.58 | 7.27596 |
Mistakes with bytes and bits
- Calling the 931 GB reading a defect. It is the same 1 TB counted in binary units. Convert TB to GiB here to check whether a drive’s reported size is what you should expect.
- Treating Mbps and MB/s as the same. A 200 Mbps plan does not download 200 MB every second; the ceiling is 25 MB/s.
- Writing “kb” for kilobytes. By convention a lowercase b means bits and an uppercase B means bytes, so 64 kb is 8 kB.
- Assuming the binary gap is small at every size. 2.4% at kilo hardly matters, but at tera it approaches 10%: a 4 TB drive shows up as about 3.64 TiB.
Phone and computer storage screens differ in which unit they use. If two devices report the same file at different sizes, convert both readings to bytes before deciding one is wrong.
Questions people ask
How many megabytes are in a gigabyte?
1,000 MB in a GB, and 1,024 MiB in a GiB. Mixing the pairs, such as dividing gigabytes by 1,024, gives a number that belongs to neither system.
Is computer memory measured in GB or GiB?
Memory chips are built in powers of two, so a module sold as 16 GB of RAM actually holds 16 GiB. Storage drives, by contrast, are sold in decimal units.
Sources
- Prefixes for binary multiples, National Institute of Standards and Technology.
- The International System of Units (SI Brochure), 9th edition, Bureau International des Poids et Mesures.
- How storage capacity is measured on Apple devices, Apple Support.