Data size converter

Convert between bits, bytes, decimal units (KB, MB, GB, TB, PB with 1,000 steps) and binary units (KiB, MiB, GiB, TiB with 1,024 steps). Free, exact, and it runs in your browser.

How to use it

  1. Type the number in Value.
  2. Choose the unit you have in From and the unit you want in To.
  3. The result is shown first. The table lists the same size in every other unit, decimal and binary.

Decimal vs binary units

Decimal (SI): KB = 10^3, MB = 10^6, GB = 10^9, TB = 10^12, PB = 10^15 bytes. Binary (IEC): KiB = 2^10, MiB = 2^20, GiB = 2^30, TiB = 2^40 bytes. The gap grows with size: about 2.4% at KB, 4.9% at MB, 7.4% at GB and 10% at TB.

Complete guide to data size units: KB, MB, GB and KiB, MiB, GiB

Two ways of counting bytes

Few measurements cause as many arguments as digital storage. A drive sold as 1 TB shows up in your computer as roughly 931 GB, a 100 MB limit on an upload form may not match the size your system reports, and a 100 Mbps connection never downloads 100 MB per second. The reason is that there are two systems. The decimal (SI) system counts in steps of 1,000: KB, MB, GB, TB, PB. The binary (IEC) system counts in steps of 1,024: KiB, MiB, GiB, TiB. This converter handles both, plus bits and bytes, and shows the same size in every unit at once. It runs in your browser and nothing is uploaded.

The units and their exact sizes

UnitSystemSize in bytes
Bit-1/8 of a byte
Byte (B)-8 bits
KB, MB, GB, TB, PBDecimal10^3, 10^6, 10^9, 10^12, 10^15
KiBBinary1,024
MiBBinary1,048,576 (2^20)
GiBBinary1,073,741,824 (2^30)
TiBBinary2^40

Internally every unit is stored in bits and the tool multiplies by the factor of the unit you have, then divides by the factor of the unit you want. The factors are exact integers, and the result is cleaned to 12 significant digits and shown with up to 10. In this tool KB means exactly 1,000 bytes and KiB means 1,024 bytes, so you always choose which one you mean.

Worked examples

  1. Why a 1 TB drive looks smaller: leave Value at 1, choose Terabyte (10^12 B) (TB) in From and Gibibyte (2^30 B) (GiB) in To. The result is 931.3225746 GiB. The table adds 0.9094947018 TiB. Nothing is missing: the maker counted 10^12 bytes and the system counts in 2^30 steps.
  2. A 100 MB file limit: type 100, choose Megabyte (10^6 B) (MB) and Mebibyte (2^20 B) (MiB). The result is 95.36743164 MiB.
  3. The same 100 GB in binary units is 93.13225746 GiB, and 512 GiB is 549.7558139 GB going the other way.
  4. Bits and bytes: type 100, choose Bit (bit) and Byte (B). The result is 12.5 B. This is why a 100 Mbps line moves at most 12.5 MB per second, before protocol overhead.

Which one should you use?

  • Storage devices, network speeds and most cloud providers use decimal units (GB, TB). Check the product label.
  • Many operating systems and memory (RAM) use binary sizes. RAM is always built in powers of two, so 16 GiB is the real amount, usually labelled 16 GB.
  • Some programs write GB while computing GiB. If you need certainty, compare the byte count shown in the file properties.

Tips and common mistakes

  • Lowercase b means bit and uppercase B means byte. Mbps is megabits per second, MB/s is megabytes per second. Divide bits by 8 to get bytes.
  • The difference grows with size: about 2.4% at kilo, 4.9% at mega, 7.4% at giga and 10% at tera.
  • Very large or very small results use powers of ten, such as 1.25 × 10⁻⁸. This is normal when a small number of bits is expressed in petabytes.
  • Real transfers are slower than the theoretical figure because of overhead, so treat conversions as upper limits.

Related tools

If you work with binary text and numbers, see the number base converter and the text to binary converter. For other units of measure the weight converter and the length converter may help.

Questions

Why does my 1 TB drive show about 931 GB?

Drive makers use decimal units (1 TB = 1,000,000,000,000 bytes), while many operating systems report binary units (1 TiB = 1,099,511,627,776 bytes) but label them GB or TB. 1 TB is about 0.909 TiB, or roughly 931 GiB.

What is the difference between MB and MiB?

MB is decimal: 1 MB = 1,000,000 bytes. MiB is binary: 1 MiB = 1,048,576 bytes (1,024 x 1,024). The "i" marks the 1,024 versions (IEC standard).

How many bits are in a byte?

A byte has 8 bits. Internet speeds are usually sold in bits (Mbps) and file sizes in bytes (MB), so 100 Mbps is at most 12.5 MB per second.

Is KB 1,000 or 1,024 bytes here?

KB is 1,000 bytes and KiB is 1,024 bytes. Both appear in the list so you can pick the one you need.