Everyday files sit at the megabyte scale

A phone photo, a song, a PDF report and an email attachment are all measured in megabytes. Bit counts arise when you work from a bit rate or a specification: an audio stream is described in kilobits per second, a camera sensor in bits per pixel, and an attachment limit in megabytes. This page converts a total in bits to decimal megabytes by dividing by eight million. Use it when a calculation yields bits, for example the product of a bit rate and a time, and the answer is wanted as a file size that can be compared with a limit or a storage quota.

The decimal megabyte

In the SI, mega means 10⁶, so a megabyte is 1,000,000 bytes and 8,000,000 bits. This follows NIST SP 811 and IEC 80000-13, which reserve MiB for the binary 1,048,576 bytes. Many file managers show sizes in decimal units, as do mobile operating systems and download sites, so the converted figure often matches what you see on the screen. Some desktop tools still report mebibytes while labeling them MB, which gives numbers about 4.6 percent smaller than the decimal ones. The converter here is decimal, and a result in MB will agree with decimal-based displays.

What 10 bits means as a megabyte figure

Ten bits equal 1.25e-6 MB, or 0.00000125. The default is a check of the factor, and it is very small because ten bits is just over a byte. A result that starts with five or six zeros after the decimal point is a signal to use bytes or kilobytes instead. The scale becomes useful at about eight million bits. At 8,000,000 bits the answer is 1 MB, at 40,000,000 bits it is 5 MB, and at 50,000,000 bits it is 6.25 MB. Try these to confirm that the factor behaves as expected before applying it to a real figure.

Audio at a given bit rate

An MP3 stream at 128 kilobits per second delivers 128,000 bits each second. One minute holds 7,680,000 bits, which is 0.96 MB, and a four-minute song is about 3.84 MB. At 256 kilobits per second the same song is 7.68 MB. Such figures are approximations, because files carry tags and the bit rate may vary. A song stored at 320 kilobits per second takes 9.6 MB in four minutes. The arithmetic is always bits per second times seconds, then division by eight million. A podcast of one hour at 64 kilobits per second holds 230,400,000 bits, which is 28.8 MB, and a lossless recording at about 900 kilobits per second would need roughly 405 MB for the same hour. The converter handles the last step and removes the chance of mixing up megabits and megabytes.

From megabytes to bits and to link time

Swap the units to multiply by 8,000,000. A 3 MB photo contains 24,000,000 bits, and a 25 MB attachment holds 200,000,000 bits. Many mail services limit attachments to around 20 to 25 MB, so a file that looks small can exceed the limit once encoding is added, because email encodings such as base64 increase size by roughly a third. On a 10 megabit per second upload link, the 3 MB photo needs about 2.4 seconds in the ideal case. The bits figure is the one a link rate understands, so convert to bits first.

Megabit and megabyte are different things

The usual error is a factor of eight. A megabit, Mbit or Mb, is a million bits, and a megabyte, MB, is eight million bits. Internet services advertise speeds in megabits per second and show downloads in megabytes per second, so a 200 Mbit/s plan moves at most 25 MB/s. Size labels on files use MB, and bit rates on streams use kbit/s or Mbit/s. Always check the case of the letter b and whether the figure is a rate or a size. This page converts a total number of bits and does not handle time, so rates must be multiplied by a duration before you use it.

Rounding the result sensibly

The factor is a terminating decimal, so converted values are exact for whole-number inputs. A figure of 7,680,000 bits is exactly 0.96 MB, and 3,840,000 bits is 0.48 MB. File sizes shown in everyday tools round to one or two decimals, so a result of 0.96 MB may appear as 0.96 or 1.0 depending on the program, and a very small file may show as 0.0 in a tool that rounds to one decimal. When you compare against a limit, use the unrounded value, because 25.0 MB and 25.04 MB may sit on different sides of an attachment limit. The converter prints the exact value, such as 1.25e-6 for the default, in exponent notation when the number is small, and that notation means the decimal point moves six places to the left.

What is outside the conversion

The calculation reports the size of the raw data in the bit count. Files on disk occupy whole allocation blocks, so a 0.96 MB file can use slightly more space in storage. Compression can make a file much smaller than its raw size, and containers, metadata and encryption can make it larger. The page does not model any of these, nor the protocol overhead of a transfer. Treat the output as the payload size. For capacity planning, add a margin for overhead and for the difference between decimal and binary units, which together can make a dozen percent or more of a large collection. A folder of 500 photos at 4 MB each is 2,000 MB in decimal units, or about 1,907 MiB, and the card you buy must hold the larger of the two figures as the device reports it, plus the space the file system keeps for itself.

A photo sensor from bits to megabytes

An uncompressed image makes the bits-to-megabytes step concrete. A frame of 4,000 by 3,000 pixels has 12,000,000 pixels. At 8 bits for each of three color channels, that is 24 bits per pixel, or 288,000,000 bits, which comes to 36 MB. At 12 bits per pixel in a raw format, the frame holds 144,000,000 bits, or 18 MB. Compressed formats such as JPEG store far fewer bits, so the file size on a card is much smaller than these raw figures. The numbers are illustrative, and they show why a camera that stores uncompressed frames fills a card quickly.