Skip to content
Free Tool Arena

How-To & Life · Guide · Unit Converters

How to convert data sizes

Binary (1024) vs decimal (1000) prefixes, MiB vs MB, why drive makers disagree with your OS, bits vs bytes in bandwidth, and avoiding off-by-1000 errors.

Updated April 2026 · 6 min read

A kilobyte is 1,000 bytes, except when it’s 1,024 bytes, and the answer depends on who you ask and when. RAM manufacturers and operating systems use powers of two (1,024 = 210), because memory is physically organized in binary. Storage manufacturers (hard drives, SSDs) use powers of ten, because the marketing numbers look larger. IEC 60027-2 resolved this in 1998 by giving the binary versions their own prefix (KiB, MiB, GiB) and keeping the decimal prefixes (KB, MB, GB) for base ten. Almost nobody follows that cleanly. Network bandwidth is usually measured in bits per second, not bytes per second, which adds a factor-of-8 confusion when comparing “100 Mbps internet” with “100 MB/s disk.” This guide covers bits and bytes, decimal versus binary prefixes, the IEC standard, bandwidth versus storage, and how to translate between the three worlds without getting the answer off by 10% or 1,000×.

Advertisement

Bits and bytes

A bit is a single binary digit—0 or 1. A byte is 8 bits, enough to represent 256 distinct values or one ASCII character. Lowercase b means bit (Mbps = megabits per second); uppercase B means byte (MB = megabyte). Mixing them up gives 8× errors.

1 byte (B)  = 8 bits (b)
1 nibble    = 4 bits (half a byte)

"100 Mbps" = 100 megabits per second = 12.5 MB/s
"100 MB/s" = 100 megabytes per second = 800 Mbps

Decimal prefixes (SI / storage marketing)

1 KB  = 1,000 B         (kilobyte, SI)
1 MB  = 1,000 KB = 1,000,000 B
1 GB  = 1,000 MB = 10⁹ B
1 TB  = 1,000 GB = 10¹² B
1 PB  = 1,000 TB = 10¹⁵ B
1 EB  = 1,000 PB = 10¹⁸ B

Storage manufacturers quote disk sizes in decimal. A “1 TB” hard drive holds 1012 = 1,000,000,000,000 bytes. When the operating system reports it, Windows (using binary interpretation) shows it as roughly 931 GB, which is where users feel cheated. The drive is the size the label says in decimal, and 931 in binary.

Binary prefixes (IEC 60027-2)

1 KiB = 1,024 B              (kibibyte)
1 MiB = 1,024 KiB = 2²⁰ B    = 1,048,576 B
1 GiB = 1,024 MiB = 2³⁰ B    = 1,073,741,824 B
1 TiB = 1,024 GiB = 2⁴⁰ B    = 1,099,511,627,776 B
1 PiB = 1,024 TiB = 2⁵⁰ B

The IEC introduced these prefixes in 1998 specifically to disambiguate. “Kibi,” “mebi,” “gibi” sound awkward but they’re unambiguous. Linux distributions, some server tools, and a growing number of software vendors use them. Windows and Apple still show binary values with the decimal names (GB meaning GiB), which is the primary source of confusion.

The KB vs KiB discrepancy

The gap grows with scale:

Unit  Decimal       Binary         Discrepancy
KB    1,000         1,024           2.4%
MB    1,000,000     1,048,576       4.9%
GB    10⁹           1.07 × 10⁹      7.4%
TB    10¹²          1.10 × 10¹²     9.9%
PB    10¹⁵          1.13 × 10¹⁵    12.6%

At the gigabyte scale, the “missing 7%” of your new hard drive is the decimal-vs-binary gap, not a manufacturer cheat. At terabyte scale, it’s 10% of the label.

Memory uses binary; storage uses decimal

