Convert file sizes between bytes, KB, MB, GB, TB and PB. Binary (1024) and decimal (1000) side by side, with exact byte counts and no rounding.
One unit converted to the next, in both prefix systems. Binary prefixes are KiB, MiB, GiB, TiB and PiB.
| Conversion | Binary (1024) | Decimal (1000) |
|---|---|---|
| 1 kB to Bytes | 1,024 | 1,000 |
| 1 MB to kB | 1,024 | 1,000 |
| 1 MB to Bytes | 1,048,576 | 1,000,000 |
| 1 GB to MB | 1,024 | 1,000 |
| 1 GB to Bytes | 1,073,741,824 | 1,000,000,000 |
| 1 TB to GB | 1,024 | 1,000 |
| 1 PB to TB | 1,024 | 1,000 |
Prefix definitions from NIST, The Binary Prefixes, and IEC 80000-13. The last column is how much smaller the binary reading of a fixed number of bytes is.
| Unit | Binary bytes | Decimal bytes | Binary reads lower by |
|---|---|---|---|
| Bytes / Bytes | 1 | 1 | — |
| KiB / kB | 1,024 | 1,000 | 2.34% |
| MiB / MB | 1,048,576 | 1,000,000 | 4.63% |
| GiB / GB | 1,073,741,824 | 1,000,000,000 | 6.87% |
| TiB / TB | 1,099,511,627,776 | 1,000,000,000,000 | 9.05% |
| PiB / PB | 1,125,899,906,842,624 | 1,000,000,000,000,000 | 11.18% |
You might also find these calculators useful
Enter a size, pick what you have and what you want, and get the answer in full precision — MB to GB, KB to MB, bytes to MB, TB to GB, and every other pair. Nothing is abbreviated: 1 GB comes back as 1,073,741,824 bytes, not a rounded approximation. Because storage is measured two different ways, every result also shows what the same number of bytes reads as under the other system.
Every file size is ultimately a count of bytes. The prefixes just group those bytes, and there are two competing ways to do it. Operating systems and memory use binary prefixes, where each step multiplies by 1024 — 1 KiB is 1,024 bytes and 1 MiB is 1,048,576. Drive manufacturers, network equipment and the SI standard use decimal prefixes, where each step multiplies by 1000. The gap compounds: it is 2.34% at the kilobyte and 11.18% at the petabyte, which is why a drive sold as 1 TB shows about 931 GiB once your computer measures it.
File Size Conversion
Divide by 1,024 in binary or by 1,000 in decimal. 16,384 MiB is exactly 16 GiB, and 4,096 MiB is 4 GiB.
Divide by 1,024 in binary or by 1,000 in decimal. 8,192 KiB is exactly 8 MiB, and 5,000 kB is 5 MB.
Divide by 1,048,576 in binary or by 1,000,000 in decimal. 2,500,000 bytes is 2.5 MB decimal, or about 2.38 MiB binary.
Multiply by 1,024 in binary or by 1,000 in decimal. A 1 TB drive holds 1,000 GB of decimal capacity, which your operating system reports as 931.32 GiB.
Services state their caps in different units — 25 MB for an email attachment, 8,192 KB for an upload form. Converting tells you whether a file clears the limit before you try.
A drive labelled in decimal units reports fewer binary units. Knowing the exact shortfall at each level explains a missing 68 GB without a support ticket.
RAM, JVM heap flags, container limits and disk images are specified in binary megabytes. 16,384 MiB is 16 GiB, and nothing else.
Transfer rates are quoted in bits and storage in bytes. The bit count sits alongside every conversion so the factor of eight is never guesswork.
1 GiB (binary) is 1,073,741,824 bytes — that is 1024³. 1 GB (decimal) is 1,000,000,000 bytes. The binary gigabyte is 7.37% larger, which is the entire source of the confusion.
Divide by 1,024 if you are working in binary units, or by 1,000 if you are working in decimal ones. So 16,384 MiB ÷ 1,024 = 16 GiB, and 4,096 MiB ÷ 1,024 = 4 GiB.
1,024 KiB in one MiB under binary prefixes, and 1,000 kB in one MB under decimal ones. Windows and macOS both count in 1,024, so a file shown as 8 MB is 8,192 KB.
The manufacturer counted in decimal terabytes: 1,000,000,000,000 bytes. Your operating system divides that by 1024³ instead of 1000³, giving 931.32 GiB. Nothing is missing — the two systems are labelling the same bytes differently, and the gap is 6.87% at that level.
KiB is unambiguous: 1,024 bytes, defined by IEC 80000-13. KB is used for both 1,000 and 1,024 bytes depending on who wrote it. This calculator shows both so you never have to guess which one a figure meant.
Use binary (1024) for anything your operating system reports — file sizes, RAM, container and heap limits. Use decimal (1000) for drive capacity, network speeds and anything quoted against the SI standard.