Unit & Measurement Conversion Angles, Digital & Notation Units IEC 80000-13:2008 binary prefixes / SI decimal prefixes

Data Storage Unit Converter: GB vs GiB

Convert any data size between the decimal units drive makers print on the box — kB, MB, GB, TB, PB — and the binary units operating systems actually count in: KiB, MiB, GiB, TiB, PiB. The calculator gives the exact byte count, the bit count, and the gap between the two prefix conventions at your chosen magnitude. That gap is the whole answer to why a drive sold as 1 TB shows up as 931 GB in Windows: the drive really does hold 1,000,000,000,000 bytes, and the operating system is dividing by 1,073,741,824 while writing the label “GB”.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
SizeThe number as printed on the box, in the file listing, or reported by your operating system.1
Convert fromPick the decimal units for drive and network figures, the binary units for RAM and most OS file sizes.terabytes — decimal (TB, 10^12)
Convert toWindows labels its figures GB and TB but computes them as GiB and TiB, so choose the binary unit to match Explorer.gibibytes — binary (GiB, 2^30)

It returns

  • Converted size — The same quantity of data expressed in the target unit.
  • Total bytes
  • Total bits
  • Decimal gigabytes
  • Binary gibibytes
  • Decimal capacity reads smaller by — At the target unit's prefix level: 1 − 10^3k ÷ 2^10k. It is 0 for bits and bytes, which carry no prefix.

The formula

Vout=VinBinBout
g=1103k210k

In plain text: target value = value × (bytes per source unit) ÷ (bytes per target unit)

  • V_inThe size you entered, in its source unit (varies)
  • B_inBytes in one source unit — 10^3k for decimal prefixes, 2^10k for binary (B)
  • B_outBytes in one target unit, defined the same way (B)
  • kPrefix level: 1 for kilo/kibi, 2 for mega/mebi, 3 for giga/gibi, 4 for tera/tebi, 5 for peta/pebi (—)

Everything routes through a byte count, so no conversion accumulates rounding. One byte is 8 bits, and both prefix families are exact powers, so every conversion between them is an exact rational number.

Updated Category Angles, Digital & Notation Units Verified against published test cases Reading time 11 min

Two prefix systems, one byte count

Every quantity of data has exactly one honest description: a byte count. Everything else is a label applied to that count, and there are two competing sets of labels.

The decimal prefixes are the ordinary SI ones defined by the BIPM: kilo is 10³, mega is 10⁶, giga is 10⁹, tera is 10¹², peta is 10¹⁵. Storage vendors, network equipment and the SI-conforming parts of the computing world use these. A drive advertised as 1 TB contains 1,000,000,000,000 bytes.

The binary prefixes are kibi, mebi, gibi, tebi and pebi, standardised in IEC 60027-2 in 1999 and carried forward into IEC 80000-13:2008. Each is the nearest power of two: 2¹⁰ = 1,024, 2²⁰ = 1,048,576, 2³⁰ = 1,073,741,824, and so on. Memory addressing is binary, so RAM sizes, page sizes, block sizes and most operating-system file listings are naturally binary quantities.

The trouble is that for thirty years before IEC acted, the computing industry used the decimal names for the binary values. JEDEC's terminology standard for semiconductor memory still defines kilo, mega and giga as the binary powers in memory contexts, and Windows still divides by 2³⁰ and prints the label “GB”. So the word “gigabyte” genuinely means two different numbers depending on who wrote the software you are reading, and this calculator makes that ambiguity explicit by keeping the two families separate.

Why the gap grows with every prefix step

Conversion itself is trivial: multiply into bytes, divide out of bytes. What deserves explanation is the size of the discrepancy, because it is not constant.

At prefix level k, the decimal unit holds 103k bytes and the binary unit holds 210k bytes. Their ratio is (10³/2¹⁰)k = (1000/1024)k = 0.9765625k. Because the ratio is raised to the power of the prefix level, the gap compounds one step at a time.

