One tool for ten data units
Data sizes appear in a mixture of units, and moving between them is a regular chore for anyone who handles files, disks, memory or network captures. This converter covers ten units: bit, byte, kilobyte, megabyte, gigabyte (gb), terabyte (tb), kibibyte, mebibyte, gibibyte (gib) and tebibyte (tib). Pick the source and target from the menus, enter the value, and the result appears. Internally every unit has a size expressed in bytes, so the calculation always has the same two steps: multiply by the source size to get bytes, then divide by the target size. That makes the page work for any pair without a separate formula for each. The default converts 1 byte to kilobytes and returns 0.001, which shows the decimal convention immediately. The sections below explain what each unit means and how to avoid the confusions that cause most errors.
The unit sizes in bytes
The decimal units follow the SI prefixes. A kilobyte is 1,000 bytes, a megabyte is 1,000,000 bytes, a gigabyte is 1,000,000,000 bytes and a terabyte is 1,000,000,000,000 bytes. The binary units follow powers of 1,024. A kibibyte is 1,024 bytes, a mebibyte is 1,048,576 bytes, a gibibyte is 1,073,741,824 bytes and a tebibyte is 1,099,511,627,776 bytes. A byte is 8 bits, so a bit is one eighth of a byte. The gap between the two families widens with each step: 2.4 percent at the kilo level, 4.86 percent at mega, 7.37 percent at giga and 9.95 percent at tera. The NIST guide to the SI and its table of binary prefixes document these definitions, and this page cites NIST for the factors. Knowing the two families and the 8-bit byte covers nearly every conversion people actually need.
Why both families exist
Early computers addressed memory with binary numbers, so memory sizes came out as powers of two, and the closest SI prefix was borrowed for convenience. A kilobyte of 1,024 bytes was close enough to 1,000 that the shortcut went unremarked for decades. As capacities grew, the shortcut became a measurable error, and disk makers, who had no binary constraint, quoted the decimal figures. Lawsuits and consumer confusion followed in the early 2000s. The IEC introduced the binary prefixes kibi, mebi, gibi and tebi in 1998 to give powers of two their own names, and these were later published in IEC 80000-13. The SI prefixes kilo, mega and giga are defined as exact powers of ten by the BIPM, so using them for powers of two contradicts the standard. The result is the situation today, in which both sets of names are in use and a converter has to know which one is meant.
The default: byte to kilobyte
A value of 1 byte converts to 0.001 kilobytes, because a kilobyte is 1,000 bytes. If you change the target to kibibyte, the same byte becomes about 0.0009765625 KiB, one over 1,024. The two answers differ by 2.4 percent, which is small for a single byte and large across many gigabytes. Try the same experiment with the other sizes: 1 mebibyte converts to 1.048576 megabytes, 1 gibibyte to 1.073741824 gigabytes, and 1 tebibyte to 1.099511627776 terabytes. Each of these shows that the binary unit is larger than its decimal neighbor. The page example puts it plainly, noting that 1 mebibyte equals 1,048,576 bytes while 1 megabyte equals 1,000,000 bytes. Whenever a converted figure looks about 5 or 7 percent off from what you expected, the likely cause is a mix of the two families.
Bits and bytes
The bit is the smallest unit on the menu and the building block of the others. Eight bits make a byte, so 8 bits convert to exactly 1 byte, and 1 bit is 0.125 byte. Bits matter mainly for communication rates and for specialized sizes, such as the 128-bit width of an encryption key or the 32 bits of an IPv4 address. Storage and file sizes are nearly always given in bytes. If you convert 1,000,000 bits to bytes you get 125,000, and to kilobytes you get 125. When a source quotes a size in megabits, remember that the figure needs dividing by 8 to compare with a megabyte figure. That mistake appears often in specifications for cameras, streaming and Wi-Fi. A converter that includes the bit makes it easy to keep the unit visible and avoid the factor-of-eight error by accident.
Everyday sizes in context
Concrete examples help calibrate the units. A plain text page is a few kilobytes. A photo from a phone is commonly in the range of a few megabytes, and a CD holds about 700 MB of data, which converts to roughly 667.572 mebibytes. Many Blu-ray discs hold 25 GB per layer, a feature film can run to several gigabytes, and a modern laptop drive is often a few hundred gigabytes to a couple of terabytes. The CD example shows the two families in action: the label says 700 MB, a binary-reporting tool shows about 667.6 MiB, and both describe the same 700,000,000 bytes. These typical sizes are illustrative orders of magnitude rather than exact figures for any particular product, and they are useful for sanity-checking conversions, since a result that puts a photo in terabytes has probably used the wrong target unit.
Choosing the right family
A practical rule is to match the convention of whatever you are comparing against. Drive and flash capacities, network speeds and most download sizes use decimal units. RAM, CPU cache sizes, page sizes and the way many operating system tools report file system usage tend to use binary units, whether or not the label says so. Programming interfaces usually count bytes and leave the display to the application. When you must combine numbers from both worlds, convert each to bytes first. For instance, a 256 GB flash drive holds 256,000,000,000 bytes, which is about 238.42 GiB, so a 240 GiB image does not fit even though 240 is less than 256. Doing the comparison in bytes removes the ambiguity. The converter makes the byte step easy: set the target to byte and read the exact count.
Working with large and small results
Conversions between distant units produce results with many digits. Converting 1 byte to tebibytes gives 0.00000000000090949470177, which is accurate but unreadable. When a result has more than four or five leading zeros, step the target unit down until the figure is in a convenient range. In the other direction, converting a large number of bits to tebibytes may give a number with many decimal places, and rounding to three or four significant figures is usually enough for planning. If you need an exact count for a limit, such as an upload cap defined in bytes, convert to bytes and keep the whole number. Do not round before comparing with a limit, because a file one byte over a limit is still over it. Rounded values are for reading and for communicating with other people.
A multi-step example
A photographer has 1,200 raw files averaging 24 MB each and wants to know whether they fit on a 512 GiB card. The decimal total is 28,800 MB, which is 28.8 GB. Enter 28800 with megabyte as the source and gibibyte as the target, and the result is about 26.82 GiB. That is only 5.2 percent of the card. Suppose instead the photographer shoots 40,000 such files over a year. The total is 960,000 MB, and converting to tebibytes gives about 0.873 TiB, which would not fit on one 512 GiB card but fits easily on a 2 TB disk, which holds about 1.82 TiB. The average file size is an illustrative assumption. The method is to sum in one unit, convert once, and compare against the capacity in the same family.
Choosing a unit for the answer
Because the tool will convert to any of ten units, the target is a matter of readability. A good result usually lies between about 0.1 and 1,000 in the chosen unit, which keeps the number short and easy to compare. A 3,500,000,000-byte file reads better as 3.5 GB than as 3,500,000 kilobytes, and a 640 KiB limit reads better in kibibytes than as 0.00061 GiB. When writing for an audience, choose the family they use. A storage purchase document should say GB or TB, while a memory report should say GiB if that is what the system displays. Stating the unit in full, such as gibibytes rather than a bare G, removes doubt. If the audience is mixed, give both: for example, 238.42 GiB (256 GB). That costs a few characters and prevents a support question later.
Memory pages, blocks and powers of two
Several sizes inside computers are fixed powers of two, which is why binary units remain natural for them. A common memory page is 4 KiB, which is 4,096 bytes. Many disk sectors are 512 bytes or 4,096 bytes, and file systems allocate space in clusters that are multiples of those. A file of 10,000 bytes therefore occupies three 4 KiB clusters, or 12,288 bytes, even though its content is smaller. Entering 4 with kibibyte as the source and byte as the target returns 4,096, and entering 1 with mebibyte as the source and kibibyte as the target returns 1,024. This is why the size shown for a file in its properties and the space it takes on the disk often differ. The converter does not model clusters, but it gives you the exact byte counts needed to reason about them.
Limits of the converter
This page converts between units of information size. It does not compute transfer times, compression ratios or the usable capacity of a formatted drive, which is reduced by file system overhead and, for arrays, by redundancy. It treats the byte as 8 bits, which is universal today although older architectures used other byte sizes. It also cannot know which convention a label meant if the label is ambiguous. Always check documentation when a figure matters for a purchase, a quota or a license limit. For rates in bits or bytes per second, use a data-rate converter, which adds the time unit and keeps the bit and byte distinction visible in the same way.