Find a course

Module 5: Text, Images and Data SizesLesson 11 of 1112 min

Bits, Bytes and Storage Sizes

Convert between bits, bytes, kilobytes, megabytes and gigabytes, tell decimal prefixes from binary ones and calculate how long a download really takes.

Step 1 of 12Learn

From bits to terabytes

Storage and file sizes are measured in bytes (8 bits). Bigger amounts use prefixes, just like meters and kilometers:

UnitSymbolBytes (decimal, SI)
kilobytekB1,000
megabyteMB1,000,000
gigabyteGB1,000,000,000
terabyteTB1,000,000,000,000

Each step up is 1,000 times bigger. To get a feel for the sizes: a page of plain text is a few kilobytes, a phone photo a few megabytes, a movie a few gigabytes, and a large laptop drive holds a terabyte or two.

Here's where it gets confusing. Because computers work in powers of two, memory and some software traditionally used the same names for powers of 210 = 1,024: a "kilobyte" of 1,024 bytes, a "megabyte" of 1,024 × 1,024 = 1,048,576 bytes, and so on. To end the confusion, standards bodies created separate binary prefixes:

UnitSymbolBytes
kibibyteKiB1,024
mebibyteMiB1,048,576
gibibyteGiBabout 1.074 billion

Not every program follows the standard yet, so you'll still see "MB" and "GB" used for both meanings.

Step 2 of 12Diagram

Typical sizes, from bytes to terabytes

Typical sizes, from bytes to terabytesScale: One ASCII letter, A page of plain text, A phone photo, An HD movie, A 1 TB drive.110²10⁴10⁶10⁸10¹⁰10¹²1 byteOne ASCII letter3,000 bytesA page of plain text3,000,000 bytesA phone photo4,000,000,000 bytesAn HD movie1,000,000,000,000 bytesA 1 TB drive
Illustrative typical sizes; actual files vary widely.
One ASCII letter

1 byte

A page of plain text

3,000 bytes

A phone photo

3,000,000 bytes

An HD movie

4,000,000,000 bytes

A 1 TB drive

1,000,000,000,000 bytes

Step 3 of 12Practice · Work it out

How many bits are in 3 kilobytes, using 1 kB = 1,000 bytes?

Step 4 of 12Learn

The missing gigabytes

Jamal buys a 1 TB external drive, plugs it in, and his computer says it holds about 931 GB. Was he cheated? No. It's the two meanings of the prefixes.

The manufacturer uses decimal units: 1 TB = 1,000,000,000,000 bytes. Some operating systems divide by powers of 1,024 but still label the result "GB":

1,000,000,000,000 ÷ (1,024 × 1,024 × 1,024) ≈ 931

So the drive really holds 931 GiB, which the computer displays as "931 GB." The bytes are all there; they're just counted in bigger units.

The gap grows with each prefix: a kibibyte is 2.4% bigger than a kilobyte, a mebibyte about 4.9% bigger than a megabyte, a gibibyte about 7.4% bigger, and a tebibyte about 10% bigger than a terabyte. For small files the difference hardly matters; for big drives it's very noticeable.

(Separately, a little space is also used by the file system itself and sometimes by preinstalled software, so the space available for your files can be a bit less still.)

When precision matters, look for the symbol: GB in a strict sense means 109 bytes and GiB means 230 bytes.

Step 5 of 12Practice · Chart

Drive size on the box vs what the computer shows

Tap the drive where the "missing" amount is largest.

Tap the bar that answers the question, then press Check.

Drive size on the box vs what the computer showsBar chart with 4 categories: 500 GB drive: Advertised (GB) 500, Shown (GiB) 466; 1 TB drive: Advertised (GB) 1,000, Shown (GiB) 931; 2 TB drive: Advertised (GB) 2,000, Shown (GiB) 1,863; 4 TB drive: Advertised (GB) 4,000, Shown (GiB) 3,725.01,0002,0003,0004,000500 GB drive1 TB drive2 TB drive4 TB drive5004661,0009312,0001,8634,0003,725
Same bytes, different units: the box uses 1 GB = 109 bytes, many systems divide by 230.
Drive size on the box vs what the computer shows
ItemAdvertised (GB)Shown (GiB)
500 GB drive500466
1 TB drive1,000931
2 TB drive2,0001,863
4 TB drive4,0003,725

Step 6 of 12Practice · Fill in the blanks

Fill in the blanks

One kibibyte (KiB) equals bytes, while one kilobyte (kB) in the standard SI sense equals bytes.

Step 7 of 12Learn

Bits per second and downloads

Here's another trap. File sizes are measured in bytes, but network speeds are measured in bits per second. Internet plans advertise megabits per second (Mbps or Mb/s, with a lowercase b), not megabytes.

Since a byte is 8 bits, a connection of 100 Mbps moves at most 100 ÷ 8 = 12.5 megabytes per second.

How long does a 2 GB game download take on that connection?

  • 2 GB = 2,000 MB (using decimal units)
  • 2,000 MB ÷ 12.5 MB/s = 160 seconds, about 2 minutes 40 seconds

In practice it usually takes longer: real speeds are often below the advertised maximum, Wi-Fi adds overhead, and the server sending the file may be slower than your connection.

The capital letter matters: MB is megabytes and Mb is megabits, a factor of 8 apart. Mixing them up makes downloads seem eight times faster or slower than they are.

A quick rule of thumb: to estimate download time in seconds, multiply the file size in megabytes by 8 and divide by your speed in megabits per second.

Step 8 of 12Diagram

From an internet plan to download speed

From an internet plan to download speedProcess diagram: 100 Mbps plan → Divide by 8 → 12.5 MB/s at best → Real speed a bit lower.100 MbpsplanDivide by 812.5 MB/s atbestReal speed abit lower

Tap a shape with to see more.

100 Mbps plan

Megabits per second: lowercase b.

Divide by 8

8 bits in a byte.

12.5 MB/s at best

Megabytes per second: uppercase B.

Real speed a bit lower

Network overhead and congestion take a share.

Step 9 of 12Try the calculator

Download time calculator

Speed in megabytes per second
12.5 MB/s
Download time (ideal)
160 s
Download time in minutes
2.7 min

Step 10 of 12Practice · Work it out

How many seconds does it take, at best, to download a 50 MB file on a 20 Mbps connection?

Step 11 of 12Note

Step 12 of 12Practice · Choose one

An internet plan is advertised at 400 Mbps. What is the fastest possible download rate in megabytes per second?