RAM modules and CPU caches are sold in binary amounts because memory chips are organized in power-of-two rows and columns. A 16 GB DIMM really holds 16 × 1,073,741,824 = 17.18 billion bytes. Storage devices (HDD, SSD, USB sticks) are sold in decimal: a “2 TB” SSD holds 2 × 1012 = 2 trillion bytes. Operating systems often show both kinds of sizes in binary with decimal labels, which is why disk space always looks smaller than advertised and memory never does.

Bandwidth vs storage

Network speed is quoted in bits per second. Storage speed is usually inbytes per second. To compare:

100 Mbps internet = 100,000,000 bits/s = 12.5 MB/s
1 Gbps fiber      = 1,000,000,000 bits/s = 125 MB/s
10 Gbps backbone  = 1.25 GB/s

Home Wi-Fi rated "1200 Mbps" delivers ~150 MB/s at best.
Downloading a 1 GB file on 100 Mbps takes about 80 seconds
(not 10 seconds, because of the factor of 8).

File sizes in practice

Plain text email       ~10 KB
JPEG photo (phone)     2-5 MB
MP3 song (3.5 min)     ~3.5 MB
1080p video (1 min)    ~130 MB
4K video (1 min)       ~400 MB
Linux ISO              ~3 GB
Full-resolution movie  ~50 GB (Blu-ray quality)
Large dataset          ~1 TB+

Throughput math

To estimate download time, divide file size by bandwidth after converting both to the same unit. A 4 GB movie on a 50 Mbps connection: 4 GB × 8 = 32 Gb; 32 Gb / 0.05 Gbps = 640 s = 10.7 minutes. Real-world throughput is typically 60–80% of advertised bandwidth due to protocol overhead, so plan on 14 minutes.

Block sizes and filesystems

Filesystems allocate space in blocks (typically 4 KiB on modern systems). A 1-byte file still consumes 4 KiB on disk. When you have millions of small files, the difference between their sum of sizes and their actual disk usage can be dramatic. Tools likedu on Unix report actual block usage; tools that sum file metadata report logical size.

Base64 and text encoding overhead

When binary data is Base64-encoded for text transport, it inflates by 33%. A 1 MB image becomes a 1.33 MB string. JSON-encoded binary (via Base64) in a web API carries this tax. For large payloads, use binary transport (gRPC, multipart) instead.

How to report sizes honestly

Specify your base explicitly if the audience might care: “500 GB (500,000,000,000 bytes)” or “512 GiB (binary)” removes ambiguity. Software vendors increasingly use IEC prefixes (KiB, MiB, GiB) in documentation but still show decimal prefixes to users because “MB” is more recognizable.

Common mistakes

Confusing bits and bytes. Mbps is bits per second; MB/s is bytes per second. The ratio is 8. A 100 Mbps internet plan gives you 12.5 MB/s downloads, not 100.

Assuming GB means 1,073,741,824 bytes. Modern documentation treats GB as decimal (109) and GiB as binary (230). Windows still uses GB for binary values, which confuses comparisons between OS reports and drive labels.

Comparing Windows GB to storage label GB. Your 1 TB drive shows as 931 GB in Windows because Windows uses binary GB (really GiB) and the drive is labeled in decimal TB. Nothing is missing.

Ignoring protocol overhead. Advertised 100 Mbps delivers 60–80 Mbps in practice after TCP/IP headers, retransmissions, and Wi-Fi encoding. Plan accordingly.

Using “KB” to mean 1,024 in some places and 1,000 in others.Pick a convention per document and stick with it. Prefer KiB/MiB when binary is what you mean.

Summing logical file sizes to estimate disk usage. A directory of 1,000 tiny files takes more disk space than a text file of the summed bytes, because of block allocation. Use du, not a recursive list of sizes.

Assuming Base64 is “just text.” It inflates binary by 33%. For large payloads, this matters for bandwidth bills and memory use.

Run the numbers

Paste any data size into our data size converter to see both decimal (KB, MB, GB) and binary (KiB, MiB, GiB) values side by side. Pair it with the Base64 encoder for sanity-checking the post-encoding size of binary data, and the unit converter for the broader family of scale conversions where you also need distance or time.

Advertisement

Found this useful?Email