Skip to content
MeasureMate

Data Size Converter

Convert digital storage between bits and bytes, decimal units (kB, MB, GB, TB) and binary units (KiB, MiB, GiB, TiB).

8000000000
Bits (bit)
1000000000
Bytes (B)
8000000
Kilobits (1000 bits) (kbit)
8000
Megabits (10⁶ bits) (Mbit)
8
Gigabits (10⁹ bits) (Gbit)
1000000
Kilobytes (1000 B) (kB)
1000
Megabytes (10⁶ B) (MB)
0.001
Terabytes (10¹² B) (TB)
0.000001
Petabytes (10¹⁵ B) (PB)
976562.5
Kibibytes (1024 B) (KiB)
953.6743
Mebibytes (1024² B) (MiB)
0.9313226
Gibibytes (1024³ B) (GiB)
0.0009094947
Tebibytes (1024⁴ B) (TiB)
8.881784e-7
Pebibytes (1024⁵ B) (PiB)

Updated Formula covered by automated tests

Digital storage has two competing sets of prefixes. Drive makers, network providers and the SI use decimal steps, so a gigabyte (GB) is exactly 1,000,000,000 bytes. Many operating systems and memory chips work in powers of two, where the matching unit is the gibibyte (GiB) of 1,073,741,824 bytes. This converter keeps the two families apart and labels each unit with its exact size, so you can see why a new drive never seems to hold what the box promised.

It also converts between bits and bytes, which matters whenever an internet plan or Wi-Fi link (quoted in megabits per second) meets a file size (quoted in megabytes). Use it to estimate how much a cloud plan really holds, compare RAM and SSD figures, or work out how long a download should take.

The formula

bytes = value × factor of the input unit
result = bytes ÷ factor of the output unit
Decimal: 1 kB = 10³ B, 1 MB = 10⁶ B, 1 GB = 10⁹ B, 1 TB = 10¹² B
Binary: 1 KiB = 2¹⁰ B, 1 MiB = 2²⁰ B, 1 GiB = 2³⁰ B, 1 TiB = 2⁴⁰ B
1 byte = 8 bits
B
Byte, a group of 8 bits; the basic unit of file and storage sizes
bit
A single binary digit, the unit used for transmission rates
k, M, G, T, P
SI prefixes meaning 10³, 10⁶, 10⁹, 10¹² and 10¹⁵
Ki, Mi, Gi, Ti, Pi
IEC binary prefixes meaning 2¹⁰, 2²⁰, 2³⁰, 2⁴⁰ and 2⁵⁰ (1024, 1024², and so on)

Early computer engineers noticed that 2¹⁰ = 1024 is close to 1000 and borrowed the word kilo for it. The approximation was harmless for kilobytes (2.4 percent off) but grows with every step: a binary terabyte is almost 10 percent larger than a decimal one. In 1998 the International Electrotechnical Commission introduced kibi, mebi, gibi and their relatives so that each prefix has one meaning, and the standard is now IEC 80000-13.

Adoption is uneven. Storage manufacturers and network equipment use decimal units. Windows File Explorer reports binary sizes but prints the label GB, while macOS (since 10.6) and GNOME and several other Linux desktop tools report decimal GB. When a figure has no "i" in its prefix, check which convention the software uses before comparing it with another number.

Worked example

Priya buys a 2 TB external SSD. Plugged into a Windows laptop it shows about 1.81 "TB", and she wants to know whether part of the drive is missing.

  1. 1 Write the advertised size in bytes: 2 TB = 2 × 10¹² = 2,000,000,000,000 bytes.
  2. 2 Divide by 1024⁴ = 1,099,511,627,776 to get tebibytes: 2,000,000,000,000 ÷ 1,099,511,627,776 = 1.819 TiB.
  3. 3 Divide by 1024³ = 1,073,741,824 to get gibibytes: 2,000,000,000,000 ÷ 1,073,741,824 = 1862.65 GiB.
  4. 4 Compare: Windows displays 1.81 TB, which is the 1.819 TiB figure cut to two decimals and labeled with the decimal symbol.

Result: Nothing is missing. The drive holds the full 2 trillion bytes; the 9 percent gap is the difference between decimal terabytes and binary tebibytes (formatting overhead takes a little more on top).

Before you rely on the result

  • The tool assumes the input label means what the standard says. If a program prints "GB" while actually using 1024³ bytes, choose GiB as the input unit.
  • Actual usable space on a drive is reduced by the file system, partition tables and reserved areas, and small files occupy whole allocation blocks, so stored data can take more room than its byte count.

Frequently asked questions

Is my 500 Mbps connection 500 megabytes per second?

No. Internet speeds are in megabits. Divide by 8: 500 Mbit/s carries 62.5 MB (decimal megabytes) per second, or about 59.6 MiB per second, before protocol overhead, which typically costs a few more percent.

Should I write KB or kB?

In the SI the prefix for 1000 is a lowercase k, so 1000 bytes is 1 kB. The uppercase KB was a common informal label for 1024 bytes; the unambiguous binary symbol is KiB. Lowercase b is reserved for bits in many style guides, so kb usually means kilobits.

Why is RAM sold in binary sizes while drives are decimal?

Memory chips are addressed with binary address lines, so their capacity is naturally a power of two: a "16 GB" memory module actually holds 16 GiB. Disk and flash capacity has no such constraint, and manufacturers state it in SI units.

How long will a 4 GB download take on a 100 Mbit/s line?

Convert the file to bits: 4 GB × 8 = 32 Gbit = 32,000 Mbit. At 100 Mbit/s that is 320 seconds, about 5 minutes and 20 seconds in ideal conditions. Real downloads are usually somewhat slower.

Sources

All unit converters