Data size measurements seem simple until you run into the binary versus decimal prefix confusion. A hard drive advertised as 1 terabyte shows up as 931 gigabytes in your operating system. Memory sticks advertised as 64 gigabytes report fewer bytes than expected. Understanding how data sizes work clears up the confusion and helps you communicate storage and bandwidth values accurately.
The Base Units
The smallest unit of data is a bit, which holds a value of 0 or 1. Eight bits make one byte. A byte can represent 256 different values (2 to the power of 8) and is the basic unit for character storage, file sizes, and memory measurements.
Decimal Prefixes (SI Convention)
Storage manufacturers typically use decimal prefixes (powers of 1000):
1 kilobyte (KB) equals 1,000 bytes.
1 megabyte (MB) equals 1,000,000 bytes.
1 gigabyte (GB) equals 1,000,000,000 bytes.
1 terabyte (TB) equals 1,000,000,000,000 bytes.
1 petabyte (PB) equals 1,000,000,000,000,000 bytes.
This is why a 1 TB hard drive has exactly 1,000,000,000,000 bytes when formatted.
Binary Prefixes (IEC Convention)
Operating systems and memory specifications use binary prefixes (powers of 1024):
1 kibibyte (KiB) equals 1,024 bytes.
1 mebibyte (MiB) equals 1,048,576 bytes.
1 gibibyte (GiB) equals 1,073,741,824 bytes.
1 tebibyte (TiB) equals 1,099,511,627,776 bytes.
When your operating system reports a 1 TB drive as 931 GB, it is measuring in gibibytes (1,073,741,824 bytes each) against a drive measured in gigabytes (1,000,000,000 bytes each). The drive has the advertised bytes; the OS just displays it in a different unit.
The Naming Confusion
For decades the terms kilobyte, megabyte, and gigabyte were used loosely to mean either 1000 or 1024 multiples depending on context. The International Electrotechnical Commission introduced the kibibyte, mebibyte, and gibibyte terms in 1998 to resolve the ambiguity, but the old terminology persists in casual usage.
In practice: hard drive marketing uses decimal (1 GB = 1,000,000,000 bytes). RAM specifications use binary (1 GB RAM = 1,073,741,824 bytes). Network bandwidth is almost always decimal.
Network Bandwidth vs File Size
There is another subtlety in networking: bandwidth is measured in bits per second, not bytes per second. A 100 Megabit per second connection downloads approximately 12.5 megabytes per second (divide megabits by 8). The capital B in MB refers to bytes; the lowercase b in Mbps refers to bits.
Common Reference Points
A plain text email is a few kilobytes. A high-resolution photo is 3 to 10 megabytes. A 4K movie file is 50 to 100 gigabytes. A modern laptop SSD might hold 512 gigabytes to 2 terabytes.
Using the DevHexLab Bytes Converter
Open the tool at /tools/converters/bytes-converter. Enter a value in any data size unit and see conversions across bits, bytes, kilobytes, megabytes, gigabytes, terabytes, and their binary equivalents. The tool supports both decimal and binary conventions so you can convert accurately regardless of context.