The Difference Between GB and GiB [EN]

Ilhan Soyturk
4 min readNov 6, 2022

--

What Is the Difference Between GB and GiB?

[info] This post is a copy of my article that I published on LinkedIn on September 9, 2022.

Abbreviations Used

  • kB: Kilobyte | MB: Megabyte | GB: Gigabyte | TB: Terabyte | PB: Petabyte
  • KiB: Kibibyte | MiB: Mebibyte | GiB: Gibibyte | TiB: Tebibyte | PiB: Pebibyte
  • OS: Operating System
  • POC: Proof of Concept

Overview

In this article, we’re going to understand the difference between GB and GiB, then answer why they are often used as synonyms in operating systems, even if it’s not true.

Also, for those asking the question “Why is my drive displaying less capacity than it must be in my operating system?”, you can find the answer in this article.

GB vs GiB | What Is the Difference?

We generally use the terms kilobyte (kB), megabyte (MB), gigabyte (GB) etc. for any measurement in computing, but it’s not always true. Let’s explain why.

A gigabyte (GB) and a gibibyte (GiB) are units of measure used in computing. What makes the difference between two of these terms is the way they are measured by byte values. The unit of GB is a part of decimal numeral system, which is based on powers of 10 and we would need 10⁹ bytes to get it. And the unit of GiB is a part of binary numeral system, which is based on powers of 2 and we would need 2³⁰ bytes to get it.

Little confusing… But let me explain through a table.

Unit of Measure   Bytes

Kilobyte (kB) 1000¹ = 10³ = 1,000
Megabyte (MB) 1000² = 10⁶ = 1,000,000
Gigabyte (GB) 1000³ = 10⁹ = 1,000,000,000
Terabyte (TB) 1000⁴ = 10¹² = 1,000,000,000,000
Petabyte (PB) 1000⁵ = 10¹⁵ = 1,000,000,000,000,000

Kibibyte (KiB) 1024¹ = 2¹⁰ = 1,024
Mebibyte (MiB) 1024² = 2²⁰ = 1,048,576
Gibibyte (GiB) 1024³ = 2³⁰ = 1,073,741,824
Tebibyte (TiB) 1024⁴ = 2⁴⁰ = 1,099,511,627,776
Pebibyte (PiB) 1024⁵ = 2⁵⁰ = 1,125,899,906,842,624


Additional Info:

1 GB = 1000 MB = 1,000,000 kB = 1,000,000,000 Bytes

1 GiB = 1024 MiB = 1,048,576 KiB = 1,073,741,824 Bytes

Also, we can see that 1 GB is not 1024 MB but actually 1000 MB in this detailed table. We can think like “1 GB is 1000 MB or 1024 MB, what does that matter?”, but it can cause some misunderstandings.

Why Is This Important?

When we purchase drives, 1 GB is often defined as 1,000,000,000 bytes by drive vendors. But when it comes to using drives, the capacity amount of drives may look reported less by operating systems. It’s because the operating system you run may be using the binary numeral system for reporting the amount unlike the other operating systems using decimal numeral system.

For example, a 1 TB drive would be reported as 931 GB (it’s actually a GiB, not GB) by Microsoft Windows operating systems. So, why is that happening? It’s because Microsoft Windows operating systems are using the binary numeral system.

As a proof of concept, 1 TB is equal to 1000 GB, which is 1,000,000,000,000 bytes. When we measure it by using binary system, we should divide it by 1024.

POC: TB to GiB Conversion

** 1 Terabyte = 1,000,000,000,000 Bytes **

1,000,000,000,000 Bytes / 1024 = 976,562,500 Kibibytes

976,562,500 Kibibytes / 1024 = 953,674 Mebibytes

953,674 Mebibytes / 1024 = 931 Gibibytes

As we can see in the table, 1 TB is equal to 931 GiB. That’s why Microsoft Windows OS reports a 1 TB drive as 931 GiB.

In order to increase our examples, if you have a 480 GB drive, which is 480,000,000,000 bytes, it would be reported as 447 Gibibiytes (GiB) by operating systems using binary numeral system. You can reach the GiB value by dividing the byte value by 1024³. Also it would be reported as 480 Gigabytes (GB) by some Linux systems using decimal numeral system.

Why Does Microsoft Windows OS Keep Using Decimal Terms?

Speaking of Microsoft Windows OS, you can ask this question: “If it’s a GiB, why does Windows use the GB term?”. Well, it’s simple. Because nobody uses the binary terms like KiB, MiB, GiB, TiB. Using kB, MB, GB, TB is more common and Microsoft prefers to keep following existing practice as Microsoft Developer Raymond Chen says in this post.

Thanks for reading.

İlhan Soytürk / Independent Cybersecurity Researcher

References

--

--