Convert MB to MiB

MB
0.953674316406MiB

1 MB = 0.953674316406 MiB

One megabyte is 1,000,000 bytes and one mebibyte is 1,048,576, so a figure in MB is always about 4.86 per cent smaller once it is written in MiB: 25 MB is 23.84 MiB. That gap is invisible on an ordinary file and decisive at an upload limit, which is why most people arrive here.

  • Where it runs In your browser. The number you type is never part of a request.
  • Exact by definition 1 MB is exactly 0.953674316406 MiB — a definition, not a rounded factor.
  • Answers as you type No button, no wait. The worked answer is already on the page before any script runs.

Megabyte to Mebibyte in practice

  • 5 MB is 4.768 MiB

    — a song at a good bitrate.

  • 4000 MB is 3815 MiB

    — a film at ordinary quality.

  • 737.1 MB is 703 MiB

    — a data CD, which is 700 MB on the label.

  • 8.389 MB is 8 MiB

    — a chunk of memory a program might allocate.

Megabyte to Mebibyte at a glance

Every figure here is computed from the same definition the calculator uses, so the table cannot drift away from the answer above it.
MBMiB
10.953674316406
21.90734863281
54.76837158203
109.53674316406
5047.6837158203
10095.3674316406
500476.837158203
1000953.674316406

Megabyte and Mebibyte

A megabyte is a million bytes. Storage manufacturers have always used this decimal meaning, which is why their capacities look larger than what a computer reports.

A mebibyte is 1,024 kibibytes, or 1,048,576 bytes. Linux tools and memory sizes generally mean this even when they print "MB".

What it costs to round the factor

The factor is 0.953674, and almost nobody carries that around. Rounded to 0.95 it is off by 0.39 % — which stays invisible on small numbers and turns into a whole unit somewhere around 1,000 MB.

That is the number worth knowing before you round: not the error itself, but where it stops being ignorable. Below that point the shorter factor is the sensible one; above it, use the field above, which never rounds until it prints.

MB and MiB are not the same size

One MiB is 1,024 of the unit below it; one MB is 1,000. On this page that is the difference between 1.0486 MB and 1 MB — 4.9 % — and the gap grows at every step up the scale, which is why it is a rounding error on a photograph and a visible chunk of a hard disk.

This is the whole of the missing-storage mystery, and on this page it is worth 4.9 %. A drive sold in MB holds exactly what the label says; Windows divides by 1,024 instead of 1,000, keeps the decimal name, and reports 1 MB where the box said 1.0486. macOS has counted these in the decimal units since 10.6, which is why the same drive can look two sizes on two machines — nothing is missing and nobody is rounding, the same bytes have two names.

The file that looks like it fits and does not

A file manager shows 24.8 MB. The form says maximum 25 MB. The upload is refused, twice, and nothing on either screen explains it. What happened is that the two numbers are in different units wearing the same abbreviation: the file manager divided by 1,048,576 and the server divided by 1,000,000, so 24.8 on one side is 26.0 on the other.

This is the single most common way the binary-decimal split costs somebody real time, and it is entirely invisible while it is happening. There is no error message that says "your megabyte is not our megabyte". The file fails, the obvious next move is to compress or crop it, and the person doing it never learns that the margin they needed was one per cent rather than ten.

Which side of a stated limit is being counted

Limits written by providers are usually decimal, because they are set by people writing specifications rather than by an operating system rendering a directory listing. A cap of 25 MB is 25,000,000 bytes, a "max 10 MB" field is 10,000,000, and a 2 MB avatar limit is 2,000,000. When a limit is enforced in code it is almost always an integer of bytes compared directly, and that integer was written by hand as a round decimal figure.

The size you can see, by contrast, comes from whatever is displaying it. Windows counts in mebibytes and writes MB. Most Linux file managers do the same. The macOS Finder counts in megabytes and means it. So the two figures in front of you are typically measured differently, and the difference always runs the same direction: the file is larger than it looks.

Windows writes MB and computes MiB

File Explorer has used 1,024-based steps since long before the IEC coined the mebibyte in 1998, and it has never adopted the newer names. A 26,004,685-byte file is shown as 24.8 MB, which is a correct division by 1,048,576 and an incorrect label. Microsoft has kept the label for compatibility with three decades of documentation, screenshots and habit.

The way out is the properties dialog, which prints the exact byte count underneath the friendly one. That number is unambiguous and is what a server compares against. If a limit matters — an upload, a mailbox quota, a submission portal — read the byte count and compare integers rather than reading two rounded figures in two conventions and hoping.

macOS switched sides in 2009, and did not rename anything

Snow Leopard changed the Finder to report storage in decimal units, so a drive sold as 500 GB finally displayed as 500 GB and files became slightly larger numbers overnight. The change removed one confusion and created another: the same file now reads differently on a Mac and on a PC, with both screens saying MB.

That is worth knowing when a size is quoted to you by somebody else. "It’s 26 megabytes" from a Mac user and "it’s 24.8 megabytes" from a Windows user can be the same file, and the discrepancy is not a transfer problem, a compression difference or a corrupted copy. If two people disagree about a size by roughly five per cent, the unit is the first thing to check.

