Skip to main content

Bytes, KB, MB, GB, TB: Why Data Storage Units Never Quite Add Up

A plain guide to data storage units — bytes, KB, MB, GB, TB — and the 1000 vs 1024 split (decimal SI vs binary IEC, KiB/MiB) that makes a 1 TB drive read as 931 GiB.

Published By Li Lei
#data storage #bytes #unit conversion #file size #developer tools

Bytes, KB, MB, GB, TB: Why Data Storage Units Never Quite Add Up

There is one number in computing that quietly causes more confusion than almost any other, and it isn't large. It's the difference between 1000 and 1024. A storage vendor prints one of them on the box, your operating system uses the other to fill the progress bar, and the gap between the two is exactly why a brand-new "1 TB" drive shows up with roughly 931 GB of space the moment you plug it in. Nothing is broken. Nobody short-changed you. Two counting systems are looking at the same pile of bytes and labeling it differently.

This guide walks through how data storage units actually fit together, where the 1000-versus-1024 split comes from, and how to stop getting tripped up by it.

The base unit: a byte, and the bit hiding underneath it

Everything starts with the byte. A byte is 8 bits, and a bit is a single 0 or 1. That 8-to-1 ratio matters more than people expect, because it's where a different kind of mistake lives: internet speed is sold in bits, but file sizes are measured in bytes.

A connection advertised as 100 Mbps moves 100 megabits per second. Divide by 8 and you get about 12.5 MB/s of actual download throughput, before any protocol overhead. So a "100 meg" plan pulls a 1 GB file in roughly 80 seconds, not 10. The tell is the case of the letter: a lowercase b means bits, an uppercase B means bytes. Mix them up and every number is off by a factor of 8.

Above the byte, units climb in steps of a thousand-ish: kilobyte, megabyte, gigabyte, terabyte, petabyte. The "ish" is the whole problem.

Decimal (SI) versus binary (IEC): the heart of the confusion

Here is the single most important fact in this entire post:

  • 1 KB = 1000 bytes (decimal, the SI metric definition)
  • 1 KiB = 1024 bytes (binary, the IEC definition)

They are not the same unit. KB is a kilobyte. KiB is a kibibyte. The decimal scale uses powers of 1000 and the familiar prefixes K, M, G, T. The binary scale uses powers of 1024 and the prefixes Ki, Mi, Gi, Ti — kibi, mebi, gibi, tebi.

Why 1024? Computers address memory in binary, so the round numbers are powers of two. 2 to the 10th power is 1024, the closest power of two to 1000, and early engineers simply borrowed the "kilo" prefix for it. That casual borrowing is the source of forty years of mislabeled progress bars. From there:

  • 1 KiB = 1024 bytes
  • 1 MiB = 1024 KiB = 1,048,576 bytes
  • 1 GiB = 1024 MiB = 1,073,741,824 bytes

At the kilobyte level the two scales differ by only 2.4 percent, which is small enough to ignore. But the error compounds at every step. By the terabyte level, a decimal TB is about 9 percent smaller than a binary TiB. That's no longer a rounding quirk; that's tens of gigabytes of apparent space appearing or vanishing depending on which scale you read.

A worked example: the 1 TB drive that shows 931 GiB

Let's run the math that confuses millions of people every year.

You buy a 1 TB hard drive. The manufacturer counts in decimal, so by their reckoning:

1 TB = 1,000,000,000,000 bytes (a clean trillion)

Now Windows displays the capacity. Internally it divides by 1024 three times to get gibibytes — but then, for historical reasons, it labels the result "GB" instead of "GiB". So:

1,000,000,000,000 ÷ 1024 ÷ 1024 ÷ 1024 ≈ 931

You see 931 GB, which is really 931 GiB. The drive holds every byte it promised. The maker counted in 1000s, the OS counted in 1024s, and the only thing missing is a matching label.

This scales predictably. A 2 TB SSD (2,000,000,000,000 bytes) reads as about 1862 GiB, or 1.819 TiB. A 4 TB drive lands near 3.64 TiB. Once you've seen the pattern, the "shrinking" drive stops being alarming and becomes arithmetic. If you'd rather not do the division by hand, the Data Storage Converter keeps the decimal GB figure and the binary GiB figure side by side in the same view, so you can read both off one screen.

Why I stopped trusting the label and started trusting the byte count

I learned this the hard way reviewing a storage invoice. We were comparing three cloud tiers: one quoted "500 GB", another "0.5 TB", and a third "512 GiB". My first instinct was that they were basically the same and the price was all that mattered. They are not the same. 500 GB and 0.5 TB are identical to the byte — 500,000,000,000 of them. But 512 GiB is about 550,000,000,000 bytes, roughly 10 percent more storage hiding behind a different prefix. I'd nearly recommended the most expensive option per actual byte because I trusted the label instead of the count. Since then my rule is simple: convert everything down to raw bytes before comparing anything, and never assume two prefixes that look alike mean the same amount.

Where the difference actually bites in practice

A few places this split shows up in real work:

  • Reading drive and SSD specs. The box says decimal TB; the OS shows binary TiB labeled as TB. The "missing" space is just two counting systems, not a defect.
  • Validating file size limits in code. An API that rejects files "over 25 MB" might mean 25,000,000 bytes (decimal) or 26,214,400 bytes (binary). Pick the wrong one and you reject valid uploads or accept oversized ones. AWS S3, for example, bills in binary GiB while printing "GB" on the dashboard.
  • Estimating download time. Convert the connection's megabits to bytes per second first (divide by 8), then divide the file size. A 300 Mbps line is about 37.5 MB/s, so a 4 GB game lands in just under two minutes — not the 11 seconds a naive "300 = MB/s" guess would suggest.
  • Comparing storage quotas across vendors. Line up the byte counts, not the labels, and the cheapest tier per real byte usually isn't the one with the biggest-looking number.

For non-storage conversions — length, weight, temperature, and the rest — the general unit converter covers the metric and imperial systems, while a dedicated base converter handles the binary, octal, and hexadecimal math that underpins why 1024 exists in the first place.

The short version to remember

Storage vendors and networks count in 1000s (decimal SI: KB, MB, GB, TB). Operating systems and RAM count in 1024s (binary IEC: KiB, MiB, GiB, TiB) but often borrow the decimal labels, which is what makes a 1 TB drive read as 931 GiB. Bits and bytes differ by 8, with case as the only clue. When two numbers need to be compared, convert both to plain bytes and let the byte count settle it. Do that, and the storage units that "never quite add up" turn out to add up perfectly — you were just reading two different rulers.


Made by Toolora · Updated 2026-06-13