Data Storage Converter
Convert between digital storage units — bytes, KB, MB, GB, TB, and PB. Uses binary (base-2) prefixes as displayed by Windows, macOS, and Linux, where 1 KB = 1,024 bytes. Enter any size and see the equivalent across all units immediately.
How It Works
Digital data storage is based on binary (base-2) counting because computer hardware is built from transistors that have two states: on or off, representing 1 and 0. A bit is the smallest unit (one binary digit). Eight bits form one byte, the fundamental unit of data storage.
This converter uses the byte (B) as its base unit with binary prefixes where each step multiplies by 1,024 (2¹⁰):
• 1 KB (kilobyte) = 1,024 bytes = 2¹⁰ bytes
• 1 MB (megabyte) = 1,024 KB = 1,048,576 bytes = 2²⁰ bytes
• 1 GB (gigabyte) = 1,024 MB = 1,073,741,824 bytes = 2³⁰ bytes
• 1 TB (terabyte) = 1,024 GB = 1,099,511,627,776 bytes = 2⁴⁰ bytes
• 1 PB (petabyte) = 1,024 TB = 1,125,899,906,842,624 bytes = 2⁵⁰ bytes
The binary vs. decimal controversy: Storage manufacturers use decimal prefixes (1 KB = 1,000 bytes, 1 GB = 1,000,000,000 bytes) to make drive capacities look larger, while operating systems use binary. This is why a "500 GB" hard drive shows as about 465 GB in Windows or macOS — the OS displays 500,000,000,000 ÷ 1,073,741,824 ≈ 465.66 binary GB.
The IEC (International Electrotechnical Commission) introduced the "binary prefixes" kibibyte (KiB), mebibyte (MiB), gibibyte (GiB), etc. in 1998 to eliminate ambiguity. However, mainstream adoption has been slow and most consumer software still uses the ambiguous KB/MB/GB.
Worked example — Photo storage:
A 20 MP camera photo in RAW format ≈ 25 MB. A 128 GB memory card holds: 128 × 1,024 MB ÷ 25 MB/photo ≈ 5,243 photos.
Worked example — Video file:
A 1-hour 1080p video at typical 8 Mbps bitrate = 8 megabits/s × 3,600 s ÷ 8 bits/byte = 3,600 megabytes = 3.52 GB.
Worked example — Internet speed vs storage:
A 100 Mbps internet connection downloads at 100 megabits per second = 12.5 megabytes per second = 12.5 MB/s. Downloading a 4 GB game: 4 × 1,024 MB ÷ 12.5 MB/s = 327.68 seconds ≈ 5.46 minutes.
Note: internet speeds use bits (Mb/s or Gbps), while file sizes use bytes (MB, GB). Always divide Mb/s by 8 to get MB/s.
Frequently Asked Questions
Why does my 1 TB hard drive show less than 1 TB in Windows?
Hard drive manufacturers use decimal prefixes: 1 TB = 1,000,000,000,000 bytes. Windows uses binary: 1 TB = 1,099,511,627,776 bytes. A 1,000,000,000,000-byte drive ÷ 1,099,511,627,776 = 0.909 TB ≈ 931 GB as shown by Windows.
What is the difference between megabits and megabytes?
1 byte = 8 bits. 1 MB = 8 Mb. Internet speeds are quoted in megabits per second (Mbps), while file sizes use megabytes (MB). A 100 Mbps connection downloads at 12.5 MB/s.
How many GB are in a TB?
1 TB = 1,024 GB (binary, as used by operating systems). This equals 1,073,741,824 bytes ÷ 1,073,741,824 bytes/GB = 1,024 GB. Storage manufacturers use 1 TB = 1,000 GB (decimal).
What is a petabyte in practical terms?
1 PB = 1,024 TB = 1,048,576 GB. At 3 MB per song, 1 PB holds about 350 million songs. At 4 MB per photo, about 262 million photos. Google processes around 15 exabytes (15,000 PB) of data daily.
What are KiB, MiB, GiB?
These are IEC binary prefixes: kibibyte (KiB) = 1,024 bytes, mebibyte (MiB) = 1,048,576 bytes, gibibyte (GiB) = 1,073,741,824 bytes. They were defined in 1998 to unambiguously mean powers of 1,024, distinguishing from decimal KB/MB/GB. Linux and macOS increasingly use these in technical contexts.