Understanding computer storage units and transfer speeds

Table of contents

Units in digital storage and data transfer are everywhere, but there is no universally agreed standard. To make matters worse, the units and their abbreviations are very similar, leading unsuspecting users to make wrong assumptions about storage sizes and transfer speeds.


Basic storage units

The smallest storage units are the most important to understand, as all others are a multiple of them.


  • Bit - a single binary bit, either 0 or 1. This is the smallest storage unit for computers. Written as a lowercase b, e.g. 14 b for 14 bits.

  • Byte - 8 bits. Enough space to store a single ASCII characters, like a letter or digit. Written as an uppercase B, e.g. 14 B for 14 bytes.

Larger storage units

The next larger unit sizes are cause for some confusion, but are really simple once understood. There are two different units, one based on decimal metric units (orders of 1000), the other based on binary units (orders of 1024).

Decimal bit units:

  • Kilobit (Kb) - 1000 Bits
  • Megabit (Mb) - 1000 Kilobits (1,000,000 bits)
  • Gigabit (Gb) - 1000 Gigabits (1,000,000,000 bits)

Binary bit units:

  • Kibibit (Kib) - 1024 bits
  • Mibibit (Mib) - 1024 Kibibits (1,048,576 bits)
  • Gibibit (Gib) - 1024 Mibibits (1,073,741,824 bits)

Decimal byte units:

  • Kilobyte (KB) - 1000 bytes (8,000 bits)
  • Megabyte (MB) - 1000 Kilobytes (8,000,000 bits)
  • Gigabyte (GB) - 1000 Megabytes (8,000,000,000 bits)

Binary byte units:

  • Kibibyte (KiB) - 8192 bits
  • Mibibyte (MiB) - 1024 Kibibytes (8,388,608 bits)
  • Gibibyte (GiB) - 1024 Mibibytes (8,589,934,592 bits)

All four units are multiples of a single bit, so they can be visualized in a diagram:


The short forms of the units can be told apart easily by following two rules to tell them apart:


  • A lowercase b means bit, a capital B byte. Kb means Kilobit, KB Kilobyte.

  • units are binary if they have an i in the short form (Kib, GiB) or a bi in their name (Kibibyte, Gibibit)
  • others are decimal (MB, GB, Kilobyte, Gigabit)

Transfer speed units

The speed of file transfers is measured in bits or bytes per second (or larger units). When measuring internet speeds, the most common abbreviations are:

  • Gbps or Gb/s for gigabits per second
  • GBps or GB/s for gigabytes per second
  • GiBps or GiB/s for gibibytes per second

Internet service providers and network operators typically measure their services in Gbps, while most operating systems measure file sizes in GiB. This leads to some confusion, since "gigabit internet" is used as an advertisement term, referring to download speeds of 1 Gbps. Unsuspecting customers may assume they can download a 1GiB file in one second - which isn't the case, as Gbps means gigabits per second. Since 1Gb is roughly 0.116 GiB, the download will take around 8.6 seconds instead of the naively assumed 1 second.

Gigabyte vs Gibibyte confusion

The confusion around GB and GiB is a combination of multiple factors. In the very early stages of computing, a Kilobyte was used to refer to both the decimal and binary variants, as the difference was so tiny it rarely mattered (2.4%, 24 bytes). The kibibyte standard was adopted by the IEC in 1998 and endorsed by National Institute of Standards and Technology (NIST) in 1999.

However, this scientific definition did not matter to most people, as the difference in sizes was minimal and everybody was already accustomed to saying "Kilobyte", so the name stuck with a wrong definition in many heads. It was also easier to remember, given that the International System of Units (SI) and it's metric units (kilogram, kilometer etc) were already the most widely used measuring system in the world, so switching to "Kibibyte" to refer to slightly more than 1000 bytes seemed like overkill to the general public at the time.

As storage and file sizes grew, the issue became more pronounced. Since the measuring units represent exponential multiples of bytes, the rift in size also grows exponentially the higher the measuring unit. To better understand this:


  • 1 KB = 0.9766 KiB (2.4% / 24 bytes difference)
  • 1 MB = 0.9537 MiB (4.86% / 48,576 bytes difference)
  • 1 GB = 0.9313 GiB (7.37% / 73,741,824 bytes difference)
  • 1 TB = 0.9095 TiB (9.95% / 99,511,627,776 bytes difference)

While the difference for kilobytes is practically negligible, the size discrepancy of terabytes and tebibytes is significant.

About "shrinking" disks and files

As long as users stick to one measuring unit, it typically does not matter which one they use. As long as all units are consistent, they can be used to gain an understanding of relative weight between files or disk sizes. Problems occur when measuring units are mixed or mistaken for a different one. This will occur naturally in some situations, but we need some background information to understand it:


  • Linux tools mostly default to GiB for measuring file sizes, using the abbreviation "G" for display. They can optionally calculate in GB instead.

  • MacOS uses GB for calculations and displaying

  • Windows uses GiB to calculate sizes, but then wrongly labels it as "GB" in the UI

  • Storage media like harddrives and usb drives use GB to measure storage capacity

When copying a "1GB" file from MacOS to windows, it will turn into "0.9313226GB". Users will immediately assume something must have gone wrong during copying, or some form of compression was applied. This is not the case: both operating systems are referring to the filesize 8,000,000,000 bits, but windows displays it as different measuring unit than it used for calculations.

This effect can be encountered when installing a new disk on a windows system: A new harddrive with a 1TB capacity will show up as just over 900GB in windows, leaving users confused as to where the rest of the storage went. In truth, it simply measured the disk as ~910GiB and incorrectly displayed it as GB.

The shrinking disk issue is only compounded by other factors, like space being reserved for filesystem metadata or recovery partitions, further reducing the usable storage size of a newly purchased disk

More articles

A Practical Guide to Linux Disk Encryption

Keeping disk contents safe from prying eyes

Editing files with nano

Terminal file-editing made easy

Understanding bash stream redirection

Controlling the flow of data in and out of programs

Modern linux networking basics

Getting started with systemd-networkd, NetworkManager and the iproute2 suite

Understanding how RAID 5 works

Striking a balance between fault tolerance, speed and usable disk space

A practical guide to filesystems

Picking the best option to format your next drive