Saved calculators
Conversion

GB to bytes converter

Share calculator

Add our free calculator to your website

Please enter a valid URL. Only HTTPS URLs are supported.

Use as default values for the embed calculator what is currently in input fields of the calculator on the page.
Input border focus color, switchbox checked color, select item hover color etc.

Please agree to the Terms of Use.
Preview

Save calculator

What is a gigabyte?

A gigabyte (GB) is a unit of digital information storage used to quantify the capacity of devices like hard drives, USB flash drives, and cloud storage. However, the term “gigabyte” can refer to two distinct measurement systems:

  1. Base-10 (SI System): Follows the International System of Units, where 1 gigabyte = 10910^9 bytes = 1,000,000,000 bytes.
  2. Base-2 (IEC Standard): Defined by the International Electrotechnical Commission (IEC), where 1 gibibyte (GiB) = 2302^{30} bytes = 1,073,741,824 bytes.

Historically, the binary system (base-2) was widely used in computing, but the SI system became common in marketing storage devices. This dual usage often causes confusion, leading to discrepancies between advertised and actual storage capacities.

Understanding data measurement systems

Base-10 (SI) system

  • Units: kilobyte (kB), megabyte (MB), gigabyte (GB), terabyte (TB).
  • Prefixes: Each unit increases by a factor of 1,000. 1 GB=1,000 MB=1,000,000 kB=1,000,000,000 bytes.1 \text{ GB} = 1,000 \text{ MB} = 1,000,000 \text{ kB} = 1,000,000,000 \text{ bytes}.

Base-2 (IEC) system

  • Units: kibibyte (KiB), mebibyte (MiB), gibibyte (GiB), tebibyte (TiB).
  • Prefixes: Each unit increases by a factor of 1,024. 1 GiB=1,024 MiB=1,048,576 KiB=1,073,741,824 bytes.1 \text{ GiB} = 1,024 \text{ MiB} = 1,048,576 \text{ KiB} = 1,073,741,824 \text{ bytes}.

Key Insight: Windows often displays storage in GiB but labels it as “GB,” while macOS typically uses SI units (GB) for storage. This creates a mismatch in Windows between advertised and actual capacities.

Formula

Converting gigabytes (GB) to bytes (SI system)

Bytes=GB×109\text{Bytes} = \text{GB} \times 10^9

Converting gibibytes (GiB) to bytes (IEC standard)

Bytes=GiB×230=GiB×1,073,741,824\text{Bytes} = \text{GiB} \times 2^{30} = \text{GiB} \times 1,073,741,824

Reverse conversions

  • Bytes to GB: GB=Bytes109\text{GB} = \frac{\text{Bytes}}{10^9}
  • Bytes to GiB: GiB=Bytes230=Bytes1,073,741,824\text{GiB} = \frac{\text{Bytes}}{2^{30}} = \frac{\text{Bytes}}{1,073,741,824}

Examples

Example 1: SSD storage

A 256 GB SSD (SI units) contains:

256 GB×109=256,000,000,000 bytes256 \text{ GB} \times 10^9 = 256,000,000,000 \text{ bytes}

In GiB (as reported by an OS):

256,000,000,0001,073,741,824238.42 GiB\frac{256,000,000,000}{1,073,741,824} \approx 238.42 \text{ GiB}

Example 2: File download

A “5 GB” file downloaded from the internet equals:

  • SI: 5×109=5,000,000,000 bytes5 \times 10^9 = 5,000,000,000 \text{ bytes}
  • IEC: 5×1,073,741,824=5,368,709,120 bytes5 \times 1,073,741,824 = 5,368,709,120 \text{ bytes} (if mistakenly using base-2).

Example 3: RAM capacity

A computer with 16 GiB of RAM has:

16×1,073,741,824=17,179,869,184 bytes16 \times 1,073,741,824 = 17,179,869,184 \text{ bytes}

Notes

  • Confusion alert: Storage manufacturers use base-10 (GB), while Windows uses base-2 (GiB) but labels it as “GB.” macOS uses base-10 (GB), aligning with advertised capacities.
  • Precision: For critical applications like programming or engineering, always specify the unit system.
  • Historical context: The IEC introduced binary prefixes (KiB, MiB, GiB) in 1998 to resolve ambiguity, but adoption remains inconsistent.

Frequently asked questions

How many bytes are in a GB?

In the SI system, 1 GB = 10910^9 bytes = 1,000,000,000 bytes. Calculation:

3 GB=3×109=3,000,000,000 bytes3 \text{ GB} = 3 \times 10^9 = 3,000,000,000 \text{ bytes}

What is the difference between GB and GiB?

  • GB: Base-10 unit (1,000,000,000 bytes).
  • GiB: Base-2 unit (1,073,741,824 bytes). For example, 1 GiB is approximately 7.37% larger than 1 GB.

How do I convert 500,000,000 bytes to GB?

GB=500,000,000109=0.5 GB\text{GB} = \frac{500,000,000}{10^9} = 0.5 \text{ GB}

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

The drive is marketed in TB (SI units):

1 TB=1,000 GB=1,000,000,000,000 bytes1 \text{ TB} = 1,000 \text{ GB} = 1,000,000,000,000 \text{ bytes}

The OS uses TiB (IEC units):

1,000,000,000,0001,099,511,627,7760.909 TiB=931 GiB\frac{1,000,000,000,000}{1,099,511,627,776} \approx 0.909 \text{ TiB} = 931 \text{ GiB}

How to convert 10 GiB to bytes?

10 GiB×1,073,741,824=10,737,418,240 bytes10 \text{ GiB} \times 1,073,741,824 = 10,737,418,240 \text{ bytes}

Report a bug