Your file says 2 MB but the upload says too large: MB vs MiB explained

Last updated

A megabyte has two definitions in everyday use: 1,000,000 bytes (MB, decimal) and 1,048,576 bytes (MiB, binary). A file that your device rounds to “2 MB” can be up to 97,152 bytes over a 2 MB limit that is counted the other way. Keep the file under 2,000,000 bytes with a little room to spare and it passes under both definitions.

Two definitions of a megabyte

Computers count in powers of two, and people count in powers of ten. Both habits ended up attached to the same word.

The trouble is that the separate name never caught on with everyone. As the US standards institute NIST notes, “megabyte” is used with both meanings in practice. Plenty of software calculates in units of 1,048,576 bytes and labels the result “MB”.

What that means for a 2 MB limit

A “2 MB” limit is one of two numbers:

The gap is 97,152 bytes, about 4.9% of the smaller figure. Any file between those two sizes is under the limit by one definition and over it by the other.

Here is how that goes wrong. Suppose your computer measures in binary units and your file is 2,050,000 bytes. That is 1.955 MiB, so the computer shows something like “1.96 MB”. The portal counts in decimal: 2,050,000 is more than 2,000,000, and the upload is refused. Both are doing the arithmetic correctly. They disagree about the unit.

How your device shows size

You cannot always tell from the screen which unit you are looking at, and it has changed over the years.

The practical answer is to stop reading megabytes and read bytes. Many systems can show the exact byte count in a file’s info or properties window. If yours does, use that number. A byte count is not open to interpretation: compare it with 2,000,000.

Rounding hides the problem

File sizes are usually shown with one or two decimal places. A file of 2,040,000 bytes is 2.04 MB in decimal units, and a display with one decimal place shows “2.0 MB”. It looks like an exact fit, and it is 40,000 bytes too big. Whenever a file is displayed as exactly the limit, assume it may be over.

The safe approach

  1. Assume the smaller definition. Treat “2 MB” as 2,000,000 bytes unless the portal explicitly says MiB or 2,048 KB.
  2. Leave a margin. Aim a few percent under the limit, for example 1.9 MB for a 2 MB limit. A file that fits 2,000,000 bytes also fits 2,097,152.
  3. Check the byte count of the final file, not the rounded figure.

If your file is over, the fix is ordinary compression: see how to compress a PDF to under 2 MB.

Other reasons a small-enough file is rejected

If your file is clearly under the limit in bytes and is still refused, the unit is not the cause. Check these:

Quick reference

Computed from the definitions: 1 MB = 1,000,000 bytes, 1 MiB = 1,048,576 bytes. Not specific to any portal.
Stated limitDecimal (MB), bytesBinary (MiB), bytesGap, bytes
1 MB1,000,0001,048,57648,576
2 MB2,000,0002,097,15297,152
5 MB5,000,0005,242,880242,880
10 MB10,000,00010,485,760485,760

The gap is always the same share, about 4.9%, so it grows with the limit: nearly half a megabyte at 10 MB. Stay under the decimal column and you are safe either way.

Kilobytes work the same way one level down: 1 kB is 1,000 bytes and 1 KiB is 1,024 bytes. So “2 MB” can be written as 2,000 kB or as 2,048 KiB, and those are the two numbers in the 2 MB row above.

Common mistakes

Questions people ask

Is 2 MB 2000 KB or 2048 KB?

Both are in use. In decimal units 2 MB is 2,000 kB (2,000,000 bytes). In binary units it is 2,048 KiB (2,097,152 bytes), which is often written as “2048 KB”. If a form says “2048 KB”, it is using the binary meaning.

How many bytes are in 2 MB?

2,000,000 bytes by the decimal definition, or 2,097,152 bytes if the system really means 2 MiB. If you do not know which, stay under 2,000,000.

Which definition do upload forms use?

It varies from site to site and is rarely stated. That is why the safe approach is to assume 1 MB = 1,000,000 bytes and keep a small margin.

Why does the same file show different sizes on my phone and my computer?

Usually because one system divides the byte count by 1,000,000 and the other by 1,048,576, and both label the result “MB”. The number of bytes is the same on both.

Sources and date checked