Dev.to WebDev 🛠 Dev 👁 2 📖 2 min read

MB vs MiB: Why Your 1 TB Drive Shows 931 GB

Your new 1 TB drive shows up as about 931 GB. A file manager says a video is 1.2 GB while a cloud service lists it as 1.1 GB. Nothing is broken: two different counting systems are in play, and once you know which one a t

Your new 1 TB drive shows up as about 931 GB. A file manager says a video is 1.2 GB while a cloud service lists it as 1.1 GB. Nothing is broken: two different counting systems are in play, and once you know which one a tool uses, the numbers line up.

Two definitions of "kilo"

In the decimal (SI) system, prefixes work like everywhere else in science: 1 kilobyte (kB) = 1,000 bytes, 1 megabyte (MB) = 1,000 kB, 1 gigabyte (GB) = 1,000 MB, and 1 terabyte (TB) = 1,000 GB.

In the binary system, each step is 1,024 (2^10) instead of 1,000, because memory addresses are naturally powers of two. To avoid confusion, the IEC defined separate names for these units: kibibyte (KiB), mebibyte (MiB), gibibyte (GiB) and tebibyte (TiB). So 1 GiB = 1,024 MiB = 1,073,741,824 bytes.

The trouble is that many programs still label binary values with the decimal names, showing "GB" when they really mean GiB.

Who uses which system

  • Storage manufacturers (SSDs, hard drives, USB sticks, memory cards) use decimal units. A 1 TB drive holds 1,000,000,000,000 bytes.
  • Windows File Explorer calculates in binary but displays "GB" and "TB". That same drive appears as roughly 931 GB.
  • macOS (since 10.6) and many Linux desktop tools use decimal units, so the drive appears close to 1 TB.
  • RAM is built in binary sizes; an "8 GB" module is really 8 GiB.
  • Network speeds are a separate case: they are quoted in bits per second (Mbps), not bytes. Divide by 8 to get megabytes per second.

Quick conversions

To turn a decimal size into the binary figure your OS may show, divide by 1.024 once per step:

  • 500 GB drive: 500,000,000,000 / 1,073,741,824 ≈ 465.7 GiB
  • 1 TB drive: ≈ 931.3 GiB
  • 2 TB drive: ≈ 1.82 TiB

The gap grows with each prefix: about 2.4% at kilo, 4.9% at mega, 7.4% at giga and 9.1% at tera. On top of this, formatting, recovery partitions and file system metadata take a little extra space, so the usable figure is a bit lower again.

Practical tips for developers

  • In code, pick one convention and label it honestly. If you divide by 1,024, print KiB/MiB/GiB.
  • When estimating how many photos or videos fit on a device, check how a storage capacity calculator counts so your estimate matches what users see.
  • For download time estimates, convert the file size to bits first, then divide by the connection speed.

Getting units right is a small detail that prevents a lot of "where did my space go?" support tickets.

Learn more

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.