Advertisement

Byte converter

Enter a data size and pick its unit. The readout gives the same size in every common decimal and binary multiple of the byte, including bits.

Calculator

Zero or any positive size. Negative sizes are rejected.

Value in Bytes (B)
1,000,000,000 B
Value in Kilobytes, decimal (kB)
1,000,000 kB
Value in Megabytes, decimal (MB)
1,000 MB
Value in Gigabytes, decimal (GB)
1 GB
Value in Terabytes, decimal (TB)
0.001 TB
Value in Kibibytes, binary (KiB)
976,563 KiB
Value in Mebibytes, binary (MiB)
953.674 MiB
Value in Gibibytes, binary (GiB)
0.931323 GiB
Value in Tebibytes, binary (TiB)
0.000909495 TiB
Value in Bits (bit)
8,000,000,000 bit

Advertisement

How this calculator works

Computer storage is counted in bytes, and large sizes are written with prefixes. Two prefix families are in use and they differ. Decimal prefixes such as kilo, mega and giga follow the SI meaning of powers of 1000, so 1 kB is 1,000 bytes. Binary prefixes such as kibi, mebi and gibi are powers of 1024, so 1 KiB is 1,024 bytes. The binary prefixes were standardised by the International Electrotechnical Commission, but operating systems and storage makers still disagree in everyday use, which is why a drive sold as 1 TB can appear smaller in some software.

Formula

base = value x F(unit), where F is the number of bytes in one unit. Decimal: 1 kB = 1,000 B, 1 MB = 1,000,000 B, 1 GB = 1,000,000,000 B, 1 TB = 1,000,000,000,000 B. Binary: 1 KiB = 1,024 B, 1 MiB = 1,024^2 = 1,048,576 B, 1 GiB = 1,024^3 = 1,073,741,824 B, 1 TiB = 1,024^4 = 1,099,511,627,776 B. One byte is 8 bits.

Worked example

1 GB is exactly 1,000 MB and 0.931323 GiB. 1 MiB is 1,048,576 B, which is 1.048576 MB and 8,388,608 bits. A 4,000,000,000 byte file is 4 GB as storage is sold, but 3.72529 GiB as some operating systems report it.

Advertisement

Frequently asked questions

Why does a 1 TB drive show less than 1 TB in my computer?

Drive makers use decimal prefixes, so 1 TB means 1,000,000,000,000 bytes. Some operating systems divide by 1,024 and label the result TB, which gives about 0.909 TiB but is often shown as 909 GB. The number of bytes never changed, only the label.

Should I write KB or kB?

The SI style is kB with a lower case k, because kilo is a prefix and only the symbol for a person-named unit is capitalised. KB with a capital K is common in informal use but is not the SI spelling. KiB is the binary kibibyte.

How many bits are in a byte?

Eight. A byte is the smallest addressable unit in most computer architectures, while a bit is a single binary digit, zero or one.

Is a megabit the same as a megabyte?

No. A megabit is one eighth of a megabyte, so 100 Mbit is 12.5 MB. Network speeds are usually quoted in bits per second, while file sizes are quoted in bytes.

Sources

Advertisement