Data Storage Converter — Bits, Bytes, KB, MB, GB, TB, PB
Result
0
All Conversions
How Data Storage Conversion Works
Data storage conversion is the process of expressing digital storage capacity in one unit as an equivalent value in another unit. The byte, consisting of 8 bits, is the fundamental unit of digital storage. According to the International Electrotechnical Commission (IEC), there are two systems for measuring data: the decimal (SI) system using powers of 1,000, and the binary (IEC) system using powers of 1,024. This dual-system situation is the primary source of confusion in data storage measurement.
Storage manufacturers use the decimal system: 1 KB = 1,000 bytes, 1 MB = 1,000,000 bytes, 1 GB = 1,000,000,000 bytes. However, operating systems like Windows traditionally calculate using the binary system but display the decimal labels (KB, MB, GB), which is why a "500 GB" hard drive shows approximately 465 GB in Windows. macOS switched to decimal display in 2009, so it shows the full 500 GB. The IEC introduced the binary prefixes (KiB, MiB, GiB) in 1998 to resolve this ambiguity, but adoption has been slow outside technical communities.
According to Statista, global data creation reached approximately 120 zettabytes in 2023 and is projected to exceed 180 zettabytes by 2025. Understanding data units is essential for evaluating cloud storage plans, estimating bandwidth needs, and comparing storage devices. Use our Number Base Converter for binary, hexadecimal, and other number system conversions.
Data Storage Conversion Formulas
All data storage conversions use bits as the base unit. The formula is:
Target Value = Source Value x (Source Unit in Bits / Target Unit in Bits)
Decimal (SI) units -- based on powers of 1,000:
- Bit = 1 bit
- Byte = 8 bits
- Kilobyte (KB) = 8,000 bits = 1,000 bytes
- Megabyte (MB) = 8,000,000 bits = 1,000,000 bytes
- Gigabyte (GB) = 8 x 10^9 bits = 10^9 bytes
- Terabyte (TB) = 8 x 10^12 bits = 10^12 bytes
- Petabyte (PB) = 8 x 10^15 bits = 10^15 bytes
Binary (IEC) units -- based on powers of 1,024:
- Kibibyte (KiB) = 8,192 bits = 1,024 bytes
- Mebibyte (MiB) = 8,388,608 bits = 1,048,576 bytes
- Gibibyte (GiB) = 8,589,934,592 bits = 1,073,741,824 bytes
- Tebibyte (TiB) = 8,796,093,022,208 bits
- Pebibyte (PiB) = 9,007,199,254,740,992 bits
Worked example: Convert 2 TB to GiB. 2 TB = 2 x 10^12 bytes. 1 GiB = 1,073,741,824 bytes. Result: 2,000,000,000,000 / 1,073,741,824 = 1,862.65 GiB. This is why a 2 TB drive shows approximately 1,863 GB in Windows.
Key Terms You Should Know
- Bit -- The smallest unit of digital information, representing a single binary value (0 or 1). Network speeds are typically measured in bits per second (Mbps, Gbps).
- Byte -- 8 bits. The fundamental unit for measuring data storage. A single ASCII character (letter, number, or symbol) occupies 1 byte. A Unicode character may use 1-4 bytes.
- Binary Prefix (IEC) -- Prefixes defined by the IEC in 1998 that use powers of 1,024: kibi (Ki, 2^10), mebi (Mi, 2^20), gibi (Gi, 2^30), tebi (Ti, 2^40), pebi (Pi, 2^50). Used by RAM manufacturers and some operating systems.
- Decimal Prefix (SI) -- Standard SI prefixes using powers of 1,000: kilo (K, 10^3), mega (M, 10^6), giga (G, 10^9), tera (T, 10^12), peta (P, 10^15). Used by storage manufacturers and network speeds.
- Nibble -- 4 bits (half a byte). Can represent values 0-15, corresponding to a single hexadecimal digit. Used in low-level programming and data encoding.
Decimal vs Binary Storage Units Compared
The table below shows the growing discrepancy between decimal and binary units. The difference starts at 2.4% for kilobytes and grows to 12.6% at the petabyte level. This is defined by the IEC 80000-13 standard.
| Decimal Unit | Bytes | Binary Unit | Bytes | Difference |
|---|---|---|---|---|
| 1 KB | 1,000 | 1 KiB | 1,024 | 2.4% |
| 1 MB | 1,000,000 | 1 MiB | 1,048,576 | 4.9% |
| 1 GB | 1,000,000,000 | 1 GiB | 1,073,741,824 | 7.4% |
| 1 TB | 10^12 | 1 TiB | ~1.1 x 10^12 | 10.0% |
| 1 PB | 10^15 | 1 PiB | ~1.13 x 10^15 | 12.6% |
Practical Examples
Hard drive capacity: You buy a 4 TB external hard drive but Windows shows only 3,725 GB. This is because 4 TB = 4,000,000,000,000 bytes, and Windows divides by 1,073,741,824 (1 GiB) instead of 1,000,000,000 (1 GB): 4,000,000,000,000 / 1,073,741,824 = 3,725.29 GiB. You have not lost any data -- it is purely a labeling difference.
Cloud storage planning: Your photo library contains 15,000 photos averaging 5 MB each. Total: 15,000 x 5 = 75,000 MB = 75 GB. Adding 20% for future growth: 90 GB. A 100 GB cloud plan (e.g., Google One at $1.99/month) would be sufficient. Use our Percentage Calculator to determine usage percentages.
Network bandwidth: Your internet plan is 100 Mbps (megabits per second). To find the maximum download speed in megabytes per second: 100 Mbps / 8 = 12.5 MB/s. A 4 GB file would take approximately 4,000 / 12.5 = 320 seconds (about 5.3 minutes) under ideal conditions. Real-world speeds are typically 50-80% of the advertised rate due to overhead.
Tips for Understanding Data Storage
- Bits vs bytes -- always check the capitalization: A lowercase "b" means bits (Mb, Gb), while an uppercase "B" means bytes (MB, GB). Internet speeds are typically in bits (100 Mbps), while file sizes are in bytes (100 MB). Divide bits by 8 to get bytes.
- Network speeds vs storage: ISPs advertise in megabits per second (Mbps), but files are measured in megabytes (MB). A "100 Mbps" connection downloads at a maximum of 12.5 MB per second. This is a common source of confusion.
- Expect 7-10% "missing" space on drives: Due to the decimal/binary discrepancy, a 1 TB drive shows about 931 GiB in Windows, 2 TB shows about 1,863 GiB, and 4 TB shows about 3,725 GiB. This is normal and not a defect.
- RAM always uses binary units: When you buy 16 GB of RAM, you get exactly 16 GiB (17,179,869,184 bytes). RAM is addressed in powers of 2, so binary units are technically correct for memory.
- File system overhead reduces usable space: Beyond the decimal/binary difference, the file system itself (NTFS, APFS, ext4) uses some storage for metadata, reducing usable capacity by an additional 1-5% depending on the format and number of files.
Frequently Asked Questions
What is the difference between KB and KiB?
A kilobyte (KB) equals 1,000 bytes using the decimal (SI) system, while a kibibyte (KiB) equals 1,024 bytes using the binary (IEC) system. The 2.4% difference at the kilobyte level compounds at larger scales: 1 TB is 1,000,000,000,000 bytes while 1 TiB is 1,099,511,627,776 bytes -- a 10% difference. The IEC introduced binary prefixes in 1998 specifically to eliminate this confusion, but many operating systems still use the ambiguous KB/MB/GB labels for binary values.
Why does my hard drive show less space than advertised?
Storage manufacturers use the decimal system where 1 GB = 1,000,000,000 bytes, while Windows displays capacity using the binary system where 1 GiB = 1,073,741,824 bytes (but labels it "GB"). A 1 TB drive contains exactly 1,000,000,000,000 bytes as advertised, but Windows calculates: 1,000,000,000,000 / 1,073,741,824 = 931.32 "GB." You have not lost any storage -- it is purely a labeling discrepancy. macOS switched to decimal display in 2009, so it shows the full 1,000 GB for a 1 TB drive.
How many bits are in a byte?
There are exactly 8 bits in one byte. A bit (binary digit) is the smallest unit of digital information, representing a single 0 or 1. A byte can represent 256 different values (2^8 = 256), which is enough to encode one ASCII character. This 8-bit byte became the de facto standard in the 1960s through IBM's System/360. Network speeds (Mbps, Gbps) are measured in bits, while file sizes (MB, GB) are measured in bytes -- divide bits by 8 to convert to bytes.
How much storage does 1 petabyte represent?
One petabyte (PB) equals 1,000 terabytes, 1,000,000 gigabytes, or approximately 1 quadrillion bytes (10^15). To visualize: 1 PB could store roughly 500 billion pages of text (the equivalent of 1 million Wikipedia databases), 250,000 full-length movies in standard definition, or about 3.4 years of continuous HD video recording. According to Statista, Netflix's entire streaming library is estimated at about 10-15 PB. Major cloud providers like AWS manage exabytes (1,000 PB) of customer data.
How do I convert internet speed (Mbps) to download time?
First, convert Mbps to MB/s by dividing by 8 (since 1 byte = 8 bits). A 100 Mbps connection provides a maximum of 12.5 MB/s. Then divide the file size by the speed: a 2 GB (2,000 MB) file at 12.5 MB/s takes 2,000 / 12.5 = 160 seconds (about 2.7 minutes). In practice, expect 50-80% of theoretical speed due to protocol overhead, server limitations, and network congestion. A "gigabit" (1 Gbps) connection maxes at 125 MB/s, downloading 2 GB in about 16 seconds under ideal conditions.
What comes after petabyte?
The data storage unit hierarchy above petabyte is: exabyte (EB, 10^18 bytes = 1,000 PB), zettabyte (ZB, 10^21 bytes = 1,000 EB), and yottabyte (YB, 10^24 bytes = 1,000 ZB). As of 2023, global data creation reached approximately 120 zettabytes annually. The entire internet is estimated to contain 40-50 zettabytes of data. No single storage system has yet reached 1 yottabyte. In binary terms, these are exbibyte (EiB), zebibyte (ZiB), and yobibyte (YiB) respectively.