Data Storage Converter
Convert between bits, bytes, KB, MB, GB, and TB — in both decimal and binary.
1 GB = 1000 MB = 1,000,000,000 bytes using decimal (SI) prefixes, while 1 GiB = 1024 MiB = 1,073,741,824 bytes using binary (IEC) prefixes. This converter switches between both interpretations and also handles bits, where 8 bits make 1 byte — so the same amount can read differently depending on which base you choose.
Two ways to read a unit like “MB”
Digital storage is counted in bytes, and a byte is 8 bits. Larger amounts use prefixes — kilo, mega, giga, tera — but those prefixes have two competing definitions. The decimal (SI) system treats each step as a power of 1000, so 1 KB = 1000 bytes. The binary (IEC) system treats each step as a power of 1024 and renames the units KiB, MiB, GiB, TiB, so 1 KiB = 1024 bytes. The gap is small at the kilobyte level but grows with each step: a binary terabyte is about 10% larger than a decimal one.
1 byte = 8 bits · n is the prefix step (KB = 1, MB = 2, GB = 3, TB = 4)
Worked example: 2 GiB in bytes
With the binary base, a gigabyte sits three steps above a byte, so multiply by 1024 three times.
- 1 Pick the base. Decimal uses 1000 per step (KB, MB, GB); binary uses 1024 (KiB, MiB, GiB). Here we use binary.
- 2 Find the prefix step n. A gigabyte is three steps above a byte, so n = 3 and the multiplier is 1024³ = 1,073,741,824.
- 3 Multiply the amount into bytes. 2 × 1,073,741,824 = 2,147,483,648 bytes.
- 4 Convert to other units as needed. For bits, multiply by 8: 2,147,483,648 × 8 = 17,179,869,184 bits.
Decimal vs binary prefixes
Exact byte counts for each prefix in both systems.
| Prefix | Decimal (SI) | Binary (IEC) |
|---|---|---|
| Kilo | KB = 1,000 bytes | KiB = 1,024 bytes |
| Mega | MB = 1,000,000 bytes | MiB = 1,048,576 bytes |
| Giga | GB = 1,000,000,000 bytes | GiB = 1,073,741,824 bytes |
| Tera | TB = 1,000,000,000,000 bytes | TiB = 1,099,511,627,776 bytes |
Why your 1 TB drive “loses” space
Drive and flash-memory makers advertise capacity in decimal units, so a “1 TB” drive holds 1,000,000,000,000 bytes. Most operating systems — Windows in particular — still divide by 1024 and label the result with the old “TB” symbol, reporting roughly 0.909 of that, about 931 GiB. Nothing is missing; the same byte count is just being divided by 1024 instead of 1000. macOS and Linux switched to decimal reporting years ago, which is why the same drive can show a different “size” on different machines. Knowing which base a tool uses is the only way to compare two figures fairly.