File sizes and line speeds use different units

Storage and software report sizes in bytes, while network links and media streams are rated in bits per second. To know how long a transfer takes, both must share a unit. A person who downloads an installer shown as 25 MiB on a connection sold as 100 megabits per second needs the size in bits first. This page multiplies mebibytes by 8,388,608 to give the count of bits. The result is often a nine-digit number, so the conversion is easier to trust when a tool does it. The page returns the amount of data only and does not estimate time, because that also depends on protocol overhead and the actual speed of the link.

From mebibytes to bits

The mebibyte is a binary unit defined by the International Electrotechnical Commission as 2²⁰ bytes, which is 1,048,576 bytes. A byte is eight bits, so one mebibyte contains 1,048,576 × 8 = 8,388,608 bits. The formula is bit = MiB × 8,388,608. Because the factor is a power of two, the conversion is exact for any value you enter, with no rounding inside the step. Keep MiB distinct from MB. A decimal megabyte is 1,000,000 bytes, or 8,000,000 bits, which is about 4.6 percent fewer than a mebibyte holds. Using the wrong one shifts a transfer estimate by that same amount.

Ten mebibytes in bits

The opening example enters 10 MiB and returns 83,886,080 bit. The route is 10 × 1,048,576 = 10,485,760 bytes, then times 8 gives 83,886,080 bits. A ten-megabyte photo album or a short audio file has about this size. Read the result in groups of three digits, as 83,886,080, which is a little under 84 million bits. The page can show more digits than you need for planning, so round to the precision of the input: a file size reported as 10 MiB in a dialog box is itself a rounded figure, and the true byte count may differ by up to half of the displayed last digit. If you need the precise count, open the file properties and use the byte figure there as the input after converting it to mebibytes, or enter it directly with bytes as the source unit.

Estimating a download

Suppose a 25 MiB installer is waiting. The page returns 209,715,200 bits. On a link that truly delivers 100 megabits per second, meaning 100,000,000 bits each second, the transfer takes 2.097152 seconds in the ideal case. At 8 megabits per second the same file takes 26.2144 seconds. Real transfers run slower because of protocol headers, server limits and wireless conditions, so treat the ideal time as a lower bound. The conversion matters most when the file is large and the link is slow, where a mix-up between bytes and bits changes the estimate by a factor of eight and turns a coffee break into an hour.

Firmware and image sizes

Embedded designers count memory in bits when they describe chip organization. A 1 MiB flash array holds 8,388,608 bits, and a 4 MiB image of a configuration file is 33,554,432 bits. A product may list storage in one form on the data sheet and in another in the programming tool. Converting both to bits makes a comparison direct. If you plan an over-the-air update, the size of the update in bits, together with the link rate, gives the minimum air time. A 4 MiB update over a slow radio link with a 250 kilobit per second rate takes at least 134 seconds, from 33,554,432 divided by 250,000.

From a bit count back to mebibytes

The reverse direction is useful when a specification lists data in bits. Select bits as the source and mebibytes as the target. A bit count of 100,000,000 returns 11.9209 MiB, and 300,000,000 bits returns 35.7628 MiB. Divide by 8,388,608 or let the page do it. A stream rated at 5 megabits per second that runs for 60 seconds carries 300,000,000 bits, which is the second figure, so the stream needs about 35.8 MiB of storage per minute when stored without extra overhead. A one-hour recording at that rate comes to roughly 2,146 MiB, which is a figure to check against the free space on the recording device. That is a quick way to size a recording buffer or a cache for video.

Bits, bytes and capital letters

Symbols carry the meaning. The byte symbol is capital B, and the bit is written bit or a lowercase b. Mb means megabit and MB means megabyte, a factor of eight apart, and the units differ again from MiB, which is binary. Network cards, service plans and speed tests quote rates in bits, while browsers and file managers show sizes in bytes. A plan advertised at 100 Mb/s moves about 12.5 MB each second in decimal terms, or about 11.92 MiB. When a result looks off by about eight, check whether a b was read as a B.

Decimal megabits against mebibytes

A decimal megabit is 1,000,000 bits. Entering 1,000,000 bits with bits as the source and mebibytes as the target gives 0.119209 MiB, so a megabit is a little under an eighth of a mebibyte. Many speed tests display decimal megabits, so a 100 Mb file transfer is 12,500,000 bytes, which is 11.92 MiB, not 12.5 MiB. When your file manager shows a binary size, convert through bits only once, and keep the factor of 8,388,608 for binary and 8,000,000 for decimal megabytes. Mixing the two in one calculation is the usual reason that an estimate is off by around 5 percent.

Overhead and the limits of the page

The page converts a size and stops there. It cannot say how long a transfer will last, how much room a file occupies on a disk with cluster rounding, or how compression changes the amount of data. Protocols add headers, so the bits on the wire exceed the bits in the file by a few percent. Error correction, encryption and retransmission add more. For planning, take the converted figure as the payload and add a margin that suits the link. Report the margin as a separate assumption, so a reader can see which part of the estimate is exact and which is assumed. A margin of 10 percent on the 209,715,200 bits of the 25 MiB example, for instance, raises the planning figure to about 230.7 million bits.