Data Storage Converter
Convert bytes, KB, MB, GB, TB, PB — both decimal (1000) and binary (1024) units.
About the Data Storage Converter
The data storage converter translates between decimal units (KB, MB, GB, TB, PB) and binary units (KiB, MiB, GiB, TiB), plus bits and bytes. The distinction between the two systems is one of the most common sources of confusion in computing: a 500 GB hard drive shows up as about 465 GiB in your operating system, not because the drive is defective, but because the two systems use different bases.
Decimal prefixes (kilo, mega, giga) use powers of 1000, matching the SI convention: 1 KB = 1000 bytes, 1 MB = 1,000,000 bytes, 1 GB = 1,000,000,000 bytes. These are the units used by storage manufacturers to label hard drives and SSDs, and by network providers to quote data transfer rates.
Binary prefixes (kibi, mebi, gibi) use powers of 1024, matching the way computers address memory: 1 KiB = 1024 bytes, 1 MiB = 1024^2 = 1,048,576 bytes, 1 GiB = 1024^3 = 1,073,741,824 bytes. These were standardised by the IEC in 1998 (IEC 60027-2) and are used by Microsoft Windows and most operating systems when reporting disk capacity.
The discrepancy is about 7 percent at the giga/gibi level and grows at larger sizes: 1 TB (decimal) = 0.9095 TiB, while 1 PB (decimal) = 0.8882 PiB. This is why a 1 TB drive shows as 931 GB in Windows (which uses binary GB even though it labels them "GB"). The tool reports both forms side by side so you can see exactly what each label means.
How It Works
The converter uses the two-step method through bytes:
base_in_bytes = value * factor[from]
result = base_in_bytes / factor[to]
The factor table (in bytes) is:
b = 0.125 B B = 1 B
KB = 1,000 B MB = 1,000,000 B GB = 1,000,000,000 B
TB = 1,000,000,000,000 B PB = 1,000,000,000,000,000 B
KiB = 1,024 B MiB = 1,048,576 B GiB = 1,073,741,824 B
TiB = 1,099,511,627,776 B
The bit is the smallest unit, holding one binary digit (0 or 1). A byte is 8 bits, so 1 B = 8 b. The "byte" was coined by Werner Buchholz at IBM in 1956; the size of 8 bits became standard because it allowed a single byte to represent one ASCII character.
Decimal factors are exact powers of 1000. Binary factors are exact powers of 1024. The two systems differ by about 2.4 percent at the kilo level (1000 vs 1024), about 4.9 percent at the mega level, and about 7.4 percent at the giga level, because (1024/1000)^n grows with n.
The two-step method through bytes keeps the code simple and makes the conversions transparent. The pivot unit also matches the way data is stored and addressed at the hardware level: a byte is the smallest addressable unit of memory.
Worked Examples
Converting 500 GB to GiB: the input in bytes is 500 * 1e9 = 5e11 B, and the result is 5e11 / 1,073,741,824 = 465.66 GiB. This is why a 500 GB hard drive shows up as about 465 GB in Windows: Windows uses binary gigabytes (GiB) but labels them "GB".
Converting 8 bits to bytes: the input in bytes is 8 * 0.125 = 1 B, displayed directly. This is the origin of the convention "8 bits = 1 byte". The bit is the smallest unit of information, and the byte (8 bits) is large enough to represent one ASCII character.
Converting 1 TiB to GB: the input in bytes is 1,099,511,627,776 B, and the result is 1,099,511,627,776 / 1,000,000,000 = 1099.51 GB. A "1 TB" drive labelled in decimal units holds 1000 GB, while a "1 TB" drive labelled in binary units would hold about 931 GiB (or about 1000 GiB if it were truly 1 TiB).
When to Use This Tool
Use the data storage converter when you need to:
- Verify why a hard drive shows fewer gigabytes in the operating system than on its label.
- Convert file sizes between bytes, kilobytes, and megabytes for download time estimates.
- Translate network bandwidth from megabits per second to megabytes per second.
- Compare storage capacities quoted in decimal (manufacturer) vs binary (operating system) units.
- Convert memory requirements between KiB and KB when porting software between systems.
- Compute the storage needed for a database from a row count and an average row size.
- Translate cloud storage billing from terabytes to tebibytes (or vice versa).
Limitations & Disclaimer
This converter uses decimal prefixes (KB, MB, GB, TB, PB) per SI and binary prefixes (KiB, MiB, GiB, TiB) per IEC 60027-2. It does not handle the obsolete "kilobyte = 1024 bytes" convention (which conflates the two systems), the nibble (4 bits), or the word (which varies by architecture). Results are subject to IEEE 754 floating-point precision for very large values. See our disclaimer for full details.
Frequently Asked Questions
Why does my 500 GB hard drive show only 465 GB in Windows?
Because the manufacturer uses decimal gigabytes (1 GB = 10^9 bytes) but Windows uses binary gigabytes (1 GB = 2^30 bytes, properly called GiB). The drive has 500 * 10^9 bytes, which is 500 * 10^9 / 2^30 = 465.66 GiB. The drive is not defective; the labels use different systems.
What is the difference between KB and KiB?
KB is the decimal kilobyte (1000 bytes), defined by SI. KiB is the binary kibibyte (1024 bytes), defined by IEC 60027-2 in 1998. The distinction was introduced to resolve the ambiguity between the two systems, which differ by about 2.4 percent at the kilo level and grow at larger sizes.
Why are there two systems?
Because decimal prefixes (kilo, mega, giga) match the SI convention used in science and engineering, while binary prefixes (kibi, mebi, gibi) match the way computers address memory (which uses powers of 2). The two systems coexist because storage manufacturers prefer the larger-sounding decimal units, while operating systems use the binary units for historical reasons.
How many bits are in a byte?
Eight, by the modern convention. The byte was originally variable in size (anywhere from 1 to 12 bits), but the 8-bit byte became standard in the 1960s because it was large enough to represent one ASCII character (which uses 7 bits) with one bit for parity. The term 'octet' is used in networking to emphasise that 8 bits are meant.
What is a petabyte?
A petabyte (PB) is 10^15 bytes (one quadrillion bytes) in the decimal system, or 2^50 bytes in the binary system (properly called a pebibyte, PiB). A petabyte is approximately the storage needed for 500 billion pages of standard printed text, or about 250 billion 4-megabyte photos. Large cloud providers measure their total storage in exabytes (1000 petabytes).
Why are network speeds measured in bits per second but file sizes in bytes?
Historically, networking equipment measured speed in bits per second because the underlying hardware transmits one bit at a time. File sizes are measured in bytes because a byte is the smallest addressable unit of memory. To convert a download speed of 100 megabits per second to megabytes per second, divide by 8: 12.5 MB/s.
Last updated: September 9, 2026 · Author: HT99 Tools Editorial Team