Every dayUnit Conversions

Data Storage
converter.

Convert bits, bytes, GB and GiB, and see why a new drive looks smaller in Windows.

How it's worked out

Every conversion goes through bytes. The tool writes your amount in bytes, then divides by the number of bytes in the unit you want. A byte is 8 bits, so bit units pick up a factor of 8 on the way.

1 kB\displaystyle 1\ \text{kB}=103 bytes\displaystyle {}= 10^{3}\ \text{bytes}1 KiB\displaystyle 1\ \text{KiB}=210\displaystyle {}= 2^{10}=1024 bytes\displaystyle {}= 1024\ \text{bytes}1 byte\displaystyle 1\ \text{byte}=8 bits\displaystyle {}= 8\ \text{bits}

There are two families of prefixes. The decimal ones (kilo, mega, giga, tera, peta) step up by 1,000 each time, like the SI prefixes in kilometer. The binary ones (kibi, mebi, gibi, tebi, pebi) step up by 1,024 each time. They were added by the IEC in 1998 because computer memory comes in powers of 2, and people had been using "kilobyte" for both.

So a gibibyte is 1,073,741,824 bytes, about 7% more than a gigabyte. The gap grows with each step: 2.34% at kilo, 9.05% at tera and 11.18% at peta. Both families are defined exactly, so the tool can tell you when a decimal is exact and when it is rounded.

Worked examples

Priya's new 2 TB drive

Priya plugs in a 2 TB external drive and Windows reports 1.81 TB. She has not lost anything. The drive holds 2 × 10¹² bytes. Windows divides by 2⁴⁰ and gets 1.81899 TiB, then labels it TB. A 1 TB drive shows up as about 931 GB for the same reason.

Open this example in the tool

Marcus and his 500 Mbps plan

Marcus pays for 500 Mbps, but downloads never pass about 60 MB/s. The plan is in megabits. Dividing by 8 gives 62.5 MB each second at most. At that rate a 120 GB game takes at least 32 minutes, and real downloads take longer.

Open this example in the tool

A Docker memory limit and a stick of RAM

Lena sets a container limit of 512 MiB. In the decimal megabytes her cloud dashboard uses, that is 536.871 MB. Her laptop's "16 GB" of RAM is really 16 GiB, which is 17.1799 GB. Memory is the one place where GB on the label usually means the binary unit.

Open this example in the tool

Reading your result

The big number is your amount in the unit you picked. The line under it says whether that decimal is exact, and gives the size of the unit as a power, such as 2⁴⁰ bytes. The tiles show the amount in bytes and bits and what Windows would show.

The Decimal against binary chart shows the same amount at every prefix. The shorter bar is always the binary one, because its unit is bigger. Tap a row to convert that pair. The card beside it puts the number on the box next to the number Windows shows. A 256 GB phone or SSD shows as about 238.419 GB in Windows. On a Mac or an iPhone you see the number on the box.

The drive table lists common sizes from 32 GB to 20 TB with the number Windows shows. A size sold in GB comes out 6.87% smaller. A 1 TB drive drops below 1 TiB, so Windows shows it in GB. From 2 TB up it shows TB, and the number is 9.05% smaller. Sort the table or download it as a CSV to check a drive before you buy.

The speed box takes kbit/s, Mbit/s, Gbit/s or MB/s and converts itself when you change the unit. The time it gives is the best case. A 4 GB video at 100 Mbps takes at least 5.3 minutes, and Wi-Fi, a busy server or a shared line will stretch that.

Common mistakes

  • Reading Mb as MB. A small b is bits and a capital B is bytes. 100 Mbps is 12.5 MB each second, not 100.
  • Thinking a new drive is short. The space is all there. The number is smaller because Windows uses bigger units, then the file system and any preinstalled files take a little more.
  • Using 1,024 for network speeds. Network gear counts in powers of 1,000. A gigabit link is 125 MB/s at most, not 128.
  • Buying cloud storage in the wrong unit. Some providers bill per GB and some per GiB. A plan priced per GiB gives you about 7% more bytes than the same number of GB.
  • Writing KB for 1,024 bytes in a spec. Use KiB when you mean 1,024. KB is 1,000 by the SI rule, and readers will take it that way.

Questions people ask

By the SI rule, 1 GB is 1,000 MB, or 10⁹ bytes. The unit that holds 1,024 MiB is the gibibyte, GiB. Windows and many older programs still write GB for the binary unit, which is where the confusion comes from.

Sources