Data Storage Converter: Bytes, KB, MB, GB, TB and Their Binary Twins
By FindMySum · Last reviewed
A data storage converter shows a file size or drive capacity in bytes, kilobytes, megabytes, gigabytes, terabytes and petabytes, and in their binary counterparts, the kibibyte, mebibyte, gibibyte, tebibyte and pebibyte. The two families exist because computers count in powers of two while the metric prefixes count in powers of ten. For small numbers the gap is barely noticeable; at the terabyte scale it is about 10%, which is why a new drive never seems to hold what the box promised. This article sets out both systems, works through the default 1 GB example and explains when each one is the right choice.
Decimal and binary units
The converter offers eleven units. All are defined in bytes, and a byte is eight bits.
| Decimal unit | Bytes | Binary unit | Bytes |
|---|---|---|---|
| kilobyte (KB) | 1,000 | kibibyte (KiB) | 1,024 |
| megabyte (MB) | 1,000,000 | mebibyte (MiB) | 1,048,576 |
| gigabyte (GB) | 1,000,000,000 | gibibyte (GiB) | 1,073,741,824 |
| terabyte (TB) | 10¹² | tebibyte (TiB) | 1,024⁴ |
| petabyte (PB) | 10¹⁵ | pebibyte (PiB) | 1,024⁵ |
The decimal prefixes are the standard SI prefixes from the SI Brochure. The binary prefixes were adopted by the International Electrotechnical Commission in 1998 and are now part of IEC 80000-13; NIST publishes a summary of them. Each step up the binary ladder multiplies by 1,024 instead of 1,000, which is 2.4% more, and the difference compounds: a kibibyte is 2.4% larger than a kilobyte, but a tebibyte is nearly 10% larger than a terabyte.
Who uses which
Drive makers, SSD and memory card packaging, network speeds and cloud storage prices use decimal units. RAM, processor caches and many operating system tools use binary units, though they often label them KB, MB and GB without the "i". Windows File Explorer reports sizes in binary units with decimal labels. macOS and many Linux desktop tools have used decimal units for years, so the same file can show slightly different sizes on different machines.
How the converter calculates
The value you enter is multiplied by the size of the From unit in bytes, then divided by the size of every other unit. The calculation uses decimal arithmetic, so even petabyte values keep every digit until the final step. Each result is then rounded to six significant figures, with at least two decimal places, and trailing zeros are dropped.
Worked example: 1 GB
The converter opens with 1 GB converted to megabytes.
- One gigabyte is 1,000,000,000 bytes.
- One megabyte is 1,000,000 bytes, so 1,000,000,000 ÷ 1,000,000 = 1,000 MB, exactly.
- In kilobytes the same gigabyte is 1,000,000 KB, and in terabytes 0.001 TB.
- In binary units, 1,000,000,000 ÷ 1,048,576 = 953.6743… MiB, shown as 953.674 MiB.
- In gibibytes, 1,000,000,000 ÷ 1,073,741,824 = 0.931323 GiB.
- In kibibytes, 1,000,000,000 ÷ 1,024 = 976,562.5 KiB.
So a file your phone calls 1 GB may appear as about 954 "MB" in a program that counts in binary.
Common mistakes
Mixing bits and bytes. Internet plans are sold in megabits per second (Mbps), while file sizes are in megabytes. Divide bits by eight before comparing. The download time calculator does that step and lets you allow for network protocol overhead.
Using 1,024 for everything. A 500 GB drive is 500 × 10⁹ bytes. Converting it with 1,024 at each step gives 465.661 GiB, which is the right number in binary units but the wrong number if you call it gigabytes.
Assuming a missing gigabyte is lost space. Formatting a drive reserves some space for the file system, and the operating system may round the figure. Neither is a fault in the drive.
Rounding at each step. Converting TB to GB, rounding, then converting to MiB introduces small errors. Convert straight from the original unit; the converter shows every unit from a single calculation.
Reading a binary figure as a decimal one. If a backup tool says a folder is 50 GB but counts in binary, it really holds about 53.6871 GB in decimal units. Check which convention a program uses before buying a drive that is only just big enough.
More questions
Why does my 128 GB phone show much less free space?
Two things happen at once. The operating system and pre-installed apps take up a large share before you store anything, and some devices report capacity in binary units while the box uses decimal ones. 128 GB is 128,000,000,000 bytes, which is about 119.209 GiB. The rest of the gap is the system itself, not a conversion.
Does the capital letter in KB or kB matter?
In the SI, the kilo prefix is a lowercase k, so 1,000 bytes is strictly written kB. KB with a capital K is common in software and on packaging, and this converter accepts KB as 1,000 bytes. The b matters far more than the k: B is a byte and b is a bit, which is eight times smaller.
Why do some memory specifications still say 1 KB = 1,024 bytes?
The JEDEC standards used for semiconductor memory kept the older convention in which kilo, mega and giga mean 1,024, 1,024² and 1,024³ when describing memory capacity. The IEC binary prefixes (KiB, MiB, GiB) were created to remove that ambiguity. When you see a memory size, assume binary; for drives and network transfers, assume decimal.
How many photos or songs fit in a gigabyte?
Divide the capacity by the average file size in the same unit. With 4 MB photos, 1 GB holds 1,000 ÷ 4 = 250 photos. With 8 MB songs it holds 125. File sizes vary with resolution, compression and format, so treat the result as an estimate, and leave headroom for the file system.
What comes after the petabyte?
The decimal sequence continues with the exabyte (10¹⁸ bytes), zettabyte (10²¹), yottabyte (10²⁴), and since 2022 the ronnabyte (10²⁷) and quettabyte (10³⁰). The binary side continues with the exbibyte, zebibyte and yobibyte. The converter stops at PB and PiB, which covers everything from a single file to a large data centre.
Why does the converter show 0.931323 GiB for 1 GB, not 0.93?
Every result is rounded to six significant figures, but never to fewer than two decimal places, the same rule as every other converter on the site. One gigabyte is 1,000,000,000 ÷ 1,073,741,824 GiB, which is 0.9313225746…, so six significant figures gives 0.931323. Round further yourself if you only need two places.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.