Run it out. At k = 1 a decimal kilobyte is 1000/1024 = 0.9765625 of a kibibyte, a shortfall of 2.344%. At k = 3 it is 0.9765625³ = 0.931323, a shortfall of 6.868%. At k = 4 it is 0.909495, a shortfall of 9.051%. At k = 5, 0.888178, a shortfall of 11.182%.

Read the same ratio the other way and the numbers differ, which is the source of endless confusion. A tebibyte is 2⁴⁰/10¹² = 1.099512 terabytes, so it is 9.951% larger than a terabyte. A terabyte is 10¹²/2⁴⁰ = 0.909495 tebibytes, so it is 9.051% smaller than a tebibyte. Both statements are correct and they are not the same percentage, because the denominators differ. Whenever you quote one of these gaps, write the division that produced it.

The gap you actually see on screen depends on which unit the software displays, not on the drive. A 1 TB drive shown in GiB reads 10¹² ÷ 2³⁰ = 931.32 GiB against a nominal 1000 GB, which is the level-3 shortfall of 6.87%. The same drive shown in TiB reads 0.909495 TiB against a nominal 1 TB, the level-4 shortfall of 9.05%. Same drive, same bytes, two different-looking losses.

Worked example: the missing space on a 2 TB drive

You buy a drive labelled 2 TB. Windows reports 1.81 TB. Nothing has been lost. Here is the arithmetic, one step at a time.

  1. What the label promises. The vendor defines 1 TB as 10¹² bytes, so the drive holds 2 × 1,000,000,000,000 = 2,000,000,000,000 bytes.
  2. What Windows divides by. Windows computes its “TB” figure as 2⁴⁰ = 1,099,511,627,776 bytes, which is properly a tebibyte.
  3. The division. 2,000,000,000,000 ÷ 1,099,511,627,776 = 1.818989 TiB, which Explorer rounds to 1.81 TB.
  4. Express the loss. 1 − 1.818989 ÷ 2 = 1 − 0.909495 = 9.051% of the labelled figure, exactly the level-4 shortfall from the table below.
  5. Cross-check in gibibytes. 2,000,000,000,000 ÷ 1,073,741,824 = 1,862.645 GiB. Divide by 1,024 to return to tebibytes: 1,862.645 ÷ 1,024 = 1.818989. The two routes agree.
  6. Bits, for completeness. 2,000,000,000,000 × 8 = 16,000,000,000,000 bits, which is what matters if you are timing a transfer rather than filling a disk.

Formatting overhead is a separate, smaller effect layered on top. Reserved system areas, the file-system metadata and the partition table consume real bytes, typically well under 1% for a modern NTFS or APFS volume on a large drive. The 9.05% is not overhead; it is arithmetic.

Which convention applies to what

Match the convention to the thing you are measuring, and most of the confusion disappears.

Decimal, always: hard drives and SSDs as sold, network and interface rates (a gigabit link is 10⁹ bits per second), optical media capacities, and anything quoted in a datasheet that cites SI. Vendors print a footnote defining 1 GB as 1,000,000,000 bytes precisely because the ambiguity is real.

Binary, always: RAM, because address lines are binary and a memory module cannot be built with a round decimal capacity. Also file-system block sizes, memory page sizes, and the buffer sizes in most software.

Mixed, and you must check: operating-system file and volume listings. Windows divides by binary powers and prints decimal labels. macOS switched to decimal reporting in Mac OS X 10.6, so a Mac and a Windows machine report different numbers for the same drive. Most Linux tools accept a flag: df -h gives binary, df -H gives decimal, and ls -l --si differs from ls -lh for the same reason.

The practical consequence: when you are comparing a capacity figure to a requirement, confirm both are in the same convention before you conclude anything. A 32 GB image that will not fit on a 32 GB card is usually a convention mismatch, not a defect — 32 GiB is 34.36 GB, which no 32 GB card holds. If you are sizing a transfer rather than a volume, the Mbps to MB/s and download time calculator applies the same byte-versus-bit care to rates.

