MB vs MiB: Decimal and Binary Storage Prefixes

A megabyte (MB) is 1 000 000 bytes and a mebibyte (MiB) is 1 048 576 bytes. Drive makers count storage in the first and memory makers in the second, so one label can stand for two sizes.

What is the difference between MB and MiB?

A mebibyte is 48 576 bytes larger than a megabyte: 1 MiB is 1.048576 MB.

The two units share a first syllable and almost nothing else. The megabyte takes the SI prefix mega, which is a power of ten. The mebibyte takes the binary prefix mebi, which is a power of two, and the letter i in its symbol is the only mark that says so.

The megabyte and the mebibyte side by side.
PropertyMegabyteMebibyte
Symbol MB MiB
Prefix mega (M) mebi (Mi)
Prefix factor 10^6 2^20 = 1048576
Bytes 1000000 1048576
Prefix system SI, powers of ten IEC, powers of two
Step to the next unit up 1000 1024

The same split runs through every size on the ladder. A kilobyte is 1000 bytes and a kibibyte is 1024; a gigabyte is 1 000 000 000 bytes and a gibibyte is 1 073 741 824. Each binary unit is a fixed multiple of its decimal namesake, so converting between them is one multiplication, not a judgement call.

To see both readings of one size at once, read a gigabyte as MB and as MiB. Going up the ladder instead, take megabytes up to gigabytes both ways.

Why are there two kinds of megabyte?

Because computing borrowed the metric prefixes before it had any of its own. NIST gives the history in one line:

Computer professionals noticed that 2^10, which is 1024, is very nearly 1000, and started using the SI prefix kilo to mean 1024.

By NIST's account, that worked while only computer professionals used the words. It stopped working once the same word reached people who know that a kilometre is 1000 metres, and once storage grew to gigabytes and terabytes, where the gap between 1000 and 1024 compounds. The SI rules out the second meaning:

The SI prefixes refer strictly to powers of 10: one kilobit is 1000 bits, not 1024 bits.

So the binary sizes were given names of their own. For the decimal ladder in full, see every SI prefix from quecto to quetta.

The IEC approved names and symbols for prefixes for binary multiples in December 1998 and published them in January 1999 as Amendment 2 to IEC 60027-2; IEC 80000-13 now carries them.

The binary prefixes are not part of the SI: each name keeps the first two letters of an SI prefix and adds bi, for binary.

There are two kinds of megabyte, then, because there are two ways of counting bytes, and since 1998 each way has its own name. The new names did not retire the old habit, which is why the plain word megabyte is still ambiguous today.

Who uses MB and who uses MiB?

It depends on what is being counted. NIST, drawing on an IEEE article from 1997, described the split this way, and current vendor documents still follow it:

When discussing computer memory, most manufacturers use megabyte to mean 1 048 576 bytes, while manufacturers of storage devices usually mean 1 000 000 bytes.

Drives and storage count in decimal. Manufacturers of storage devices measure capacity in decimal, which is why Apple's packaging defines 1GB as 1 billion bytes.

Memory counts in binary. JEDEC's dictionary defines mega (M), as a prefix to units of semiconductor storage capacity, as 1 048 576, and notes that the power-of-two meanings are included to reflect common usage.

Some operating systems and apps count in binary. Apple lists iOS 10 and earlier and OS X Leopard and earlier among the systems that report storage capacity in binary.

Command-line tools can offer both, told apart by the suffix. In GNU Coreutils, 1M and 1MiB both mean 1 048 576 bytes, while 1MB means 1 000 000 bytes.

Networks count in decimal, and in bits rather than bytes, which is a separate confusion covered under megabits and megabytes on a download.

Put a decimal label and a binary report side by side and the same disk gets two numbers. Apple's note makes the point directly: the capacity on the box might differ from the capacity the operating system reports.

Is a MiB or MB bigger?

A MiB is bigger. The binary unit is always the larger of the pair, and the gap widens at every step up, because each step multiplies by 1024 instead of 1000.

A KiB is 2.40 % larger than a kB, a MiB 4.86 %, a GiB 7.37 % and a TiB 9.95 %.

How much larger the binary unit is than its decimal namesake, step by step.
PairBinary / decimalBinary unit is larger by
KiB vs kB 1.024 2.40 %
MiB vs MB 1.048576 4.86 %
GiB vs GB 1.073741824 7.37 %
TiB vs TB 1.099511627776 9.95 %

At the kilobyte the difference disappears into rounding. At the terabyte it is close to a tenth, and that gap is part of why a new drive looks smaller in its operating system than on its box.

How do you tell which megabyte a number means?

Read the symbol first. KiB, MiB and GiB are always binary, because the IEC defined those symbols for powers of two and nothing else. KB, MB and GB are the ambiguous ones, and for those the source decides:

  • A capacity printed on a drive's box or specification sheet is decimal.
  • An amount of memory, such as the RAM in a laptop, is normally binary.
  • A network speed is decimal, and it counts bits.
  • A size shown by an app or an operating system can be either, so check its documentation or test it against a byte count.

The byte count settles it. When a program shows a rounded size and the exact number of bytes together, divide the bytes by 1 000 000 and again by 1 048 576; whichever answer matches the label tells you which megabyte the program uses. You can convert a size between MB and MiB and see that division worked for any value.

Frequently Asked Questions

Which is bigger, KiB or MB?

A megabyte. 1 MB is 976.5625 KiB. The i marks a power of two at the same step of the ladder, so a KiB sits beside the kilobyte, not beside the megabyte.

How many MiB are in 16 GB of RAM?

16 384 MiB. Memory is counted in binary, so 16 GB of RAM is 16 GiB, which is 16 384 MiB. Each GiB is 1024 MiB, and 16 x 1024 = 16 384.

Should I use GiB or GB?

Use the one that matches how the number was counted. Write GiB for a power-of-two count such as memory, and GB for a count in billions of bytes such as a drive. The SI Brochure keeps the SI prefixes for powers of ten.

To measure something other than storage, start from the full set of unit converters.