Calculatrixe

Data Storage Converter

Convert a data size between bits, bytes, the decimal units (kB, MB, GB, TB, PB), the binary units (KiB, MiB, GiB, TiB, PiB) and network bit units (kbit, Mbit, Gbit). Decimal and binary are kept apart, which explains why a 500 GB drive shows up smaller on a computer.

Inputs

Result

Enter a value to convert.

The calculation runs in this browser tab. Nothing you enter is uploaded, saved or logged.

Why is a gigabyte not always the same size?

A bit is a single 0 or 1, and a byte is 8 bits. The prefixes kilo, mega and giga properly mean 1,000, 1,000,000 and 1,000,000,000, so a gigabyte (GB) is 1,000,000,000 bytes. Storage makers use these decimal units, and so do network speeds, macOS and many Linux file managers.

Computer memory, however, comes in powers of two, and for decades kilobyte was used for 1,024 bytes. To remove the ambiguity, the International Electrotechnical Commission introduced the binary prefixes kibi, mebi and gibi in 1998: a gibibyte (GiB) is exactly 1,073,741,824 bytes (2³⁰), about 7.4% larger than a gigabyte. Some software, notably Windows, still shows GiB values labelled “GB”.

How to use the Data Storage Converter

  1. Enter the amount of data. Negative values are not accepted.
  2. Choose the unit you are converting from and the unit you are converting to, keeping decimal (GB) and binary (GiB) units apart.
  3. Read the result, the conversion factor and its inverse. A leading ≈ means the value was rounded to the selected precision.
  4. Use the table to see the amount in every unit, and Copy result to copy the number alone.

Formula

General rule
result = value × (bytes per source unit) ÷ (bytes per target unit)
Decimal (SI) units
1 kB = 1,000 B; 1 MB = 1,000 kB; 1 GB = 1,000 MB; 1 TB = 1,000 GB
Binary (IEC) units
1 KiB = 1,024 B; 1 MiB = 1,024 KiB; 1 GiB = 1,024 MiB; 1 TiB = 1,024 GiB
Bits and bytes
1 byte = 8 bits, so 1 Mbit = 0.125 MB

A drive sold as 500 GB holds 500,000,000,000 bytes. Divided by 1,073,741,824 that is 465.66 GiB, which is what an operating system that counts in binary reports, so nothing is missing.

Network speeds are quoted in bits per second: a 100 Mbit/s connection moves at most 12.5 MB of data per second.

Worked example

A 500 GB drive in gibibytes, the figure most operating systems display. These are the results the converter gives:

QuestionResult
Input: Value500
Input: FromGigabytes (GB)
Input: ToGibibytes (GiB)
Input: Precision10 significant digits
500 GB equals≈ 465.6612873 GiB
Conversion factor1 GB = ≈ 0.9313225746 GiB
Inverse1 GiB = 1.073741824 GB
FormulaGiB = GB × ≈ 0.931322574615479

Assumptions and limits

  • The lowercase b and uppercase B matter: Mb is megabits and MB is megabytes. The unit symbols here follow that convention.
  • kB uses a lowercase k, as in the SI standard. Binary units always carry an “i”: KiB, MiB, GiB.
  • Real files and drives also lose space to formatting, file-system structures and rounding up to blocks; the converter only changes units and does not model that.
  • Results are shown to 6 to 15 significant digits. Non-terminating conversions, such as GB to GiB, are rounded and marked ≈.

Frequently asked questions

How many MB are in a GB?

In decimal units, 1,000 MB make 1 GB. In binary units, 1,024 MiB make 1 GiB. The two are different, so check which one a product or program uses.

Why does my 1 TB drive show only about 931 GB?

The drive holds 1,000,000,000,000 bytes. Your operating system divides by 1,073,741,824 per GiB, giving 931.32 GiB, and may label it “GB”. No capacity is missing: it is the same number of bytes in a different unit.

What is the difference between GB and Gb?

A capital B is a byte and a lowercase b is a bit. One gigabyte (GB) is 8 gigabits (Gb). Storage is sold in bytes and network speed in bits per second.

What are KiB, MiB and GiB?

Binary units defined in 1998: 1 KiB is 1,024 bytes, 1 MiB is 1,024 KiB and 1 GiB is 1,024 MiB. They remove the ambiguity between 1,000 and 1,024 that existed when “kilobyte” was used for both.

How long does it take to download a file?

Convert the file size to bits and divide by the connection speed in bits per second. A 1 GB file is 8,000 Mbit, so at 100 Mbit/s it takes 80 seconds at best; real transfers are slower because of overhead.

How many bytes are in a terabyte?

1,000,000,000,000 (10¹²) in decimal units. A tebibyte (TiB) is 1,099,511,627,776 bytes (2⁴⁰), about 10% larger.