Tech & Digital
Data Storage Converter: Bytes, KB, MB, GB, TB, KiB, MiB, GiB
Convert amounts of digital data between units. Computer storage and memory are measured in bytes, each made of eight bits, and larger amounts use prefixes such as kilo, mega, giga and tera. Confusingly, there are two systems in use. The decimal system, based on the International System of Units, uses powers of 1,000: a kilobyte is 1,000 bytes, a megabyte a million bytes and a gigabyte a billion bytes. The binary system, standardised by the International Electrotechnical Commission, uses powers of 1,024 and has its own names: kibibyte (KiB), mebibyte (MiB), gibibyte (GiB) and tebibyte (TiB). Drive and memory-card makers advertise capacity in decimal units, while some operating systems report sizes in binary units but still label them GB, which is why a new 1 TB drive appears to hold only about 931 GB. Network speeds add a third twist, because they are usually quoted in bits per second rather than bytes. Choose the unit you have and the unit you want, enter the value, and the calculator gives the converted amount, the equivalent in bytes and bits, and a table of the same amount in every unit. One gigabyte, for example, is exactly 1,000 megabytes but only about 0.931 gibibytes.
How to use this calculator
- Enter the amount of data.
- Choose the unit you are converting from.
- Choose the unit you want.
- Read the result and the equivalent in bytes and bits.
- Use the table to see every unit at once.
Why two systems exist
Computer memory is built in powers of two, so early engineers used kilo to mean 1,024, close to 1,000. As capacities grew, the gap between decimal and binary meanings widened: about 2.4% for kilo, but about 10% for tera.
To end the ambiguity, the IEC introduced the binary prefixes kibi, mebi and gibi in 1998. They are used by some software, such as Linux tools, while others still use GB for binary values.
Bits and bytes in practice
Internet speeds are usually given in megabits per second. To estimate download speed in megabytes per second, divide by 8: a 100 Mb/s connection delivers at most about 12.5 MB/s.
File systems also reserve some space for their own structures, so usable capacity is slightly lower still than the converted figure.
Formula & method
Decimal (SI) prefixes: 1 KB = 1,000 B, 1 MB = 1,000² B, 1 GB = 1,000³ B, 1 TB = 1,000⁴ BBinary (IEC) prefixes: 1 KiB = 1,024 B, 1 MiB = 1,024² B, 1 GiB = 1,024³ B, 1 TiB = 1,024⁴ B1 byte = 8 bitsResult = value × size of the source unit ÷ size of the target unitDecimal prefixes (SI): 1 kB = 10³ bytes, 1 MB = 10⁶, 1 GB = 10⁹, 1 TB = 10¹², 1 PB = 10¹⁵. Binary prefixes (IEC 80000-13): 1 KiB = 2¹⁰ = 1,024 bytes, 1 MiB = 2²⁰ = 1,048,576, 1 GiB = 2³⁰ = 1,073,741,824, 1 TiB = 2⁴⁰, 1 PiB = 2⁵⁰. 1 byte = 8 bits; 1 Mb (megabit) = 10⁶ bits = 125,000 bytes. Conversion: result = value × bytes per source unit ÷ bytes per target unit. Lower-case b stands for bits and upper-case B for bytes.
Worked example
A 1 TB drive in GiB
- 1 TB = 10¹² bytes.
- 1 GiB = 1,073,741,824 bytes.
- 10¹² ÷ 1,073,741,824 ≈ 931.32 GiB.
Answer: A 1 TB drive holds about 931.3 GiB, often shown as 931 GB.
Frequently asked questions
How many MB are in a GB?
1,000 in decimal units; a GiB contains 1,024 MiB.
Why does my drive show less space than advertised?
Makers use decimal units while some systems display binary units.
What is a gibibyte?
2³⁰ bytes, or 1,073,741,824 bytes.
How many bits are in a byte?
Eight.
What is the difference between Mb and MB?
Mb is megabits, MB megabytes; 1 MB = 8 Mb.
How many GB are in a TB?
1,000 in decimal units; 1 TiB is 1,024 GiB.