CompressToFit

MB vs MiB, and why your 25MB file is not 25MB

25MB means either 25,000,000 or 26,214,400 bytes depending on who is counting, and almost nobody says which. Here is how to be right either way.

Updated 5 min read

There are two different quantities in common use that are both written "MB", and they differ by about 4.9%.

That gap sounds academic until it is the reason an upload failed. If a platform means one and your compressor meant the other, a file that measures comfortably under the limit gets rejected at the door — and the error message almost never explains why.

The two definitions

The decimal megabyte (MB) is 1,000,000 bytes. It follows the SI prefixes used everywhere else in measurement, where kilo- means a thousand and mega- means a million.

The binary mebibyte (MiB) is 1,048,576 bytes, which is 2²⁰. It exists because memory addressing is binary, so powers of two are the natural unit for anything counted in memory.

Unit Bytes Written as
1 kilobyte (KB) 1,000 SI decimal
1 kibibyte (KiB) 1,024 IEC binary
1 megabyte (MB) 1,000,000 SI decimal
1 mebibyte (MiB) 1,048,576 IEC binary
25 MB 25,000,000 SI decimal
25 MiB 26,214,400 IEC binary

The IEC standardised the second set of names — kibi-, mebi-, gibi- — in 1998, specifically so the ambiguity could be written away. It has been adopted unevenly.

Why your operating system disagrees with the label on the drive

A 1TB hard drive holds 1,000,000,000,000 bytes, because storage manufacturers use decimal units. Windows divides that by 1024 three times and reports 931GB, because Windows uses binary units but labels them with the decimal prefix. Nothing is missing; the two are counting in different bases and both are calling it "GB".

macOS switched to decimal units in 2009, which is why the same drive reads as 1TB on a Mac and 931GB on a PC. Linux tooling varies by tool: ls -lh reports binary units labelled M, while ls -lh --si reports decimal.

So the same file genuinely has three correct-looking sizes depending on where you read it:

  • 20,000,000 bytes
  • 19.1 MB in Windows Explorer (binary, labelled MB)
  • 20 MB in macOS Finder (decimal)

Where this actually costs you something

Upload limits. A platform enforces a byte count, publishes a number with "MB" after it, and usually does not say which definition it used.

The direction of the error matters:

  • If the platform means MiB and you targeted MB, you are 4.9% under where you could have been. You lost a little quality and nothing else.
  • If the platform means MB and you targeted MiB, your 25 MiB file is 26,214,400 bytes against a 25,000,000-byte limit. It is 4.9% over. The upload fails.

One of those outcomes wastes a sliver of quality. The other wastes the entire attempt, which is why the smaller reading is always the right assumption. This tool defines MB as 1,000,000 bytes everywhere, with no exceptions — a file that clears the decimal limit clears the binary one automatically.

The bigger trap: email does not measure your file at all

The MB/MiB gap is 4.9%. There is a much larger one hiding in email, and it catches far more people.

Gmail publishes a 25MB attachment limit. But email cannot carry raw binary data, so attachments are base64-encoded for transport — three bytes of file become four characters of text. That is a 33% increase, and Gmail's limit applies to the encoded message, not to the file sitting on your disk.

So a 25MB video becomes roughly a 33MB message and bounces, having told you nothing useful. The real ceiling for the file itself is about 18MB. Outlook behaves the same way, with a published 20MB limit that corresponds to roughly 15MB of actual file — and corporate Exchange administrators frequently configure it lower still.

file on disk × 1.33 ≈ message size
25,000,000 × 1.33 = 33,250,000    over Gmail's 25MB limit
18,000,000 × 1.33 = 23,940,000    clears it

This is a far more expensive misunderstanding than MB versus MiB, and it is the reason the Gmail preset here targets 18MB rather than the 25MB Gmail advertises. See the Gmail limit reference for the dated figures, or how to send a large video by email for the full set of options.

The rule worth remembering

When a limit is published as "MB" without clarification, assume decimal — 1,000,000 bytes — and target under that. It clears both definitions, and it costs you under 5% of the budget to be certain.

Then check whether the limit applies to your file or to something your file gets wrapped in. For chat apps and file hosts, it is the file. For email, it is the encoded message, and you need roughly a quarter off the top.

FAQ

Is 1MB 1000 or 1024 KB?

Both are in use. Strictly, 1 MB is 1000 KB (decimal) and 1 MiB is 1024 KiB (binary). In everyday speech "1MB" is often used loosely for 1,048,576 bytes, which is really 1 MiB. When precision matters — such as whether an upload will be accepted — assume the decimal reading, because it is the smaller of the two and therefore the safe one.

Which definition do upload limits use?

It varies, and platforms rarely document it. Discord's 20MB and WhatsApp's 16MB are enforced closely enough to the decimal reading that targeting decimal is safe. Rather than guessing per platform, target the decimal value: it is at most 4.9% more conservative and it cannot be wrong in the direction that costs you the upload.

Why does my 20MB video show as 19.1MB in Windows?

Because Windows is dividing by 1024 and labelling the result "MB". 20,000,000 ÷ 1,048,576 = 19.07, so Explorer shows 19.1MB. The file has not changed size — Windows is reporting mebibytes under the megabyte label. A platform enforcing a decimal 20MB limit will accept that file.

Does this matter for small images too?

The same ratio applies, but the absolute gap is small enough to ignore in most cases: 100 KB versus 100 KiB is a 2.4 KB difference. It becomes relevant at the tight end — a portal demanding "under 20KB" for a photo leaves little room for a 2% misunderstanding, so targeting the decimal value is still the right habit.

Do it now, in this tab

Each of these opens the tool with the target already set. It runs on your own machine — nothing is uploaded, there is no watermark and no signup, and the output is measured before you get it.