The Standard Engine.
MathematicsFinanceHealthPhysicsEngineeringBrowse all

Everyday Life · Unit Conversions · Digital & Data

Data Storage Unit Converter

Converts any digital data storage value between bits, bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, and exabytes using standard binary (IEC) or decimal (SI) base.

Calculator

Advertisement

Formula

V_out is the converted value in the target unit. V_in is the input value in the source unit. F_in is the number of bits in one unit of the source (e.g. 1 GB = 8,589,934,592 bits in binary). F_out is the number of bits in one unit of the target. Division of conversion factors handles the unit change in a single step.

Source: IEC 80000-13:2008 (binary prefixes: kibi, mebi, gibi, etc.) and SI / NIST SP 811 (decimal prefixes: kilo, mega, giga, etc.).

How it works

Digital storage is measured in multiples of the bit — the smallest unit of binary information, representing a 0 or 1. Eight bits form one byte. From there, two parallel prefix systems diverge: the SI decimal system (used by drive manufacturers and network engineers) treats one kilobyte as exactly 1,000 bytes, one megabyte as 1,000,000 bytes, and so on, multiplying by powers of 10. The IEC binary system (used by operating systems like Windows, Linux, and macOS) treats one kibibyte as 1,024 bytes, one mebibyte as 1,048,576 bytes, and multiplies by powers of 2. The IEC coined the prefixes kibi-, mebi-, gibi-, tebi-, etc. in 1998 to eliminate ambiguity, though the older KB/MB/GB abbreviations remain common in both contexts.

Conversion between any two units is performed by expressing both quantities in a common base unit — bits — and dividing. If you know how many bits are in one unit of the source and how many bits are in one unit of the target, the formula V_out = V_in × (F_in ÷ F_out) handles any combination in a single step. For example, converting SI gigabytes to IEC gibibytes uses F_in = 8,000,000,000 bits per GB and F_out = 8,589,934,592 bits per GiB, giving a ratio of approximately 0.9313.

This converter is used daily by IT professionals sizing server disks, software engineers reading file system APIs, students studying computer architecture, and consumers comparing cloud storage plans. Mixing up SI and IEC units is one of the most common sources of confusion in computing — a 256 GB iPhone has roughly 238 GiB of actual addressable storage as reported by iOS, a difference of about 7.5%.

Worked example

Problem: A 2 TB external hard drive (SI, as advertised) shows less space in Windows (IEC). How many GiB does it actually report?

Step 1 — Identify source: 2 TB (SI terabytes). F_in = 8,000,000,000,000 bits per TB.

Step 2 — Identify target: GiB (IEC gibibytes). F_out = 8,589,934,592 bits per GiB.

Step 3 — Apply formula:
V_out = 2 × (8,000,000,000,000 ÷ 8,589,934,592)
V_out = 2 × 931.3226
V_out ≈ 1,862.65 GiB

Interpretation: A drive advertised as 2 TB by its manufacturer will show approximately 1,862.65 GiB — or about 1.82 TiB — in Windows Explorer. The drive has not lost any storage; the two counting systems simply disagree. This ~7.4% apparent discrepancy grows larger at petabyte scale.

Limitations & notes

This calculator assumes exact, lossless conversion between abstract unit definitions and does not account for partition overhead, file system metadata, bad sector reservations, or formatting losses that reduce usable capacity on real hardware. At very large scales (pebibytes and exbibytes) JavaScript floating-point arithmetic (IEEE 754 double precision) has only about 15–17 significant decimal digits, so extreme values may accumulate minor rounding errors — use dedicated arbitrary-precision libraries for safety-critical storage accounting. The calculator also does not handle data rate units such as megabits per second (Mbps) or gigabytes per second (GB/s); use a dedicated data rate converter for those. Finally, some manufacturers (notably RAM makers) use binary multiples while labeling them with SI prefixes — always verify the actual specification sheet for mission-critical provisioning.

Frequently asked questions

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

Hard drive manufacturers use SI decimal units where 1 TB = 1,000,000,000,000 bytes. Windows reports storage in IEC binary units (though it labels them GB rather than GiB), where 1 GiB = 1,073,741,824 bytes. Dividing 1,000,000,000,000 by 1,073,741,824 gives approximately 931.32 — so the drive correctly shows about 931 GiB. No storage has been lost; the two systems simply count differently.

What is the difference between KB and KiB?

KB (kilobyte) in the SI/decimal system equals exactly 1,000 bytes. KiB (kibibyte) in the IEC binary system equals exactly 1,024 bytes — that is, 2^10 bytes. The 2.4% difference seems small, but at gigabyte and terabyte scales it compounds significantly. The IEC introduced the 'kibi', 'mebi', and 'gibi' prefixes in 1998 specifically to resolve the historic ambiguity of the 'kilo' prefix in computing contexts.

Do internet service providers use SI or IEC units for speeds?

ISPs universally use SI decimal units for bandwidth: 100 Mbps means 100,000,000 bits per second. When your download manager shows a speed in MB/s, however, it typically uses binary mebibytes (1 MiB/s = 1,048,576 bytes/s). This means a '100 Mbps' connection gives a download speed of about 11.92 MiB/s, not 12.5 MB/s — another common source of consumer confusion.

How many bytes are in a gigabyte vs a gibibyte?

One gigabyte (SI) = 1,000,000,000 bytes exactly. One gibibyte (IEC) = 1,073,741,824 bytes exactly (2^30). The difference is 73,741,824 bytes — about 7.37% more for the gibibyte. At terabyte scale the discrepancy is the same percentage but represents roughly 99.5 GB of 'missing' space on a nominally 1 TB drive.

Which standard should I use when specifying cloud storage or server capacity?

Cloud providers such as AWS, Google Cloud, and Azure bill storage in SI decimal gigabytes and terabytes, so use SI units when provisioning, cost-estimating, or writing contracts. When configuring operating systems, file systems, or reading kernel/API output, expect IEC binary values. For formal technical documentation, the IEC 80000-13 standard recommends always using the unambiguous KiB/MiB/GiB/TiB suffixes to eliminate any possibility of misinterpretation.

Last updated: 2025-01-15 · Formula verified against primary sources.