Decimal and binary prefixes side by side

Both families are exact. The last two columns are the same ratio read in opposite directions: 2^10k ÷ 10^3k − 1, and 1 − 10^3k ÷ 2^10k.
Level kDecimal unitBytesBinary unitBytesBinary unit is larger by1 decimal unit reads as
1kB1,000KiB1,0242.400%0.976563 KiB
2MB1,000,000MiB1,048,5764.858%0.953674 MiB
3GB1,000,000,000GiB1,073,741,8247.374%0.931323 GiB
4TB1,000,000,000,000TiB1,099,511,627,7769.951%0.909495 TiB
5PB1,000,000,000,000,000PiB1,125,899,906,842,62412.590%0.888178 PiB

The shortfall implied by the last column — 2.344%, 4.633%, 6.868%, 9.051%, 11.182% — is what the calculator reports as the prefix gap, because it is the direction a user experiences when a labelled capacity is displayed in binary units.

IEC 80000-13 is the standard that settles it

IEC 60027-2 introduced kibi, mebi and gibi in 1999, and IEC 80000-13:2008 — Quantities and units – Part 13: Information science and technology — carries the definitions today. Under that standard, the SI prefixes on a byte mean exactly what they mean everywhere else in SI: kilo is 1,000 and nothing else. The binary quantities get their own names and symbols, with a lower-case “i” in the symbol: KiB, MiB, GiB, TiB, PiB.

Adoption has been partial. The Linux kernel documentation, the IEEE, and most storage and networking specifications follow it. Consumer operating systems and the memory industry largely do not, and JEDEC's terminology standard for semiconductor memory continues to define the decimal-named prefixes as binary powers in that context. Write KiB and GiB when you mean binary values and you will never be misread; write GB and mean 10⁹.

Mistakes that produce a wrong data-size figure

  • Assuming a capacity shortfall is formatting overhead. The 6.87% or 9.05% you see is prefix arithmetic. File-system overhead is a separate, much smaller number on a large modern volume.
  • Confusing the bit and the byte. Lower-case b is bits, upper-case B is bytes, and the factor is 8. Storage is quoted in bytes; network and bus rates are quoted in bits.
  • Quoting the gap in the wrong direction. A TiB is 9.951% larger than a TB, but a TB is 9.051% smaller than a TiB. Write the division rather than the remembered percentage.
  • Chaining conversions through rounded intermediates. Convert once, through the exact byte count. Going TB → GB → GiB with rounding at each step loses precision that the direct division does not.
  • Comparing a Mac figure to a Windows figure. They use different conventions for the same drive, so the two numbers will never agree. Compare byte counts.
  • Sizing memory in decimal units. RAM is manufactured in binary quantities; there is no 8 GB module holding 8 × 10⁹ bytes. Use GiB when you mean memory, and see the number base conversion calculator if you need the underlying powers of two written out.

Key terms

Byte
Eight bits, the smallest individually addressable unit of storage on essentially all modern hardware. Standards sometimes use octet to make the eight-bit width explicit.
Kibibyte (KiB)
2¹⁰ = 1,024 bytes. Defined by IEC 60027-2 and IEC 80000-13 so that “kilobyte” can keep its SI meaning of 1,000 bytes.
Gibibyte (GiB)
2³⁰ = 1,073,741,824 bytes. What Windows and many tools compute when they print “GB”.
Prefix level (k)
How many prefix steps up from the byte you are: 1 for kilo/kibi, 2 for mega/mebi, and so on. The decimal-versus-binary ratio is 0.9765625 raised to this power.
Formatted capacity
The usable space after the file system claims its metadata, reserved areas and partition structures. Smaller than raw capacity, and a separate effect from prefix arithmetic.

Related conversions and where this stops

