bitlvl
EN

Byte & data size converter

Enter a size in any unit and read it in all the others, in both the decimal (1000) and binary (1024) systems. Add a link speed to get the transfer time.

1000 or 1024?

There are two families of units and they are almost, but not quite, the same size. The decimal (SI) prefixes go up by 1000: a kilobyte (kB) is 1000 bytes, a megabyte (MB) 1,000,000, a gigabyte (GB) 10⁹. The binary (IEC) prefixes go up by 1024 = 2¹⁰: a kibibyte (KiB) is 1024 bytes, a mebibyte (MiB) 1,048,576, a gibibyte (GiB) 2³⁰. The difference grows with size: 2.4% at kilo, 4.9% at mega, 7.4% at giga and 10% at tera.

Disk and SSD manufacturers use decimal, so a “1 TB” drive holds 10¹² bytes. Windows reports sizes in binary units but labels them “GB”, so the same drive shows as 931 GB. Nothing is missing; the two numbers describe the same bytes.

DecimalBytesBinaryBytes
1 kB1,0001 KiB1,024
1 MB1,000,0001 MiB1,048,576
1 GB1,000,000,0001 GiB1,073,741,824
1 TB10¹²1 TiB1,099,511,627,776

Bits and bytes

A byte is 8 bits. Storage is quoted in bytes (capital B); network speeds are quoted in bits per second (lowercase b): a 100 Mbit/s connection moves 12.5 MB per second at best. Dividing an advertised speed by 8 is the first step of any “how long will this download take” estimate, and the tool above does it for you.

Which units should I use in code?

Use whatever your audience expects, but be exact about which one you mean. Memory is almost always binary (a 4 KiB page, a 64 MiB buffer), bandwidth and disk capacity decimal. The ambiguous forms “KB” and “MB” are best avoided in logs and documentation, or defined once at the top.

Questions

How many bytes are in a gigabyte?

1,000,000,000 (10⁹) in the decimal definition used by drive makers and the SI standard. The binary gibibyte (GiB) is 1,073,741,824 bytes, and that is what most operating systems mean when they show “GB”.

Why does my 1 TB drive show 931 GB?

1 TB is 10¹² bytes. Divided by 1024³ that is 931.3 GiB, which Windows labels as GB. macOS and most Linux tools use decimal units, so they show 1 TB.

How long does it take to download 1 GB on a 100 Mbps line?

1 GB is 8,000 Mbit; at 100 Mbit/s that is 80 seconds in theory, usually a little more because of protocol overhead. Enter the values above for any combination.

Is a kilobyte 1000 or 1024 bytes?

Officially 1000. The 1024-byte unit has been called a kibibyte (KiB) since 1998, but “kilobyte” is still widely used for both, which is why the two systems are shown side by side here.

What is the difference between Mbps and MBps?

Mbps is megabits per second, MBps is megabytes per second, eight times more. Internet plans are sold in Mbps; file transfer dialogs usually show MB/s.