Bytes to MB Converter
Convert bytes to MB — for file sizes read straight off a system.
Updated
megabytes
1.000000MB
1,000,000 B = 1.000000 MB
In short
How many bytes are in a MB?
1,000,000 bytes. Divide a byte count by a million to get megabytes, so 5,242,880 bytes is 5.24 MB. Divide by 1,048,576 instead and you get mebibytes, MiB, which is the unit most software is really showing when it prints MB.
A byte count is exact. Everything ambiguous about this shelf starts one prefix later.
bytes to megabytes — quick reference
| bytes (B) | megabytes (MB) |
|---|---|
| 1,000 B | 0.001000 MB |
| 10,000 B | 0.010000 MB |
| 100,000 B | 0.100000 MB |
| 500,000 B | 0.500000 MB |
| 1,000,000 B | 1.000000 MB |
| 5,000,000 B | 5.000000 MB |
| 10,000,000 B | 10.000000 MB |
| 50,000,000 B | 50.000000 MB |
The formula, worked line by line
One division by a million, or one by 1,048,576 if you want the binary answer. Both are given below, because the useful thing about starting from bytes is that you can produce either and say which is which.
“Bytes are the only figure on this subject that two systems cannot disagree about. Everything above them is a labelling convention.”
That is the practical argument for recording byte counts in anything you build. A size stored as a rounded megabyte figure has thrown away both precision and provenance, and neither can be recovered later from the number itself.
megabytes = bytes / 1,000,000
mebibytes = bytes / 1,048,576
1 MB = 1,000,000 bytes
1 MiB = 2^20 = 1,048,576 bytes
1,474,560 bytes = 1.47456 MB = 1.40625 MiB- File, exact count
- 5,150,000 bytes
- Divided by 1,000,000
- 5.15 MB — over
- Divided by 1,048,576
- 4.91 MiB — under
- If the cap is 5,242,880 bytes
- accepted
- Verdict
- depends entirely on the cap
Same file, same number, two opposite outcomes. This is the narrow band where the two scales fall on opposite sides of a limit, and it is exactly where a file lands after somebody has spent time compressing it to sit just under the stated figure.
Why the byte is eight bits
The eight-bit byte is a convention that won rather than a law of nature, and the standards reflect that. ISO/IEC 2382 defines the octet as exactly eight bits and treats it as equivalent to an eight-bit byte, which is the unambiguous term. Machines with other byte widths existed; the DEC PDP-10 allowed bytes of any width up to its 36-bit word.
The two ladders, from the byte up
- kilobyte
- 1,000 bytes
- kibibyte
- 1,024 bytes
- megabyte
- 1,000,000 bytes
- mebibyte
- 1,048,576 bytes
- gigabyte
- 1,000,000,000 bytes
- gibibyte
- 1,073,741,824 bytes
Both ladders start from the same byte and diverge by 2.4 percent per rung. Nothing about the byte itself is in dispute, which is why converting from it is the cleanest place to start any of these calculations.
One consequence worth stating: if you are designing a limit, express it in bytes. A cap of 5,000,000 bytes cannot be misread, whereas a cap of "5 MB" will be interpreted differently by the person uploading and the server receiving, and the difference will land on somebody at the worst moment.
How to use the bytes to MB converter
A megabyte is a million bytes, so the conversion is six decimal places to the left. What makes this page worth reading is the direction it runs in. You have started from an exact byte count, which is the one figure on this whole subject that nobody can dispute, and that puts you in a position to settle the ambiguity rather than inherit it.
Byte counts come from machines that had no reason to round: a web server log, a storage API, the properties panel of a file. Because the count is exact, you can check it against both scales and see which one produced it. That is not possible once a figure has been rounded to "4.7 MB" and the divisor has been lost.
1,000,000
Bytes in a megabyte
decimal, SI
1,048,576
Bytes in a mebibyte
2^20, written MiB
48,576
The difference
about 4.9 percent
The test is quick. Divide the count by 1,048,576. If the answer is a clean number — a whole one, or a half, or a quarter — the figure came from a binary system. If dividing by a million gives the clean answer instead, it came from a decimal one. Very few counts look tidy on both scales, so the answer is usually unambiguous.
Byte counts also protect you from a subtler problem: rounding that has already happened. A figure reported as 4.7 MB could be anything from 4,650,000 to 4,749,999 bytes, a spread of a hundred thousand. When you are comparing against a hard limit, that spread is often wider than the margin you were relying on.
- 1,024
- 2^10, one KiB
- 1,048,576
- 2^20, one MiB
- 1,474,560
- the 1.44 MB diskette
- 5,242,880
- 5 MiB, a very common cap
- 1,073,741,824
- 2^30, one GiB
The diskette is the odd one out and the most instructive. It is 1,440 units of 1,024 bytes, which is neither 1.44 million bytes nor 1.44 mebibytes. The label mixed the two scales together and the industry kept it for twenty years.
Take the same count up to gigabytes
For counts in the billions the divisor becomes a billion, and the gap between the two scales widens to about seven percent. That page runs it and shows both readings.
Open bytes to GB →Byte counts converted to megabytes on the decimal scale, with the mebibyte figure alongside so you can see which divisor produced a given number.
| Bytes | Megabytes (decimal) | Same count in MiB |
|---|---|---|
| 1,000 | 0.001 MB | 0.000954 MiB |
| 100,000 | 0.1 MB | 0.095367 MiB |
| 1,000,000 | 1 MB | 0.953674 MiB |
| 1,048,576 | 1.048576 MB | 1 MiB |
| 1,474,560 | 1.47456 MB | 1.40625 MiB |
| 5,000,000 | 5 MB | 4.768372 MiB |
| 5,242,880 | 5.24288 MB | 5 MiB |
| 10,000,000 | 10 MB | 9.536743 MiB |
| 10,485,760 | 10.48576 MB | 10 MiB |
| 50,000,000 | 50 MB | 47.683716 MiB |
| 100,000,000 | 100 MB | 95.367432 MiB |
The 1.44 MB diskette, which was neither
The best illustration of how tangled the labelling became is a format most people have handled. The high-density 3.5-inch diskette was sold as 1.44 MB. Its actual capacity is 2,880 sectors of 512 bytes, which is 1,474,560 bytes. That figure is 1.475 million bytes and it is 1.406 mebibytes. It is not 1.44 of either.
- Sectors
- 2,880
- Bytes per sector
- 512
- Total bytes
- 1,474,560
- Divided by 1,024
- 1,440 KiB
- Then divided by 1,000
- 1.44
- The label
- 1.44 "MB"
The capacity was divided by 1,024 once to reach kilobytes and then by 1,000 again to reach megabytes. Two different divisors in one calculation produced a unit that exists in no standard, and it went on the box of every diskette sold.
It is a useful thing to remember when a figure seems not to reconcile on either scale. Hybrid units are rare but they are not unheard of, and the only way to detect one is to work back to the byte count and see which divisors were applied in what order.
Reading a byte count in the wild
Web server logs record response size in bytes, which is why bandwidth reports built from them are exact rather than estimated. Storage APIs return byte counts for the same reason. So do file properties dialogs, if you look past the friendly rounded figure at the top to the exact number underneath.
Do
- Keep the byte count whenever a comparison depends on it
- Test a count against 1,048,576 to see which scale produced it
- Write MiB when your divisor was 1,048,576
- Read the exact figure rather than the rounded one in file properties
Don't
- Compare a rounded MB figure against a byte-denominated limit
- Assume a count ending in zeros is decimal — check the whole number
- Convert twice with different divisors, which is how hybrids happen
- Treat size on disk as the same figure as file size
That last point catches people. A file listing usually shows two numbers: the size of the content and the space it occupies once the filesystem has allocated whole clusters to it. A small file can occupy several times its own size. Upload limits measure content, so the smaller of the two is the one to convert.
Every bytes value, worked out
67 common bytes figures each get their own page, with the answer at full precision, the arithmetic, what rounding costs, and the nearest real-world reference point on the scale.
1,000 and up B
Questions people ask
Sources
Where the constants and formulas on this page come from. Each line names the figure it backs.
One mebibyte is 2^20 bytes, 1,048,576, and is written MiB to distinguish it from the decimal megabyte of one million bytes.
IEC 80000-13:2025 Quantities and units — Part 13: Information science and technology — International Electrotechnical Commission
The octet is defined as an ordered sequence of eight bits considered as a unit, equivalent to an eight-bit byte.
ISO/IEC 2382:2015 Information technology — Vocabulary — International Organization for Standardization
The PDP-10 provided byte instructions operating on fields of any width within its 36-bit word.
PDP-10 System Reference Manual, DEC-10-HGAA-D — Digital Equipment Corporation
Related guides
How to Find the Volume of Hollow, Partial, and Composite Solids
A decomposition-first guide to pipes, frustums, domes, and partly filled tanks, with formulas and checks for avoiding geometric and unit errors.
August 12, 2026 · 12 min read
How to Compare Two Data Sets: Center, Spread, and Relative Difference
A practical workflow for deciding whether two sets are comparable, describing their typical values and variation, and reporting differences without overstating them.
August 11, 2026 · 10 min read
Putting JSON in a URL: Validate, Minify, Percent-Encode, or Base64url?
A decision guide for flattening, encoding, checking, and safely transporting JSON in a query string.
August 11, 2026 · 9 min read