This calculator converts a static quantity of data. It says nothing about how long that quantity takes to move, which depends on a rate and on protocol overhead — the data transfer time calculator covers that, and rates bring their own bit-versus-byte trap because a 1 Gbps link moves at most 125 MB/s.

It also says nothing about compression or deduplication. A backup catalogue reporting 4 TiB of protected data on a 2 TB volume is not broken; it is reporting logical size against physical size, and those are different quantities that happen to share a unit.

Two adjacent cases worth naming. Flash media reserve some capacity for wear levelling and over-provisioning, so a 512 GB SSD may expose slightly less than 512 × 10⁹ bytes to the host, on top of the prefix effect. And RAID and file-system redundancy consume capacity by design: eight 4 TB drives in RAID 6 present 24 TB of usable space, not 32 TB, before any prefix conversion is applied at all.

For availability and capacity planning that combines these figures with uptime targets, the uptime SLA downtime calculator handles the time side of the same planning problem.

Frequently asked questions

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

Because the drive is measured in decimal terabytes and your operating system is dividing by binary gigabytes. The drive genuinely holds 1,000,000,000,000 bytes, and 1,000,000,000,000 ÷ 1,073,741,824 = 931.32. Windows labels the result “GB” even though the value it computed is gibibytes. No space is missing, and the difference is not formatting overhead.

What is the difference between GB and GiB?

A gigabyte is 10⁹ = 1,000,000,000 bytes; a gibibyte is 2³⁰ = 1,073,741,824 bytes. The gibibyte is 7.374% larger, because 2³⁰ ÷ 10⁹ = 1.073741824. IEC 80000-13 defines the GiB precisely so that GB can keep its ordinary SI meaning. Storage vendors use GB; memory and most operating systems compute GiB.

How many MB are in a GB?

1,000 MB in a decimal GB, or 1,024 MiB in a GiB. Mixing the families is where errors creep in: a GiB is 1,073.741824 decimal MB, and a GB is 953.674 MiB. Stay within one family and the answer is always 1,000 or always 1,024, never a mixture.

How many bytes are in a terabyte?

1,000,000,000,000 bytes in a decimal terabyte (10¹²), and 1,099,511,627,776 bytes in a tebibyte (2⁴⁰). Multiply either by 8 for bits. Drive capacities, and every vendor footnote defining them, use the decimal figure.

Is a kilobyte 1000 or 1024 bytes?

Under SI and IEC 80000-13 a kilobyte is 1,000 bytes and 1,024 bytes is a kibibyte. In older software and in memory contexts governed by JEDEC terminology, “kilobyte” means 1,024. Both usages are in active circulation, so when the distinction matters, write KiB or state the byte count.

Does formatting really take space from a drive?

Yes, but far less than the prefix gap suggests. A file system reserves space for its metadata, journal, directory structures and partition tables, typically well under 1% of a large modern volume. If you see roughly 7% or 9% missing, that is the decimal-to-binary conversion, not formatting.

Why do Windows and macOS report different sizes for the same drive?

Because they use different conventions. Windows divides by binary powers and labels the result GB or TB. macOS has reported decimal figures since Mac OS X 10.6, so it prints a number close to the vendor's. Both are describing the same byte count; only the divisor differs. Compare byte counts if you need the two to agree.

How do I convert bytes to bits?

Multiply by 8. One byte is eight bits on all modern hardware, so 1 MB is 8,000,000 bits and 1 MiB is 8,388,608 bits. This matters most for transfer rates: network links are rated in bits per second, so dividing a bit rate by 8 is the first step in estimating how fast a file will actually move.

Which unit should I use in documentation?

Use the binary units — KiB, MiB, GiB — whenever you mean powers of two, and reserve kB, MB and GB for powers of ten. That is what IEC 80000-13 specifies, and it removes the ambiguity for readers entirely. If your audience will not accept the binary names, state the byte count in parentheses instead.

References