Skip to main content
Back to BlogConverter Guides

How to Convert Data Storage Units (the Byte Hub, the 1 TB Drive That's Really 931 GiB, and the Lowercase b That Costs You a Factor of Eight)

Convert data storage across 27 units in four families — learn the byte-as-hub method, why a 1 TB drive shows as 931 GiB, why the SI-vs-IEC gap grows from 2.4% at KB to 15.3% at EB, why 100 Mb is 12.5 MB not 100 MB, and why the download calculator mixes binary sizes with decimal speeds.

The Toolbox TeamAugust 14, 20267 min read

A 1 TB drive is 931 GiB. You weren't lied to. You were given two number systems.

Buy a "1 TB" drive, plug it in, the OS reports 931 GB — or 931 GiB. You do the math and it looks like you lost 69 GB. You didn't. The drive has exactly 1,000,000,000,000 bytes. The manufacturer used SI (decimal): 1 TB = 10¹² bytes. The OS uses IEC (binary): 1 GiB = 2³⁰ = 1,073,741,824 bytes. Divide 10¹² by 2³⁰ and you get 931.3. Same bytes, two labels, a 10% gap that grows with every prefix.

The Data Storage Converter handles 27 units across four families, all routed through the byte. The conversion is arithmetic; the trap is which system your number is in.

The byte is the hub

Every unit stores a toBase factor in bytes. To convert A → B, the tool multiplies by A's factor and divides by B's. Four families, 27 units:

  • Bits (7): b, nibble, Kb, Mb, Gb, Tb, Pb — network speeds, raw bit counts
  • Decimal SI (9): B, KB, MB, GB, TB, PB, EB, ZB, YB — drive labels, throughput
  • Binary IEC (8): KiB, MiB, GiB, TiB, PiB, EiB, ZiB, YiB — OS reports, RAM, file sizes
  • Legacy (3): 16-bit, 32-bit, 64-bit words — architecture-specific

No unit converts directly; all route through bytes. A two-step (Gb → GiB) is as accurate as a one-step (KB → MB).

SI vs IEC, and the gap that grows

Same prefix letter, two bases, and the divergence compounds:

SI (base-1000) Bytes IEC (base-1024) Bytes Diff
1 KB 1,000 1 KiB 1,024 2.4%
1 MB 1,000,000 1 MiB 1,048,576 4.9%
1 GB 1e9 1 GiB 1,073,741,824 7.4%
1 TB 1e12 1 TiB 1.1e12 10.0%
1 PB 1e15 1 PiB 1.126e15 12.6%
1 EB 1e18 1 EiB 1.153e18 15.3%

At KB the gap is 2.4% — rounding error. At TB it's 10%. At EB, 15.3%. The bigger the prefix, the more the systems disagree. A "500 GB" drive holds 465 GiB; macOS (decimal) reports 500 GB, Windows (binary) 465 GB. Both right, different bases.

The lowercase b costs you a factor of eight

b is bits, B is bytes, and the two never mix without a multiplier. The bits family is decimal: 1 Kb = 1000 bits = 125 bytes; 1 Mb = 1,000,000 bits = 125,000 bytes. So 100 Mb is 12.5 MB, not 100 MB. A "100 Mbps" plan is 12.5 MB/s of real throughput, before overhead. The factor of eight is where every speed-to-size conversion goes wrong: network speeds are decimal bits (1 Mbps = 10⁶ bits/s), file sizes are bytes in whichever base the label says, and throughput in MB/s = Mbps ÷ 8 with a base adjustment (decimal MB = 10⁶, MiB = 2²⁰). A nibble (4 bits, 0.5 bytes) rounds out the family; you'll never use it in a download calc.

The download calculator mixes conventions

The Download/Transfer Time panel takes a file size and a speed in Mbps. The math is honest: sizeBits = sizeBytes × 8; speedBps = speedMbps × 1,000,000; seconds = sizeBits / speedBps. But the file-size picker excludes bits and legacy units — you can pick KiB, MiB, GiB (binary) but not Kb. "1 GiB at 100 Mbps" mixes a binary size (1,073,741,824 bytes) with a decimal speed (100,000,000 bits/s). The seconds are correct in raw bytes; the labels cross standards. It's realistic — files are often GiB while links are always Mbps — but "1 GiB at 100 Mbps" takes 86.0 s, "1 GB at 100 Mbps" 80.0 s. Same number, different base, 7.5% apart.

The result shows four numbers: transfer time, file size (via formatBytes, decimal — 1024 bytes shows as "1.02 KB"), throughput in decimal MB/s (sizeBytes / seconds / 1e6), and "10% overhead." Throughput divides by 1,000,000, not 1,048,576 — 12.5 MB/s, not 11.9 MiB/s. Read the unit, not the number.

Gotchas

  • formatBytes is decimal. "File size" and "What fits" labels divide by 1000ⁿ, so 1024 bytes reads "1.02 KB," never "1 KiB." The comparison items (Text Email, JPEG) store binary 1024-multiplied byte counts but get KB/MB labels — invisible until you do the math.
  • History is noisy and ephemeral. Every keystroke that changes the result pushes an entry (the useEffect watches result); typing "1234" logs four rows. No localStorage — refresh clears all 20.
  • Favorites don't persist. Default set is GB, GiB, MB, TB, B. Click to set as the To unit and copy. Refresh resets.
  • Swap swaps units, not values. 5 GB → GiB, hit Swap, you get 5 GiB → GB. The "5" stays; only the units trade.
  • Precision 4 loses small values. 1 KB → TB at precision 4 = toFixed(4) "0.0000" → stripped to "0". Bump to 6, or convert to a smaller unit first.

Summary

  • 27 units across four families convert through the byte hub. SI (KB/MB/GB) is base-1000, IEC (KiB/MiB/GiB) is base-1024.
  • The SI-vs-IEC gap grows: 2.4% at KB, 7.4% at GB, 10% at TB, 15.3% at EB. A 1 TB drive is 931 GiB.
  • Lowercase b is bits, uppercase B is bytes — a factor of eight. 100 Mb = 12.5 MB. Network speeds are decimal bits; file sizes are bytes in whichever base the label says.
  • The download calculator mixes binary sizes with decimal speeds — 1 GiB at 100 Mbps takes 86 s, 1 GB takes 80 s. Throughput reports in decimal MB/s.
  • formatBytes is decimal, history logs every keystroke and clears on refresh, swap trades units but keeps the value. Convert at Data Storage Converter. For other quantities: volume, weight, length, temperature.