Getting under the cap in the direction that helps

The useful arithmetic runs the other way from the one this page is named for. If a limit is 25 MB decimal, the largest file that fits is 23.84 MiB, which is what your file manager will show as 23.8 MB. For a 10 MB limit the target is 9.5 as displayed; for 50 MB it is 47.7; for 2 MB it is 1.9. The rule is to multiply the stated limit by 0.954 and treat the result as the number on your own screen.

A rounder version is easier to remember and safer: subtract five per cent from the stated limit and aim below that. The lost margin is trivial — half a mebibyte on a 25 MB cap — and it absorbs both the unit gap and whatever the upload wraps around the file. A file that fits with room to spare uploads once.

Attachments, encoding, and the limit that is not about your file

Email is the case where the unit gap is the smaller problem. Attachments are base64-encoded so that binary data survives a text transport, and base64 turns every three bytes into four characters — a 33 per cent increase before the line breaks are counted. Where the stated limit applies to the assembled message, a 25 MB ceiling accepts a file of roughly 18 MB, and no unit conversion explains the missing seven.

Web forms behave differently and better. A browser upload uses multipart form data, which carries the bytes unmodified with only a few hundred bytes of headers and boundary markers around them. So a 10 MB limit on a web form really is about the file, and the only correction needed is the decimal-versus-binary one. Knowing which of the two situations you are in tells you whether to trim five per cent or a quarter.

Why 4.86 per cent is exactly the wrong size to notice

A gap of half a per cent would round away and a gap of fifty would be obvious. This one sits in the band where it changes nothing about how a file feels and everything about whether it clears a threshold. Photographs, documents and short videos all land in the range where a stated limit and a displayed size differ by less than a rounding step you would question.

It also compounds upward, which is why the same misunderstanding costs more the larger the numbers get. The binary and decimal units diverge by 2.4 per cent at kilo, 4.86 at mega, 7.37 at giga and 9.95 at tera, because each step multiplies the discrepancy by 1.024 again. On a mail attachment that is one file rejected; on a storage array it is the better part of a disk.

What to do when the file is genuinely too large

Once the unit question is settled, the remaining gap is real and the fix depends on what the file is. Photographs and video are already compressed, so putting them in a ZIP saves almost nothing — a per cent or two, occasionally less than the archive overhead. Reducing the dimensions is what actually works: halving the pixel width of an image removes about three quarters of the data, and it is usually invisible on a screen the recipient will view it on.

Documents behave differently. A PDF is often large because of the images inside it rather than the text, so re-exporting at a lower image resolution can take a great deal off without touching legibility. Office files, logs and data exports compress well and a ZIP is worth trying first. And where the file is only slightly over — which after this conversion it usually is — trimming a single embedded image or an unused page is faster than re-encoding everything.

Convert MB to MiB: common questions

My file shows as 24.8 MB and a 25 MB limit rejected it. Why?

Your file manager was almost certainly showing mebibytes under the label MB. 24.8 MiB is 26,004,685 bytes, and a limit written as 25 MB usually means 25,000,000. The file is about a million bytes over a ceiling it appears to be under, and nothing on either screen says which unit is which.

How large can a file be for a 25 MB limit?

If the limit is decimal, 25,000,000 bytes, which your file manager will display as 23.8 MB if it counts in binary. Aim at 23.5 as shown on your own screen and the question stops mattering — the remaining half a mebibyte is cheaper than a second attempt.

Which does Windows use, MB or MiB?

Windows computes in mebibytes and labels them MB. File Explorer’s KB, MB and GB are all 1,024-based, and have been since long before the IEC names existed. The properties dialog also shows the exact byte count, which is the figure to compare against a stated limit.

Does macOS report the same size as Windows for one file?

No. Since 2009 the Finder has reported decimal megabytes, so the same file reads as 26 MB on macOS and 24.8 MB on Windows. Neither is wrong and neither says which convention it used, which is why a size quoted in a message thread is worth converting rather than trusting.

Why is my email attachment bigger than the file on disk?

Email attachments are base64-encoded, which turns every three bytes into four characters — about 33 per cent larger, plus line breaks. If the limit applies to the assembled message rather than the file, a 25 MB ceiling admits a file of roughly 18 MB. Web upload forms do not have this problem, because they send the bytes as they are.

Is the 4.86 per cent gap the same at every size?

The percentage is, but the number of bytes it hides is not. At 25 MB it is about 1.2 million bytes; at 500 MB it is 24 million. The proportion is fixed at each prefix step and grows with the prefix: 2.4 per cent at kilo, 4.86 at mega, 7.37 at giga.

Going the other way: Mebibyte to Megabyte

One MiB is 1.04858 MB. It is the same relationship read backwards, so an answer from one page put through the other has to come back to where it started.

Where these figures come from

The claims this page makes about data units are checkable, and these are the documents that settle them.

How this page works

The factor is a constant in the page and the arithmetic is four operations, so nothing is sent anywhere and nothing needs to be. The number you type never leaves the browser — there is no request for it to travel in.